mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 处理 model 报错
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<n-modal v-model:show="modelShow" :mask-closable="true" @afterLeave="closeHandle">
|
||||
<n-modal v-model:show="modelShowRef" :mask-closable="true" @afterLeave="closeHandle">
|
||||
<n-table class="model-content" :bordered="false" :single-line="false">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -31,17 +31,24 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { watch, ref } from 'vue'
|
||||
import { icon } from '@/plugins'
|
||||
import { WinKeyboard, MacKeyboard } from '@/enums/editPageEnum'
|
||||
|
||||
const { CloseIcon } = icon.ionicons5
|
||||
const modelShowRef = ref(false)
|
||||
|
||||
const emit = defineEmits(['update:modelShow'])
|
||||
|
||||
defineProps({
|
||||
const props = defineProps({
|
||||
modelShow: Boolean
|
||||
})
|
||||
|
||||
|
||||
watch(() => props.modelShow, (newValue) => {
|
||||
modelShowRef.value = newValue
|
||||
})
|
||||
|
||||
// 快捷键
|
||||
const shortcutKeyOptions = [
|
||||
{
|
||||
@@ -121,6 +128,7 @@ const shortcutKeyOptions = [
|
||||
mac: `${MacKeyboard.CTRL_SOURCE_KEY.toUpperCase()} + ${WinKeyboard.SHIFT.toUpperCase()} + G `
|
||||
}
|
||||
]
|
||||
|
||||
const closeHandle = () => {
|
||||
emit('update:modelShow', false)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user