瀏覽代碼

修复重置按钮

yys 2 天之前
父節點
當前提交
2723d2fe50
共有 2 個文件被更改,包括 8 次插入4 次删除
  1. 4 0
      src/components/InlineTenantSelector/index.vue
  2. 4 4
      src/views/system/dict/index.vue

+ 4 - 0
src/components/InlineTenantSelector/index.vue

@@ -58,6 +58,10 @@ export default {
     handleChange(val) {
     handleChange(val) {
       this.$store.dispatch('tenant/setTenantId', val)
       this.$store.dispatch('tenant/setTenantId', val)
       this.$emit('change', val)
       this.$emit('change', val)
+    },
+    reset() {
+      this.selectedId = null
+      this.$store.dispatch('tenant/setTenantId', null)
     }
     }
   }
   }
 }
 }

+ 4 - 4
src/views/system/dict/index.vue

@@ -602,13 +602,13 @@ export default {
 
 
         this.$refs.tenantSelector.reset()
         this.$refs.tenantSelector.reset()
 
 
-      } else {
+      }
 
 
-        this.tenantId = null
+      this.tenantId = null
 
 
-        this.tenantName = ''
+      this.tenantName = ''
 
 
-      }
+      this.syncTenantRouteQuery()
 
 
       this.handleQuery()
       this.handleQuery()