nuxt-hs-ui 2.11.5 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -83,6 +83,17 @@ const clickCancel = () => {
|
|
|
83
83
|
item.data.cancelBtnClick();
|
|
84
84
|
};
|
|
85
85
|
|
|
86
|
+
const clickBg = () => {
|
|
87
|
+
if (activeItem.value === null) return;
|
|
88
|
+
const item = activeItem.value;
|
|
89
|
+
if (activeItem.value?.data.option.bgClose === true) {
|
|
90
|
+
item.data.cancelBtnClick();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (item.data.option.btnCancel.isShow === false) return;
|
|
94
|
+
item.data.cancelBtnClick();
|
|
95
|
+
};
|
|
96
|
+
|
|
86
97
|
watch(activateTs, async (ts) => {
|
|
87
98
|
await nextTick();
|
|
88
99
|
if (ts === null || !isShow.value) {
|
|
@@ -217,6 +228,14 @@ const baseCardHeader = [
|
|
|
217
228
|
"py-1",
|
|
218
229
|
"pe-1",
|
|
219
230
|
];
|
|
231
|
+
|
|
232
|
+
const modalClosable = computed(() => {
|
|
233
|
+
if (activeItem.value?.data.option.btnCancel.isShow) return true;
|
|
234
|
+
if (activeItem.value?.data.option.bgClose !== undefined) {
|
|
235
|
+
return activeItem.value?.data.option.bgClose;
|
|
236
|
+
}
|
|
237
|
+
return false;
|
|
238
|
+
});
|
|
220
239
|
</script>
|
|
221
240
|
|
|
222
241
|
<template>
|
|
@@ -226,8 +245,8 @@ const baseCardHeader = [
|
|
|
226
245
|
:show="isShow"
|
|
227
246
|
:z-index="zindex"
|
|
228
247
|
focus-lock
|
|
229
|
-
:closeable="
|
|
230
|
-
@close="
|
|
248
|
+
:closeable="modalClosable"
|
|
249
|
+
@close="clickBg()"
|
|
231
250
|
>
|
|
232
251
|
<Card
|
|
233
252
|
v-if="activeItem !== null"
|