Przeglądaj źródła

五层级联优化

zhujindu 1 rok temu
rodzic
commit
6874d0fe89
1 zmienionych plików z 6 dodań i 3 usunięć
  1. 6 3
      src/components/zRadio.vue

+ 6 - 3
src/components/zRadio.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="zSelect">
     <div class="checkbox">
-      <van-radio-group v-model="radio" @change="radiofn">
+      <van-radio-group v-model="zradioc" @change="radiofn">
         <van-radio
           :name="item.collectionOptionId + ''"
           :disabled="item.unableChoose"
@@ -38,9 +38,12 @@ export default {
   data() {
     return {
       radioChange: false,
-      zradioc: this.radio,
+      zradioc: '',
     };
   },
+  created() {
+    this.zradioc = this.radio;
+  },
   methods: {
     radiofn(value) {
       this.radioChange = true;
@@ -75,7 +78,7 @@ export default {
     radioclick(val) {
       if (!val) {
         if (!this.radioChange) {
-          this.radio = '';
+          this.zradioc = '';
         }
         this.radioChange = false;
       }