perf: 优化 UI 控件交互

This commit is contained in:
奔跑的面条 2023-02-26 01:43:46 +08:00
parent 7f1012274c
commit e54de66103

View File

@ -211,9 +211,23 @@ const saveHandle = () => {
//
const closeHandle = () => {
colorList.splice(0, colorList.length)
selectColor.selectInfo = undefined
emit('update:modelShow', false)
const positiveHandle = () => {
updateColor.value = undefined
colorList.splice(0, colorList.length)
selectColor.selectInfo = undefined
emit('update:modelShow', false)
}
if (updateColor.value !== undefined) {
goDialog({
message: '当前有变动未保存,是否直接放弃修改?',
onPositiveCallback: () => {
positiveHandle()
}
})
} else {
positiveHandle()
}
}
//