bge-ui 1.0.3 → 1.0.5
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/index.js +9 -3
- package/package.json +5 -5
- package/src/message/method.ts +8 -1
package/dist/index.js
CHANGED
|
@@ -8947,6 +8947,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8947
8947
|
}
|
|
8948
8948
|
});
|
|
8949
8949
|
const messageTypes = ["success", "info", "error"];
|
|
8950
|
+
let appendTo;
|
|
8951
|
+
try {
|
|
8952
|
+
appendTo = document.body;
|
|
8953
|
+
} catch (error) {
|
|
8954
|
+
appendTo = void 0;
|
|
8955
|
+
}
|
|
8950
8956
|
const messageDefaults = {
|
|
8951
8957
|
customClass: "",
|
|
8952
8958
|
center: false,
|
|
@@ -8962,7 +8968,7 @@ const messageDefaults = {
|
|
|
8962
8968
|
zIndex: 0,
|
|
8963
8969
|
grouping: false,
|
|
8964
8970
|
repeatNum: 1,
|
|
8965
|
-
appendTo
|
|
8971
|
+
appendTo
|
|
8966
8972
|
};
|
|
8967
8973
|
let seed = 1;
|
|
8968
8974
|
const instances = shallowReactive([]);
|
|
@@ -8983,7 +8989,7 @@ function createMessage(_options = {}, context) {
|
|
|
8983
8989
|
...messageDefaults,
|
|
8984
8990
|
..._options
|
|
8985
8991
|
};
|
|
8986
|
-
const { appendTo, ...options } = normalized;
|
|
8992
|
+
const { appendTo: appendTo2, ...options } = normalized;
|
|
8987
8993
|
const userOnClose = normalized.onClose;
|
|
8988
8994
|
const container = document.createElement("div");
|
|
8989
8995
|
const props = {
|
|
@@ -9010,7 +9016,7 @@ function createMessage(_options = {}, context) {
|
|
|
9010
9016
|
);
|
|
9011
9017
|
vnode.appContext = context || message._context;
|
|
9012
9018
|
render(vnode, container);
|
|
9013
|
-
|
|
9019
|
+
appendTo2.appendChild(container.firstElementChild);
|
|
9014
9020
|
const vm = vnode.component;
|
|
9015
9021
|
const handler = {
|
|
9016
9022
|
close: () => {
|
package/package.json
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bge-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "vite build",
|
|
9
|
-
"generate-icon": "tsx icons/generate.ts"
|
|
10
|
-
},
|
|
11
7
|
"files": [
|
|
12
8
|
"dist",
|
|
13
9
|
"icons",
|
|
@@ -34,5 +30,9 @@
|
|
|
34
30
|
},
|
|
35
31
|
"devDependencies": {
|
|
36
32
|
"@types/node": "^20.10.1"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "vite build",
|
|
36
|
+
"generate-icon": "tsx icons/generate.ts"
|
|
37
37
|
}
|
|
38
38
|
}
|
package/src/message/method.ts
CHANGED
|
@@ -4,6 +4,13 @@ import type { AppContext } from 'vue'
|
|
|
4
4
|
|
|
5
5
|
const messageTypes = ['success', 'info', 'error'] as const
|
|
6
6
|
|
|
7
|
+
let appendTo
|
|
8
|
+
try {
|
|
9
|
+
appendTo = document.body
|
|
10
|
+
} catch (error) {
|
|
11
|
+
appendTo = void 0
|
|
12
|
+
}
|
|
13
|
+
|
|
7
14
|
const messageDefaults = {
|
|
8
15
|
customClass: '',
|
|
9
16
|
center: false,
|
|
@@ -19,7 +26,7 @@ const messageDefaults = {
|
|
|
19
26
|
zIndex: 0,
|
|
20
27
|
grouping: false,
|
|
21
28
|
repeatNum: 1,
|
|
22
|
-
appendTo
|
|
29
|
+
appendTo,
|
|
23
30
|
} as const
|
|
24
31
|
|
|
25
32
|
let seed = 1
|