fix: 无法重新打开弹框的问题
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
* @Author: zhaojinfeng 121016171@qq.com
|
||||
* @Date: 2023-08-14 11:07:15
|
||||
* @LastEditors: zhaojinfeng 121016171@qq.com
|
||||
* @LastEditTime: 2023-09-06 20:03:04
|
||||
* @LastEditTime: 2023-12-14 16:08:04
|
||||
* @FilePath: \vue3\packages\select-transfer-modal\index.vue
|
||||
* @Description:
|
||||
*
|
||||
@ -99,6 +99,8 @@ const properties = withDefaults(
|
||||
request: (args: any) => Promise<Page>
|
||||
pageSizes?: number[]
|
||||
pagerCount?: number
|
||||
/** 禁用按钮 */
|
||||
disabledButton?: boolean
|
||||
hideButton?: boolean
|
||||
hidePagination?: boolean
|
||||
title?: string
|
||||
@ -191,26 +193,34 @@ async function getList() {
|
||||
}
|
||||
}
|
||||
function openDialog() {
|
||||
if (properties.disabledButton)
|
||||
return
|
||||
|
||||
if (properties.hideButton)
|
||||
emit('update:show', true)
|
||||
else
|
||||
showDialog.value = true
|
||||
}
|
||||
|
||||
function confirm() {
|
||||
const selections = transferValue.map(key => properties.formattter(temp[key]))
|
||||
emit('update:value', selections)
|
||||
emit('confirm', selections, [...transferValue])
|
||||
function closeDialog() {
|
||||
if (properties.hideButton)
|
||||
emit('update:show', false)
|
||||
else
|
||||
showDialog.value = false
|
||||
}
|
||||
|
||||
function confirm() {
|
||||
const selections = transferValue.map(key => properties.formattter(temp[key]))
|
||||
emit('update:value', selections)
|
||||
emit('confirm', selections, [...transferValue])
|
||||
closeDialog()
|
||||
}
|
||||
|
||||
function closed() {
|
||||
queryRef?.resetFields()
|
||||
queryParams.pageNum = 1
|
||||
currentKeyList = []
|
||||
closeDialog()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
|
Reference in New Issue
Block a user