tangning 1 éve
szülő
commit
05a4124871
3 módosított fájl, 10 hozzáadás és 1 törlés
  1. 4 0
      src/assets/app.css
  2. 2 0
      src/views/feedback/index.vue
  3. 4 1
      src/views/feedback/mcSubmit.vue

+ 4 - 0
src/assets/app.css

@@ -54,5 +54,9 @@ p {
 .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector {
   border-color: var(--van-primary-color);
 }
+.van-rate__icon{
+	height: var(--rate-width) !important;
+}
+
 
 

+ 2 - 0
src/views/feedback/index.vue

@@ -36,6 +36,7 @@
   });
   const addres = ref({
     country: '',
+    city: '',
     countries: [],
     mccountries: '',
   });
@@ -82,6 +83,7 @@
     let { data } = await getDefaultAddress();
     addres.value = {
       country: data.country,
+      city: data.city,
       mccountries: data.province ? `${data.province}/${data.city}` : '',
       countries: data.province ? [data.province, data.city] : [],
     };

+ 4 - 1
src/views/feedback/mcSubmit.vue

@@ -229,12 +229,14 @@
     softwareOptionId: null,
     industryOptionId: null,
   });
+  const cascaderValue = ref();
   watch(
     () => props.addres,
     (newValue, oldValue) => {
       console.log('addreswatch', newValue);
       formData.value.country = newValue.country;
-      formData.value.countries = newValue.countries;
+      formData.value.city = newValue.mccountries;
+      cascaderValue.value = newValue.city;
       // 因为watch被观察的对象只能是getter/effect函数、ref、active对象或者这些类型是数组
       // 所以需要将state.count变成getter函数
     },
@@ -279,6 +281,7 @@
   // 全部选项选择完毕后,会触发 finish 事件
   const onFinish = ({ selectedOptions }, b) => {
     showPicker.value.city = false;
+    console.log('onFinish',cascaderValue.value);
     formData.value.city = selectedOptions.map((option) => option.text).join('/');
   };
   const onConfirm = ({ selectedOptions, selectedValues }, b) => {