NEZ-1941 fix:修复颜色选择器tab异常切换
This commit is contained in:
@@ -39,8 +39,6 @@ export const clickoutside = {
|
|||||||
if (oldValue) {
|
if (oldValue) {
|
||||||
// const newValue = JSON.parse(JSON.stringify(binding.value.obj))
|
// const newValue = JSON.parse(JSON.stringify(binding.value.obj))
|
||||||
if (unsavedChange == 'on' && !isEqual(oldValue, el.__newValue__)) {
|
if (unsavedChange == 'on' && !isEqual(oldValue, el.__newValue__)) {
|
||||||
// 防止表单自动聚焦
|
|
||||||
setTimeout(() => {
|
|
||||||
MessageBox.confirm(i18n.t('tip.confirmCancel'), {
|
MessageBox.confirm(i18n.t('tip.confirmCancel'), {
|
||||||
confirmButtonText: i18n.t('tip.yes'),
|
confirmButtonText: i18n.t('tip.yes'),
|
||||||
cancelButtonText: i18n.t('tip.no'),
|
cancelButtonText: i18n.t('tip.no'),
|
||||||
@@ -50,7 +48,6 @@ export const clickoutside = {
|
|||||||
binding.value.func()
|
binding.value.func()
|
||||||
}
|
}
|
||||||
}).catch(err => err)
|
}).catch(err => err)
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
binding.value.func()
|
binding.value.func()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,18 +82,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
valueArr: {
|
|
||||||
handler (n) {
|
|
||||||
if (!this.isTopo) {
|
|
||||||
this.keyName = this.valueArr[0].name
|
|
||||||
this.colors = this.valueArr[0].value || randomcolor() + 'FF'
|
|
||||||
} else {
|
|
||||||
this.keyName = this.valueArr[0].name
|
|
||||||
this.colors = this.valueArr[0].value
|
|
||||||
}
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -156,8 +145,13 @@ export default {
|
|||||||
//
|
//
|
||||||
},
|
},
|
||||||
colorTabChange (item) {
|
colorTabChange (item) {
|
||||||
|
if (!this.isTopo) {
|
||||||
this.keyName = item.name
|
this.keyName = item.name
|
||||||
this.colors = this.colorVal[item.name] || randomcolor() + 'FF'
|
this.colors = this.colorVal[item.name] || randomcolor() + 'FF'
|
||||||
|
} else {
|
||||||
|
this.keyName = item.name
|
||||||
|
this.colors = this.colorVal[item.name]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
exitColor () {
|
exitColor () {
|
||||||
this.showColorPicker = false
|
this.showColorPicker = false
|
||||||
|
|||||||
Reference in New Issue
Block a user