Sfoglia il codice sorgente

Merge branch 'dev/v1.0.88_yf' of jianyu/web into feature/v1.0.88

yangfeng 6 mesi fa
parent
commit
e70d485577

+ 12 - 1
apps/bigmember_pc/src/composables/quick-monitor/component/QuickMonitor.vue

@@ -45,7 +45,8 @@ const {
   // 分组
   groupList,
   doChangeGroup,
-  doUpdateGroup
+  doUpdateGroup,
+  eleLoading
 } = useQuickMonitorModel({
   type: props.type,
   id: props.params,
@@ -106,6 +107,7 @@ defineExpose({
         trigger="hover"
       >
         <div
+          v-loading.lock="eleLoading"
           slot="reference"
           class="flex-r-c center action-icon"
           @click.stop="doAddFollow"
@@ -182,6 +184,15 @@ defineExpose({
       margin-left: 2px;
     }
   }
+  ::v-deep {
+    .el-loading-spinner {
+      margin-top: -12px;
+      .circular {
+        width: 24px;
+        height: 24px;
+      }
+    }
+  }
 }
 ::v-deep {
   .monitor-class {

+ 6 - 8
apps/bigmember_pc/src/composables/quick-monitor/use/ent.js

@@ -119,6 +119,8 @@ function useEntQuickMonitorModel({ type, id, source }, options) {
     = useMonitorModel({ type, id }, options)
   const { limit: limitSource, more: moreSource } = source
 
+  const eleLoading = ref(false)
+
   const monitorPopoverConfig = computed(() => {
     return {
       showTip: !model.value.follow,
@@ -201,14 +203,9 @@ function useEntQuickMonitorModel({ type, id, source }, options) {
    * @return {Promise<void>}
    */
   async function doAddFollow() {
-    const eleLoading = that.$loading({
-      lock: true,
-      text: 'Loading',
-      spinner: 'el-icon-loading',
-      background: 'rgba(0, 0, 0, 0.7)'
-    })
     // 业务流程
     if (!model.value.follow) {
+      eleLoading.value = true
       // 先弹出选择分组弹框
       await doFetchGroup({ type: 'get' })
         .then((res) => {
@@ -231,7 +228,7 @@ function useEntQuickMonitorModel({ type, id, source }, options) {
           }
         })
         .finally(() => {
-          eleLoading.close()
+          eleLoading.value = false
         })
     }
   }
@@ -356,7 +353,8 @@ function useEntQuickMonitorModel({ type, id, source }, options) {
     doFetchGroup,
     groupList,
     doChangeGroup,
-    doUpdateGroup
+    doUpdateGroup,
+    eleLoading
   }
 }