Jelajahi Sumber

feat: 添加loading

tangning 2 tahun lalu
induk
melakukan
c508471e9c
1 mengubah file dengan 7 tambahan dan 3 penghapusan
  1. 7 3
      src/views/scenes/list.vue

+ 7 - 3
src/views/scenes/list.vue

@@ -50,13 +50,16 @@
                   {
                     label: '复制',
                     //disabled:!(record.status == 1 || (record.status == -2 && record.payStatus == 1)),
-                    ifShow:getCheckRole('super')&& record.sceneVersion =='v3' && record.companyId != 1058,
+                    ifShow:
+                      getCheckRole('super') &&
+                      record.sceneVersion == 'v3' &&
+                      record.companyId != 1058,
                     onClick: handleCopy.bind(null, record),
                   },
                   {
                     label: '迁移',
                     //disabled:!(record.status == 1 || record.status == -2),
-                    ifShow:getCheckRole('super') && record.companyId != 1058,
+                    ifShow: getCheckRole('super') && record.companyId != 1058,
                     onClick: handleMove.bind(null, record),
                   },
                   // {
@@ -277,7 +280,7 @@
         ],
       };
       // { getForm }
-      const [registerTable, { reload }] = useTable({
+      const [registerTable, { reload, setLoading }] = useTable({
         title: t('routes.scenes.sceneList'),
         api: ListApi,
         columns: columns,
@@ -349,6 +352,7 @@
           title: t('routes.scenes.copyInfi.title'),
           content: t('routes.scenes.copyInfi.content'),
           onOk: async () => {
+            setLoading(true);
             sceneCopy({ num: record.num }).then(() => {
               createMessage.success(t('routes.scenes.copyInfi.ok'));
               reload();