feat: 添加 DynamicDialog 和 Toast 组件,重构 PrimeVue 相关逻辑和样式
Some checks failed
/ build-and-deploy-to-vercel (push) Failing after 24s
/ depcheck (push) Successful in 1m21s
/ playwright (push) Successful in 3m16s

This commit is contained in:
严浩
2024-12-12 23:34:20 +08:00
parent 22ff97d003
commit 6ceb3f0766
10 changed files with 665 additions and 601 deletions

View File

@ -0,0 +1,30 @@
diff --git a/dynamicdialog/index.mjs b/dynamicdialog/index.mjs
index 984a71573166b74e4593c258124f48580b7e9aa1..2b04f1be26b0bc1e09a78034a0289177724dbd73 100644
--- a/dynamicdialog/index.mjs
+++ b/dynamicdialog/index.mjs
@@ -65,11 +65,12 @@ var script = {
!this.currentInstance && instance.options.onClose && instance.options.onClose({
type: 'dialog-close'
});
- delete this.instanceMap[instance.key];
},
- onDialogAfterHide: function onDialogAfterHide() {
+ onDialogAfterHide: function onDialogAfterHide(instance) {
+ console.debug('--onDialogAfterHide--');
this.currentInstance && delete this.currentInstance;
this.currentInstance = null;
+ delete this.instanceMap[instance.key];
},
getTemplateItems: function getTemplateItems(template) {
return Array.isArray(template) ? template : [template];
@@ -95,7 +96,9 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
onHide: function onHide($event) {
return $options.onDialogHide(instance);
},
- onAfterHide: $options.onDialogAfterHide
+ onAfterHide: function onAfterHide($event) {
+ return $options.onDialogAfterHide(instance);
+ }
}), createSlots({
"default": withCtx(function () {
return [(openBlock(), createBlock(resolveDynamicComponent(instance.content), mergeProps({