@opentiny/tiny-engine-toolbar-lock 2.3.1 → 2.4.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/index.js +13 -13
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { reactive as N, computed as m, resolveComponent as _, createBlock as b, createCommentVNode as S, openBlock as T } from "vue";
|
|
2
2
|
import { getMetaApi as x, META_SERVICE as C, useCanvas as M, useLayout as $, useBlock as A, useNotify as k } from "@opentiny/tiny-engine-meta-register";
|
|
3
3
|
import { constants as B } from "@opentiny/tiny-engine-utils";
|
|
4
4
|
import { ToolbarBase as h } from "@opentiny/tiny-engine-common";
|
|
5
|
-
const v = (e) => x(C.Http).get(`app-center/api/apps/canvas/lock?${e}`), E =
|
|
6
|
-
const o = e.__vccOpts || e;
|
|
7
|
-
for (const [c, s] of a)
|
|
8
|
-
o[c] = s;
|
|
9
|
-
return o;
|
|
10
|
-
}, { COMPONENT_NAME: L, PAGE_STATUS: t } = B, d = {
|
|
5
|
+
const v = (e) => x(C.Http).get(`app-center/api/apps/canvas/lock?${e}`), { COMPONENT_NAME: E, PAGE_STATUS: t } = B, d = {
|
|
11
6
|
block: "区块",
|
|
12
7
|
page: "页面"
|
|
13
8
|
}, g = {
|
|
@@ -26,7 +21,7 @@ const v = (e) => x(C.Http).get(`app-center/api/apps/canvas/lock?${e}`), E = (e,
|
|
|
26
21
|
currentOptName: "锁定",
|
|
27
22
|
nextOptName: "解锁"
|
|
28
23
|
}
|
|
29
|
-
},
|
|
24
|
+
}, L = {
|
|
30
25
|
components: {
|
|
31
26
|
ToolbarBase: h
|
|
32
27
|
},
|
|
@@ -37,7 +32,7 @@ const v = (e) => x(C.Http).get(`app-center/api/apps/canvas/lock?${e}`), E = (e,
|
|
|
37
32
|
}
|
|
38
33
|
},
|
|
39
34
|
setup(e) {
|
|
40
|
-
const { pageState: a } = M(), { layoutState: o } = $(), { getCurrentBlock: c } = A(), s =
|
|
35
|
+
const { pageState: a } = M(), { layoutState: o } = $(), { getCurrentBlock: c } = A(), s = N({
|
|
41
36
|
status: m(() => o.pageStatus.state),
|
|
42
37
|
isGuest: m(() => o.pageStatus.state === t.Guest),
|
|
43
38
|
type: "",
|
|
@@ -82,18 +77,23 @@ const v = (e) => x(C.Http).get(`app-center/api/apps/canvas/lock?${e}`), E = (e,
|
|
|
82
77
|
if (s.disabled)
|
|
83
78
|
return;
|
|
84
79
|
const l = s.status === t.Occupy || s.status === t.Lock ? t.Release : t.Occupy;
|
|
85
|
-
a.currentSchema = {}, a.properties = null, s.disabled = !0, a.pageSchema.componentName !==
|
|
80
|
+
a.currentSchema = {}, a.properties = null, s.disabled = !0, a.pageSchema.componentName !== E.Block ? p(a.currentPage.id, "page", l) : p(c().id, "block", l);
|
|
86
81
|
},
|
|
87
82
|
PAGE_STATUS: t,
|
|
88
83
|
statusMessageMap: g,
|
|
89
84
|
iconName: y
|
|
90
85
|
};
|
|
91
86
|
}
|
|
87
|
+
}, P = (e, a) => {
|
|
88
|
+
const o = e.__vccOpts || e;
|
|
89
|
+
for (const [c, s] of a)
|
|
90
|
+
o[c] = s;
|
|
91
|
+
return o;
|
|
92
92
|
};
|
|
93
93
|
function G(e, a, o, c, s, y) {
|
|
94
94
|
var u;
|
|
95
|
-
const p =
|
|
96
|
-
return c.state.isGuest ?
|
|
95
|
+
const p = _("toolbar-base");
|
|
96
|
+
return c.state.isGuest ? S("", !0) : (T(), b(p, {
|
|
97
97
|
key: 0,
|
|
98
98
|
icon: c.iconName,
|
|
99
99
|
content: (u = c.statusMessageMap[c.state.status]) == null ? void 0 : u.nextOptName,
|
|
@@ -101,7 +101,7 @@ function G(e, a, o, c, s, y) {
|
|
|
101
101
|
onClickApi: c.lockOrUnlock
|
|
102
102
|
}, null, 8, ["icon", "content", "options", "onClickApi"]));
|
|
103
103
|
}
|
|
104
|
-
const U = /* @__PURE__ */
|
|
104
|
+
const U = /* @__PURE__ */ P(L, [["render", G]]), R = {
|
|
105
105
|
id: "engine.toolbars.lock",
|
|
106
106
|
title: "lock",
|
|
107
107
|
type: "toolbars",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-toolbar-lock",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
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-meta-register": "2.
|
|
30
|
-
"@opentiny/tiny-engine-utils": "2.
|
|
28
|
+
"@opentiny/tiny-engine-common": "2.4.0",
|
|
29
|
+
"@opentiny/tiny-engine-meta-register": "2.4.0",
|
|
30
|
+
"@opentiny/tiny-engine-utils": "2.4.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.
|
|
33
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.4.0",
|
|
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.20.0",
|
|
40
40
|
"vue": "^3.4.15"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "477aa411da11a4f95712e3e5c251d97cae23f4ad"
|
|
43
43
|
}
|