Commit 22792ba0 authored by nick zheng's avatar nick zheng

fix: 提示弹窗关闭后清空旧值

parent 0f8252c7
<script setup lang="ts">
import { onMounted, reactive, ref } from 'vue'
import { onMounted, reactive, ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { useLayoutConfig } from '@/composables/useLayoutConfig'
......@@ -19,6 +19,18 @@ const modalOptions = reactive({
let _modalStatusResolve = (_value?: any) => {}
let _modalStatusReject = (_reason?: any) => {}
watch(
() => isShowModal.value,
(newVal) => {
if (!newVal) {
modalOptions.content = ''
modalOptions.title = t('common_module.tip')
modalOptions.cancelText = t('common_module.cancel_btn_text')
modalOptions.confirmText = t('common_module.confirm_btn_text')
}
},
)
onMounted(() => {
window.$message.ctWarning = handleShowModal
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment