asked the boss, write it as computed, and give others a reference.
Please see my solution:
(1) props, address is an address (an object value from the list page:)
props: {
address: {
type: Object
}
},
(2) data () section, use a counter comKey
data () {
return {
comKey: 0
}
}
(3) computed: part
computed: {
model () {
alert ('< = changed= >');
return this.address;
}
},
(3) A key= "comKey" needs to be referenced on the form to force the view section to be updated
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 18.0px Menlo}
< cube-form: model= "model" @ validate= "validateHandler": key= "comKey" >
(4) in the methods () section, accumulate the calculator above the action that causes the value of the address attribute. After the user selects the region, the modified attribute will be changed
methods: {
onSelected (data) {
this.address.area=data.province.value+data.city.value+data.area.value;
alert ('= = > this.address.area:'+this.address.area);
this.address.province = data.province.value;
this.address.city = data.city.value;
this.address.district = data.area.value;
this.comKeyPP;
},
example diagram:
: