fix: 选择bug

This commit is contained in:
2023-07-21 22:37:11 +08:00
parent 9451a8dd53
commit d692191873

View File

@ -2,7 +2,7 @@
* @Author: zhaojinfeng 121016171@qq.com
* @Date: 2023-07-18 12:30:07
* @LastEditors: zhaojinfeng 121016171@qq.com
* @LastEditTime: 2023-07-21 22:13:32
* @LastEditTime: 2023-07-21 22:35:52
* @FilePath: \vue3\packages\select-table-modal\index.vue
* @Description: 模态框选择表格
*
@ -63,7 +63,7 @@
</div>
<template #footer>
<el-space>
<el-button type="primary" @click="confirm">
<el-button :disabled="!selection" type="primary" @click="confirm">
确定
</el-button>
<el-button @click="showDialog = false">
@ -129,6 +129,7 @@ let tableData = $ref<any[]>([])
let selection = $ref<any>()
function confirm() {
emit('confirm', selection)
emit('update:value', selection && selection[props.rowKey])
if (props.hideButton)
emit('update:show', false)
else