From 3500a34fc17827eef64ca0b7e4b2a3121b24ab5b Mon Sep 17 00:00:00 2001
From: zs <zhousong@weben-smart.com>
Date: 周二, 29 4月 2025 17:33:29 +0800
Subject: [PATCH] 去掉生成的代码
---
HIAWms/web/src/components/ConfirmBox/ConfirmBox.tsx | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/HIAWms/web/src/components/ConfirmBox/ConfirmBox.tsx b/HIAWms/web/src/components/ConfirmBox/ConfirmBox.tsx
new file mode 100644
index 0000000..7de226d
--- /dev/null
+++ b/HIAWms/web/src/components/ConfirmBox/ConfirmBox.tsx
@@ -0,0 +1,41 @@
+import { createApp, h, ref, nextTick } from 'vue'
+import BaseDialog from '@/components/BaseDialog/index.vue'
+import styles from './ConfirmBox.module.scss'
+export const ConfirmBox = (text: string, title = '纭') => {
+ return new Promise((resolve, reject) => {
+ const mountNode = document.createElement('div')
+ document.body.appendChild(mountNode)
+
+ const visible = ref(true)
+ const app = createApp({
+ render() {
+ return h(
+ BaseDialog,
+ {
+ modelValue: visible.value,
+ 'onUpdate:modelValue': (value: boolean) => {
+ visible.value = value
+ },
+ title: title,
+ width: '379px',
+ onConfirm: () => {
+ resolve(true)
+ nextTick(() => {
+ mountNode.remove()
+ })
+ },
+ onClose: () => {
+ reject(false)
+ nextTick(() => {
+ mountNode.remove()
+ })
+ },
+ },
+ h('div', { class: styles.deleteDialog }, text)
+ )
+ },
+ })
+
+ app.mount(mountNode)
+ })
+}
--
Gitblit v1.9.3