Commit 1f5ebbda authored by daywrite's avatar daywrite

修复singleRadio使用watch

parent fd420726
export default {
data () {
return {
item: '',
timeItem: '',
inputSelectItem: 'rmb'
}
},
computed: {
item: {
get () {
return this.formItem
},
set (val) {
this.$emit('update:item', val)
}
}
},
// computed: {
// item: {
// set (val) {
// this.$emit('update:item', val)
// }
// }
// },
props: {
formItem: [Number, String],
......@@ -61,12 +58,21 @@ export default {
}
},
watch: {
'formItem': {
handler (val) {
this.item = val
},
immediate: true
},
'formTimeItem' (val) {
this.timeItem = val
},
'formInputSelect' (val) {
this.inputSelectItem = val
},
'item' (val) {
this.$emit('update:item', val)
},
'timeItem' (val) {
this.$emit('update:item', val)
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment