fix: 数据回显

This commit is contained in:
2023-08-16 11:15:21 +08:00
parent 9719fa1f4b
commit 450e12844c

View File

@ -2,7 +2,7 @@
* @Author: zhaojinfeng 121016171@qq.com
* @Date: 2023-08-14 11:07:15
* @LastEditors: zhaojinfeng 121016171@qq.com
* @LastEditTime: 2023-08-14 21:49:26
* @LastEditTime: 2023-08-16 11:11:30
* @FilePath: \vue3\packages\select-transfer-modal\index.vue
* @Description:
*
@ -102,7 +102,7 @@ const properties = withDefaults(
title: '选择',
width: '70%',
zIndex: 2023,
formattter(row: Record<string, any>) {
formattter: (row: Record<string, any>) => {
return { ...row }
},
},
@ -202,13 +202,14 @@ function transferValueInit() {
transferValue = value.map((e) => {
temp[e[properties.props.key]] = e
return e[properties.props.key]
})
}
watch(() => properties.value, () => {
transferValueInit()
})
watch(() => properties.value, transferValueInit)
watch(() => properties.show, (show) => {
showDialog.value = show
})