@opentiny/tiny-engine-toolbar-lang 2.1.0-rc.0 → 2.2.0-beta.3
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 +10 -10
- package/dist/style.css +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { getCurrentScope as
|
|
2
|
+
import { getCurrentScope as m, onScopeDispose as I, getCurrentInstance as w, onMounted as y, nextTick as h, ref as r, watch as E, resolveComponent as B, openBlock as N, createBlock as P } from "vue";
|
|
3
3
|
import { ToolbarBase as S } from "@opentiny/tiny-engine-common";
|
|
4
4
|
import { constants as T } from "@opentiny/tiny-engine-utils";
|
|
5
5
|
var d;
|
|
@@ -9,26 +9,26 @@ function L(e) {
|
|
|
9
9
|
return e;
|
|
10
10
|
}
|
|
11
11
|
function Q(e) {
|
|
12
|
-
return
|
|
12
|
+
return m() ? (I(e), !0) : !1;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function b(e, n = !0) {
|
|
15
15
|
w() ? y(e) : n ? e() : h(e);
|
|
16
16
|
}
|
|
17
17
|
const x = O ? window : void 0;
|
|
18
18
|
function k(e, n = !1) {
|
|
19
19
|
const t = r(), a = () => t.value = !!e();
|
|
20
|
-
return a(),
|
|
20
|
+
return a(), b(a, n), t;
|
|
21
21
|
}
|
|
22
22
|
const A = (e) => {
|
|
23
23
|
const {
|
|
24
24
|
name: n,
|
|
25
25
|
window: t = x
|
|
26
|
-
} = e, a = k(() => t && "BroadcastChannel" in t), o = r(!1), s = r(), l = r(), i = r(null),
|
|
26
|
+
} = e, a = k(() => t && "BroadcastChannel" in t), o = r(!1), s = r(), l = r(), i = r(null), C = (u) => {
|
|
27
27
|
s.value && s.value.postMessage(u);
|
|
28
28
|
}, c = () => {
|
|
29
29
|
s.value && s.value.close(), o.value = !0;
|
|
30
30
|
};
|
|
31
|
-
return a.value &&
|
|
31
|
+
return a.value && b(() => {
|
|
32
32
|
i.value = null, s.value = new BroadcastChannel(n), s.value.addEventListener("message", (u) => {
|
|
33
33
|
l.value = u.data;
|
|
34
34
|
}, { passive: !0 }), s.value.addEventListener("messageerror", (u) => {
|
|
@@ -42,7 +42,7 @@ const A = (e) => {
|
|
|
42
42
|
isSupported: a,
|
|
43
43
|
channel: s,
|
|
44
44
|
data: l,
|
|
45
|
-
post:
|
|
45
|
+
post: C,
|
|
46
46
|
close: c,
|
|
47
47
|
error: i,
|
|
48
48
|
isClosed: o
|
|
@@ -54,7 +54,7 @@ var v;
|
|
|
54
54
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
55
55
|
})(v || (v = {}));
|
|
56
56
|
var j = Object.defineProperty, _ = Object.getOwnPropertySymbols, D = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable, g = (e, n, t) => n in e ? j(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t, M = (e, n) => {
|
|
57
|
-
for (var t in n
|
|
57
|
+
for (var t in n)
|
|
58
58
|
D.call(n, t) && g(e, t, n[t]);
|
|
59
59
|
if (_)
|
|
60
60
|
for (var t of _(n))
|
|
@@ -136,13 +136,13 @@ const U = (e, n) => {
|
|
|
136
136
|
function F(e, n, t, a, o, s) {
|
|
137
137
|
const l = B("toolbar-base");
|
|
138
138
|
return N(), P(l, {
|
|
139
|
-
content: "
|
|
139
|
+
content: "中英文切换",
|
|
140
140
|
icon: t.options.icon.default || t.options.icon,
|
|
141
141
|
options: t.options,
|
|
142
142
|
onClickApi: a.changeLang
|
|
143
143
|
}, null, 8, ["icon", "options", "onClickApi"]);
|
|
144
144
|
}
|
|
145
|
-
const G = /* @__PURE__ */ U(z, [["render", F], ["__scopeId", "data-v-
|
|
145
|
+
const G = /* @__PURE__ */ U(z, [["render", F], ["__scopeId", "data-v-5e819ba2"]]), V = {
|
|
146
146
|
id: "engine.toolbars.lang",
|
|
147
147
|
type: "toolbars",
|
|
148
148
|
title: "lang",
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.change-lang-box svg[data-v-
|
|
1
|
+
.change-lang-box svg[data-v-5e819ba2]{color:var(--ti-lowcode-toolbar-title-color);width:18px;height:18px}.change-lang-box svg[data-v-5e819ba2]:hover{opacity:.75}.icon[data-v-5e819ba2]{color:var(--ti-lowcode-toolbar-title-color)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-toolbar-lang",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0-beta.3",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"homepage": "https://opentiny.design/tiny-engine",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@opentiny/tiny-engine-common": "2.
|
|
29
|
-
"@opentiny/tiny-engine-utils": "2.
|
|
28
|
+
"@opentiny/tiny-engine-common": "2.2.0-beta.3",
|
|
29
|
+
"@opentiny/tiny-engine-utils": "2.2.0-beta.3",
|
|
30
30
|
"@vueuse/core": "^9.6.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.
|
|
33
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.2.0-beta.3",
|
|
34
34
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
35
35
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
36
36
|
"vite": "^5.4.2"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@opentiny/vue": "^3.14.0",
|
|
40
40
|
"vue": "^3.4.15"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "04459f34e5ebdaca92355f7698cd4fea19f7ef95"
|
|
43
43
|
}
|