commit
8b5d351983
|
@ -74,6 +74,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.value = this.modelValue
|
||||||
this.data.push(...config.icons)
|
this.data.push(...config.icons)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -42,7 +42,8 @@
|
||||||
watch:{
|
watch:{
|
||||||
data(val) {
|
data(val) {
|
||||||
val.forEach(item => {
|
val.forEach(item => {
|
||||||
this.selected[item.key] = this.selectedValues[item.key] || [item.options[0].value]
|
this.selected[item.key] = this.selectedValues[item.key] ||
|
||||||
|
(Array.isArray(item.options) && item.options.length) ? [item.options[0].value] : []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -58,7 +59,8 @@
|
||||||
mounted() {
|
mounted() {
|
||||||
//默认赋值
|
//默认赋值
|
||||||
this.data.forEach(item => {
|
this.data.forEach(item => {
|
||||||
this.selected[item.key] = this.selectedValues[item.key] || [item.options[0].value]
|
this.selected[item.key] = this.selectedValues[item.key] ||
|
||||||
|
(Array.isArray(item.options) && item.options.length) ? [item.options[0].value] : []
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
form: {
|
form: {
|
||||||
icon: ''
|
icon: 'el-icon-apple'
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
icon: [
|
icon: [
|
||||||
|
|
Loading…
Reference in New Issue