parent
dc939118c9
commit
890e81cd06
|
@ -11,6 +11,10 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
color: {
|
color: {
|
||||||
require: false
|
require: false
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
type: String,
|
||||||
|
required: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
|
@ -19,6 +23,19 @@ export default {
|
||||||
key: 'name'
|
key: 'name'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
watch:{
|
||||||
|
value(nv,ov){
|
||||||
|
const { row } = this.$parent.scope
|
||||||
|
const { children } = this.$parent
|
||||||
|
if (children) {
|
||||||
|
const valueBinding = this.$parent.valueBinding
|
||||||
|
this.setValue(row[valueBinding])
|
||||||
|
this.key = children
|
||||||
|
} else {
|
||||||
|
this.setValue([])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
created () {
|
created () {
|
||||||
const { row } = this.$parent.scope
|
const { row } = this.$parent.scope
|
||||||
const { children } = this.$parent
|
const { children } = this.$parent
|
||||||
|
|
Loading…
Reference in New Issue