소스 검색

fix:解决打开时切换类型报错的问题

liuzl 2 년 전
부모
커밋
e1f85a1cfa
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 4
      components/SelectDealer.vue

+ 3 - 4
components/SelectDealer.vue

@@ -84,9 +84,6 @@
         return str
       },
     },
-    onHide() {
-      this.userList = []
-    },
     methods: {
       async getList() {
         this.loading = true
@@ -110,12 +107,14 @@
         }
       },
       open() {
+        this.userList = []
+        this.selected = null
         this.selectVisible = true
         this.getList()
       },
       close() {
-        this.selectVisible = false
         this.$emit('close', this.selected)
+        this.selectVisible = false
       },
       radioChange(n) {
         this.selected = this.userList.find((item) => item.id == n)