Browse Source

友好交互

CzRger 1 year ago
parent
commit
26be864b4e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/views/ship-test/business/ship-filter.vue

+ 5 - 1
src/views/ship-test/business/ship-filter.vue

@@ -48,7 +48,7 @@
       </div>
     </template>
     <template v-else>
-      <div class="ship-filter-icon __hover" @click="isActive = true">
+      <div class="ship-filter-icon __hover" @click="loading ? undefined : isActive = true" v-loading="loading">
         <SvgIcon name="tools-ship" color="#ffffff" size="24"/>
       </div>
     </template>
@@ -88,8 +88,10 @@ export default defineComponent({
       isActive: false,
       shipSource: <any>[],
       shipParams: <any>null,
+      loading: false
     })
     const initSource = () => {
+      state.loading = true
       that.$api.shipTestShipFilterGetConfig().then(res => {
         state.shipSource = res.data
         state.shipSource.forEach(s => {
@@ -103,6 +105,7 @@ export default defineComponent({
           state.shipSource[0].active = true
           onSubmit()
         }
+        state.loading = false
       })
     }
     const handleSource = (source) => {
@@ -132,6 +135,7 @@ export default defineComponent({
         cql: strArr.length > 0 ? strArr.map(v => `(${v})`).join(' and ') : null,
         shipParams: shipParams
       })
+      state.isActive = false
     }
     onMounted(() => {
       initSource()