fix: 🐛 修复wd-popup组件的click-modal方法错误调用的问题

This commit is contained in:
xuqingkai 2023-10-16 14:15:59 +08:00 committed by weisheng
parent dd47efce47
commit 224e3e53f9
4 changed files with 6 additions and 6 deletions

View File

@ -207,7 +207,7 @@ function select({ item, index }) {
| opened | 弹出层打开动画结束时触发 | - | - |
| close | 弹出层关闭时触发 | - | - |
| closed | 弹出层关闭动画结束时触发 | - | - |
| clickmodal | 点击遮罩时触发 | - | - |
| click-modal | 点击遮罩时触发 | - | - |
| cancel | 点击取消按钮时触发 | - | - |
## Action 数据结构

View File

@ -115,7 +115,7 @@ function handleClose() {
|---------|-----|-----|---------|
| click | 点击幕帘时触发 | - | - |
| close | 弹出层关闭时触发 | - | - |
| clickmodal | 点击遮罩时触发 | - | - |
| click-modal | 点击遮罩时触发 | - | - |
| beforeenter | 进入前触发 | - | - |
| enter | 进入时触发 | - | - |
| afterenter | 进入后触发 | - | - |

View File

@ -136,7 +136,7 @@ watch(
{ deep: true, immediate: true }
)
const emit = defineEmits(['select', 'clickmodal', 'cancel', 'closed', 'close', 'open', 'opened', 'update:modelValue'])
const emit = defineEmits(['select', 'click-modal', 'cancel', 'closed', 'close', 'open', 'opened', 'update:modelValue'])
function isArray() {
return props.panels.length && !(props.panels[0] instanceof Array)
@ -166,7 +166,7 @@ function select(rowIndex: number, type: 'action' | 'panels', colIndex?: number)
close()
}
function handleClickModal() {
emit('clickmodal')
emit('click-modal')
if (props.closeOnClickModal) {
close()
}

View File

@ -93,7 +93,7 @@ const emit = defineEmits([
'afterleave',
'close',
'closed',
'clickmodal',
'click-modal',
'load',
'error',
'click'
@ -147,7 +147,7 @@ function close() {
}
function clickModal() {
emit('clickmodal')
emit('click-modal')
}
function imgLoad(event) {