@xingtukeji/micro 1.1.5 → 1.1.7
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 +149 -101
- package/dist/types/components/XTMicroView.vue.d.ts +5 -3
- package/dist/types/index.d.ts +2 -1
- package/dist/types/parent.d.ts +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('.xt-micro{width:100%;height:100%;overflow:hidden}.xt-micro:before{content:"加载中";position:absolute;inset:0;display:flex;justify-content:center;align-items:center;z-index:-1}.micro-iframe{width:100%;height:100%;border:none;margin:0;padding:0}.micro-iframe:after{content:"加载中";position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#fff}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var y = (e, t, n) => t in e ?
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var e=document.createElement("style");e.appendChild(document.createTextNode('.xt-micro{width:100%;height:100%;overflow:hidden;background-color:transparent}.xt-micro:before{content:"加载中";position:absolute;inset:0;display:flex;justify-content:center;align-items:center;z-index:-1}.micro-iframe{width:100%;height:100%;border:none;margin:0;padding:0}.micro-iframe:after{content:"加载中";position:absolute;inset:0;display:flex;justify-content:center;align-items:center;background:#fff}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
var U = Object.defineProperty, A = Object.defineProperties;
|
|
3
|
+
var L = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var g = Object.getOwnPropertySymbols;
|
|
5
|
+
var T = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
6
|
+
var y = (e, t, n) => t in e ? U(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, d = (e, t) => {
|
|
7
7
|
for (var n in t || (t = {}))
|
|
8
|
-
|
|
9
|
-
if (
|
|
10
|
-
for (var n of
|
|
11
|
-
|
|
8
|
+
T.call(t, n) && y(e, n, t[n]);
|
|
9
|
+
if (g)
|
|
10
|
+
for (var n of g(t))
|
|
11
|
+
b.call(t, n) && y(e, n, t[n]);
|
|
12
12
|
return e;
|
|
13
|
-
}, m = (e, t) =>
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
13
|
+
}, m = (e, t) => A(e, L(t));
|
|
14
|
+
var u = (e, t, n) => (y(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
15
|
+
var I = (e, t, n) => new Promise((r, o) => {
|
|
16
|
+
var a = (l) => {
|
|
17
17
|
try {
|
|
18
18
|
i(n.next(l));
|
|
19
|
-
} catch (
|
|
20
|
-
o(
|
|
19
|
+
} catch (h) {
|
|
20
|
+
o(h);
|
|
21
21
|
}
|
|
22
|
-
},
|
|
22
|
+
}, s = (l) => {
|
|
23
23
|
try {
|
|
24
24
|
i(n.throw(l));
|
|
25
|
-
} catch (
|
|
26
|
-
o(
|
|
25
|
+
} catch (h) {
|
|
26
|
+
o(h);
|
|
27
27
|
}
|
|
28
|
-
}, i = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(
|
|
28
|
+
}, i = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(a, s);
|
|
29
29
|
i((n = n.apply(e, t)).next());
|
|
30
30
|
});
|
|
31
|
-
import { ref as P, defineComponent as
|
|
31
|
+
import { ref as P, defineComponent as v, watch as x, onMounted as k, onUnmounted as X, openBlock as $, createElementBlock as H, mergeProps as N } from "vue";
|
|
32
32
|
const c = {
|
|
33
33
|
KEY: "$xtm",
|
|
34
34
|
// 父应用注入子应用实例的key
|
|
@@ -45,23 +45,48 @@ const c = {
|
|
|
45
45
|
URL_PARAM_PREFIX: "__XT_MICRO_"
|
|
46
46
|
// 微应用在 url 参数中的前缀
|
|
47
47
|
};
|
|
48
|
-
function
|
|
48
|
+
function p(e, t = window.location.href) {
|
|
49
49
|
e = e.replace(/[\[\]]/g, "\\$&");
|
|
50
50
|
var n = new RegExp("[?&]" + e + "(=([^&#]*)|&|#|$)"), r = n.exec(t);
|
|
51
51
|
return r ? r[2] ? decodeURIComponent(r[2].replace(/\+/g, " ")).trim() : "" : null;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function O(e, t, n) {
|
|
54
54
|
try {
|
|
55
55
|
return e && (n && e.startsWith("#") ? e : new URL(e, t).href);
|
|
56
56
|
} catch (r) {
|
|
57
57
|
return e;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
const
|
|
62
|
-
return t =
|
|
60
|
+
function B(e) {
|
|
61
|
+
const t = window.document.createElement("a");
|
|
62
|
+
return t.href = e, t.href = t.href, t;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
function j(e) {
|
|
65
|
+
const t = e.search || "";
|
|
66
|
+
return [...new URLSearchParams(t).entries()].reduce((n, r) => (n[r[0]] = r[1], n), {});
|
|
67
|
+
}
|
|
68
|
+
function F(e, t) {
|
|
69
|
+
let n = null;
|
|
70
|
+
return function(...r) {
|
|
71
|
+
const o = this;
|
|
72
|
+
n && clearTimeout(n), n = setTimeout(() => {
|
|
73
|
+
e.apply(o, r);
|
|
74
|
+
}, t);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function E(e, t, n) {
|
|
78
|
+
const [r, o] = e.split("#"), a = new URL(r), s = a.searchParams;
|
|
79
|
+
return t = c.URL_PARAM_PREFIX + t, s.has(t) ? s.set(t, n) : s.append(t, n), o && (a.hash = o), a.search = s.toString(), a.toString();
|
|
80
|
+
}
|
|
81
|
+
const re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
82
|
+
__proto__: null,
|
|
83
|
+
addOrReplaceUrlParam: E,
|
|
84
|
+
anchorElementGenerator: B,
|
|
85
|
+
debounce: F,
|
|
86
|
+
getAbsolutePath: O,
|
|
87
|
+
getAnchorElementQueryMap: j,
|
|
88
|
+
getQueryParameter: p
|
|
89
|
+
}, Symbol.toStringTag, { value: "Module" })), M = P(!1);
|
|
65
90
|
Object.defineProperty(window, c.IS_MICRO, {
|
|
66
91
|
get: function() {
|
|
67
92
|
return M.value;
|
|
@@ -70,51 +95,62 @@ Object.defineProperty(window, c.IS_MICRO, {
|
|
|
70
95
|
M.value = e;
|
|
71
96
|
}
|
|
72
97
|
});
|
|
73
|
-
const w = (e) => `${c.DOM_ID_PREFIX}${e}`,
|
|
98
|
+
const w = (e) => `${c.DOM_ID_PREFIX}${e}`, K = (e) => {
|
|
74
99
|
function t(i) {
|
|
75
100
|
return i !== null && typeof i == "object" && !Array.isArray(i);
|
|
76
101
|
}
|
|
77
|
-
const n = typeof e.params == "function" ? e.params() : t(e.params) ? e.params : {}, r = typeof e.token == "function" ? e.token() : t(e.token) ? e.token : "", o = new URL(
|
|
78
|
-
|
|
79
|
-
|
|
102
|
+
const n = typeof e.params == "function" ? e.params() : t(e.params) ? e.params : {}, r = typeof e.token == "function" ? e.token() : t(e.token) ? e.token : "", o = new URL(
|
|
103
|
+
e.url.indexOf("http") > -1 ? e.url : window.location.origin + e.url
|
|
104
|
+
), a = p(c.URL_PARAM_PREFIX + e.name);
|
|
105
|
+
if (a) {
|
|
106
|
+
const i = O(a, e.url, !0);
|
|
80
107
|
if (i) {
|
|
81
108
|
const l = new URL(i);
|
|
82
|
-
l.searchParams.forEach((
|
|
83
|
-
o.searchParams.set(
|
|
109
|
+
l.searchParams.forEach((C, S) => {
|
|
110
|
+
o.searchParams.set(S, C);
|
|
84
111
|
}), o.hash = l.hash;
|
|
85
112
|
}
|
|
86
113
|
}
|
|
87
114
|
if (o.searchParams.set(c.IS_MICRO, !0 + ""), o.searchParams.set(c.MICRO_NAME, e.name), r && o.searchParams.set(c.MICRO_TOKEN, r), n)
|
|
88
115
|
for (let i of Object.keys(n))
|
|
89
116
|
o.searchParams.set(i, n[i]);
|
|
90
|
-
const
|
|
91
|
-
return
|
|
92
|
-
},
|
|
117
|
+
const s = new URL(window.location.href);
|
|
118
|
+
return s.searchParams.delete(e.name), window.history.replaceState({}, "", s.href), o.href;
|
|
119
|
+
}, D = () => {
|
|
93
120
|
const e = document.createElement("div");
|
|
94
|
-
return e.innerHTML = "应用加载中...", e.style.textAlign = "center", e.style.lineHeight = "100px", e.style.fontSize = "20px", e.style.color = "#999", e.style.position = "absolute", e.style.top = "0", e.style.left = "0", e.style.right = "0", e.style.bottom = "0", e.style.zIndex = "999", e.style.background = "
|
|
95
|
-
},
|
|
121
|
+
return e.innerHTML = "应用加载中...", e.style.textAlign = "center", e.style.lineHeight = "100px", e.style.fontSize = "20px", e.style.color = "#999", e.style.position = "absolute", e.style.top = "0", e.style.left = "0", e.style.right = "0", e.style.bottom = "0", e.style.zIndex = "999", e.style.background = "transparent", e.style["mix-blend-mode"] = "difference", e;
|
|
122
|
+
}, W = (e) => {
|
|
96
123
|
e.style.opacity = "0", setTimeout(() => {
|
|
97
124
|
e.remove();
|
|
98
125
|
}, 500);
|
|
99
|
-
},
|
|
126
|
+
}, q = (e) => {
|
|
100
127
|
const t = document.createElement("iframe");
|
|
101
128
|
t.id = w(e.app.name);
|
|
102
|
-
const n =
|
|
103
|
-
t.src = n, t.style.width = "100%", t.style.height = "100%", t.style.border = "none", t.style.margin = "0", t.style.padding = "0", t.
|
|
129
|
+
const n = K(e.app);
|
|
130
|
+
t.src = n, t.style.width = "100%", t.style.height = "100%", t.style.border = "none", t.style.margin = "0", t.style.padding = "0", t.style.backgroundColor = "transparent", t.addEventListener(
|
|
131
|
+
"load",
|
|
132
|
+
(o) => e.onLoad.call(e, o)
|
|
133
|
+
), t.addEventListener(
|
|
134
|
+
"error",
|
|
135
|
+
(o) => e.onError.call(e, o)
|
|
136
|
+
), t.addEventListener(
|
|
137
|
+
"unload",
|
|
138
|
+
(o) => e.onUnload.call(e, o)
|
|
139
|
+
);
|
|
104
140
|
const r = new MutationObserver((o) => {
|
|
105
|
-
o.forEach((
|
|
106
|
-
Array.from(
|
|
141
|
+
o.forEach((a) => {
|
|
142
|
+
Array.from(a.removedNodes).includes(t) && (e.onUnload(new Event("unload")), r.disconnect());
|
|
107
143
|
});
|
|
108
144
|
});
|
|
109
145
|
return r.observe(e.panel, { childList: !0 }), t;
|
|
110
146
|
};
|
|
111
|
-
class
|
|
147
|
+
class z {
|
|
112
148
|
constructor(t) {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
149
|
+
u(this, "app");
|
|
150
|
+
u(this, "dom");
|
|
151
|
+
u(this, "panel");
|
|
152
|
+
u(this, "loading");
|
|
153
|
+
u(this, "loadingTimer");
|
|
118
154
|
return this.app = t, this.dom = void 0, this.panel = void 0, t.preload && this.preload(), this;
|
|
119
155
|
}
|
|
120
156
|
mount(t, n = !1) {
|
|
@@ -122,10 +158,10 @@ class D {
|
|
|
122
158
|
if (t ? (typeof t == "string" ? r = document.querySelector(t) : r = t, r.innerHTML = "") : r = document.body, r) {
|
|
123
159
|
this.panel = r;
|
|
124
160
|
let o = document.getElementById(w(this.app.name));
|
|
125
|
-
o || (o =
|
|
126
|
-
const
|
|
161
|
+
o || (o = q(this), this.dom = o), n ? o.style.display = "none" : o.style.removeProperty("display");
|
|
162
|
+
const a = D();
|
|
127
163
|
this.loadingTimer = setTimeout(() => {
|
|
128
|
-
this.loading =
|
|
164
|
+
this.loading = a, r.appendChild(a);
|
|
129
165
|
}, 1e3), r.appendChild(o);
|
|
130
166
|
} else
|
|
131
167
|
throw new Error("el not found");
|
|
@@ -160,7 +196,7 @@ class D {
|
|
|
160
196
|
this.app = d(d({}, this.app), t);
|
|
161
197
|
}
|
|
162
198
|
onLoad(t) {
|
|
163
|
-
console.debug("app onLoad", this.app.name, t), this.loadingTimer && clearTimeout(this.loadingTimer), this.loading &&
|
|
199
|
+
console.debug("app onLoad", this.app.name, t, this.loading), this.loadingTimer && clearTimeout(this.loadingTimer), this.loading && W(this.loading), G(this), this.app.onLoad && this.app.onLoad(t, this);
|
|
164
200
|
}
|
|
165
201
|
onUnload(t) {
|
|
166
202
|
console.debug("app onUnload", this.app.name, t), this.app.onUnload && this.app.onUnload(t, this);
|
|
@@ -169,7 +205,7 @@ class D {
|
|
|
169
205
|
console.error("app onError", this.app.name, t), this.app.onError && this.app.onError(t, this);
|
|
170
206
|
}
|
|
171
207
|
}
|
|
172
|
-
const
|
|
208
|
+
const G = (e) => {
|
|
173
209
|
var t, n;
|
|
174
210
|
(n = (t = e.dom) == null ? void 0 : t.contentWindow) == null || n.postMessage(
|
|
175
211
|
{
|
|
@@ -184,55 +220,66 @@ const W = (e) => {
|
|
|
184
220
|
},
|
|
185
221
|
"*"
|
|
186
222
|
);
|
|
187
|
-
},
|
|
223
|
+
}, Q = () => {
|
|
188
224
|
window.addEventListener("message", (e) => {
|
|
189
225
|
if (e.data.cmd === "$xt/micro/sync") {
|
|
190
|
-
const t = [
|
|
191
|
-
|
|
192
|
-
|
|
226
|
+
const t = [
|
|
227
|
+
c.IS_MICRO,
|
|
228
|
+
c.MICRO_NAME,
|
|
229
|
+
c.MICRO_TOKEN
|
|
230
|
+
], n = new URL(
|
|
231
|
+
window.decodeURIComponent(e.data.data.url),
|
|
232
|
+
e.origin
|
|
233
|
+
);
|
|
234
|
+
for (let a of t)
|
|
235
|
+
n.searchParams.delete(a);
|
|
193
236
|
const r = new URL(window.location.href);
|
|
194
|
-
r.searchParams.forEach((
|
|
195
|
-
|
|
237
|
+
r.searchParams.forEach((a, s) => {
|
|
238
|
+
s.startsWith(c.URL_PARAM_PREFIX) && r.searchParams.delete(s);
|
|
196
239
|
});
|
|
197
|
-
const o =
|
|
240
|
+
const o = E(
|
|
241
|
+
r.href,
|
|
242
|
+
e.data.data.name,
|
|
243
|
+
n.href
|
|
244
|
+
);
|
|
198
245
|
window.history.replaceState(null, "", o);
|
|
199
246
|
}
|
|
200
247
|
});
|
|
201
|
-
},
|
|
202
|
-
const n =
|
|
248
|
+
}, ae = (...t) => I(void 0, [...t], function* (e = {}) {
|
|
249
|
+
const n = p(c.IS_MICRO), r = p(c.MICRO_NAME);
|
|
203
250
|
n && (window[c.IS_MICRO] = !0);
|
|
204
|
-
function o(
|
|
251
|
+
function o(s) {
|
|
205
252
|
var i = document.styleSheets[0];
|
|
206
253
|
if (!i) {
|
|
207
254
|
var l = document.createElement("style");
|
|
208
255
|
document.head.appendChild(l), i = l.sheet;
|
|
209
256
|
}
|
|
210
|
-
i.insertRule(
|
|
257
|
+
i.insertRule(s, i.cssRules.length);
|
|
211
258
|
}
|
|
212
|
-
window[c.IS_MICRO] && e.hideHeaderCssSelector && (Array.isArray(e.hideHeaderCssSelector) ? e.hideHeaderCssSelector.forEach((
|
|
213
|
-
o(`${
|
|
214
|
-
}) : o(`${e.hideHeaderCssSelector} { display: none !important; }`)), window.addEventListener("message", (
|
|
215
|
-
|
|
216
|
-
}),
|
|
217
|
-
const
|
|
218
|
-
e.authHandler &&
|
|
259
|
+
window[c.IS_MICRO] && e.hideHeaderCssSelector && (Array.isArray(e.hideHeaderCssSelector) ? e.hideHeaderCssSelector.forEach((s) => {
|
|
260
|
+
o(`${s} { display: none !important; }`);
|
|
261
|
+
}) : o(`${e.hideHeaderCssSelector} { display: none !important; }`)), window.addEventListener("message", (s) => {
|
|
262
|
+
s.data.cmd === `$xt/micro/${r}` && (window[c.MICRO_APP] = m(d({}, s.data.data), { mainBaseURL: s.origin }), _());
|
|
263
|
+
}), Y(window);
|
|
264
|
+
const a = p(c.MICRO_TOKEN);
|
|
265
|
+
e.authHandler && a && (yield e.authHandler(a));
|
|
219
266
|
});
|
|
220
|
-
function
|
|
267
|
+
function Y(e) {
|
|
221
268
|
const t = e.history, n = t.pushState, r = t.replaceState;
|
|
222
|
-
t.pushState = function(o,
|
|
269
|
+
t.pushState = function(o, a, s) {
|
|
223
270
|
const i = m(d(d({}, t.state || {}), o), {
|
|
224
271
|
// 添加新数据
|
|
225
272
|
_patchedByParent: !0
|
|
226
273
|
// 可选:标记这是被父窗口修改的状态
|
|
227
274
|
});
|
|
228
|
-
n.call(t, i,
|
|
229
|
-
}, t.replaceState = function(o,
|
|
275
|
+
n.call(t, i, a, s), _();
|
|
276
|
+
}, t.replaceState = function(o, a, s) {
|
|
230
277
|
const i = m(d(d({}, t.state || {}), o), {
|
|
231
278
|
// 添加新数据
|
|
232
279
|
_patchedByParent: !0
|
|
233
280
|
// 可选:标记这是被父窗口修改的状态
|
|
234
281
|
});
|
|
235
|
-
r.call(t, i,
|
|
282
|
+
r.call(t, i, a, s), _();
|
|
236
283
|
};
|
|
237
284
|
}
|
|
238
285
|
function _() {
|
|
@@ -248,65 +295,66 @@ function _() {
|
|
|
248
295
|
}, n);
|
|
249
296
|
}
|
|
250
297
|
let f = {};
|
|
251
|
-
const
|
|
298
|
+
const J = {
|
|
252
299
|
url: "",
|
|
253
300
|
name: "",
|
|
254
301
|
sync: !0
|
|
255
|
-
},
|
|
302
|
+
}, se = (e) => {
|
|
256
303
|
if (!e.url || e.url === "" || e.url === "undefined") {
|
|
257
304
|
console.error("app url is required", e);
|
|
258
305
|
return;
|
|
259
306
|
}
|
|
260
|
-
const t = Object.assign({},
|
|
307
|
+
const t = Object.assign({}, J, e);
|
|
261
308
|
return f[e.name] = m(d({}, t), {
|
|
262
|
-
instance: new
|
|
309
|
+
instance: new z(e)
|
|
263
310
|
}), f[e.name];
|
|
264
|
-
}, R = (e) => f[e],
|
|
311
|
+
}, R = (e) => f[e], V = (e, t) => f[e.name] = d(d({}, e), t), Z = (e, t) => new Promise((n, r) => {
|
|
265
312
|
let o = R(e);
|
|
266
|
-
o ? (t && (o.instance.changeOptions(t), o =
|
|
267
|
-
}),
|
|
313
|
+
o ? (t && (o.instance.changeOptions(t), o = V(o, t)), o.preload ? o.instance.preloadRender(o.el) : o.instance.mount(o.el), n(o)) : r("app not found");
|
|
314
|
+
}), ee = (e) => {
|
|
268
315
|
let t = R(e);
|
|
269
316
|
t && t.instance.unmount();
|
|
270
|
-
},
|
|
317
|
+
}, ie = (e) => {
|
|
271
318
|
let t = R(e);
|
|
272
319
|
t && t.instance.reload();
|
|
273
|
-
},
|
|
320
|
+
}, te = /* @__PURE__ */ v({
|
|
274
321
|
__name: "XTMicroView",
|
|
275
322
|
props: {
|
|
276
323
|
appId: String
|
|
277
324
|
},
|
|
278
325
|
setup(e) {
|
|
279
326
|
const t = e, n = P(), r = () => {
|
|
280
|
-
t.appId &&
|
|
327
|
+
t.appId && Z(t.appId, {
|
|
281
328
|
el: n.value
|
|
282
329
|
}).then((o) => {
|
|
283
330
|
console.debug("app mounted", t.appId);
|
|
284
331
|
});
|
|
285
332
|
};
|
|
286
|
-
return
|
|
287
|
-
o !==
|
|
288
|
-
}),
|
|
333
|
+
return x(() => t.appId, (o, a) => {
|
|
334
|
+
o !== a && a && ee(a), r();
|
|
335
|
+
}), k(() => {
|
|
289
336
|
r();
|
|
290
|
-
}),
|
|
337
|
+
}), X(() => {
|
|
291
338
|
console.debug("app unmount", t.appId);
|
|
292
|
-
}), (o,
|
|
339
|
+
}), (o, a) => ($(), H("div", N({
|
|
293
340
|
ref_key: "refPanel",
|
|
294
341
|
ref: n
|
|
295
342
|
}, o.$attrs, { class: "xt-micro" }), null, 16));
|
|
296
343
|
}
|
|
297
344
|
});
|
|
298
|
-
const
|
|
345
|
+
const ce = {
|
|
299
346
|
install: (e, t = {}) => {
|
|
300
|
-
e.component("xt-micro-view",
|
|
347
|
+
e.component("xt-micro-view", te), Q();
|
|
301
348
|
}
|
|
302
349
|
};
|
|
303
350
|
export {
|
|
304
|
-
|
|
305
|
-
|
|
351
|
+
te as XTMicroView,
|
|
352
|
+
ce as default,
|
|
306
353
|
R as getApp,
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
354
|
+
ae as microInit,
|
|
355
|
+
ie as reloadApp,
|
|
356
|
+
se as setupApp,
|
|
357
|
+
Z as startApp,
|
|
358
|
+
ee as stopApp,
|
|
359
|
+
re as utils
|
|
312
360
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
2
|
appId: StringConstructor;
|
|
3
|
-
}
|
|
3
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
4
4
|
appId: StringConstructor;
|
|
5
|
-
}
|
|
5
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
6
|
+
refPanel: HTMLDivElement;
|
|
7
|
+
}, any>;
|
|
6
8
|
export default _default;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { App } from 'vue';
|
|
2
2
|
import { default as XTMicroView } from './components/XTMicroView.vue';
|
|
3
|
-
export { XTMicroView };
|
|
4
3
|
export * from './api';
|
|
4
|
+
import * as utils from './utils';
|
|
5
|
+
export { XTMicroView, utils };
|
|
5
6
|
declare const _default: {
|
|
6
7
|
install: (app: App, _options?: any) => void;
|
|
7
8
|
};
|
package/dist/types/parent.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xingtukeji/micro",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
8
11
|
"author": "",
|
|
9
12
|
"license": "ISC",
|
|
10
13
|
"publishConfig": {
|
|
@@ -12,7 +15,7 @@
|
|
|
12
15
|
"registry": "https://registry.npmjs.org/"
|
|
13
16
|
},
|
|
14
17
|
"devDependencies": {
|
|
15
|
-
"vite-plugin-dts": "^4.5.
|
|
18
|
+
"vite-plugin-dts": "^4.5.4"
|
|
16
19
|
},
|
|
17
20
|
"scripts": {
|
|
18
21
|
"build": "vite build"
|