|
@@ -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) => {
|