@opentiny/tiny-engine-toolbar-clean 2.5.0-alpha.0 → 2.5.0-alpha.2
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 +53 -72
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { useCanvas as
|
|
3
|
-
import { constants as
|
|
4
|
-
import { ToolbarBase as
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
title: "clean",
|
|
9
|
-
options: {
|
|
10
|
-
icon: {
|
|
11
|
-
default: "clear"
|
|
12
|
-
},
|
|
13
|
-
renderType: "icon"
|
|
14
|
-
}
|
|
15
|
-
}, {
|
|
16
|
-
PAGE_STATUS: r
|
|
17
|
-
} = m, C = {
|
|
1
|
+
import { ref as l, watch as p, createVNode as s, resolveComponent as u, createElementBlock as d, openBlock as m } from "vue";
|
|
2
|
+
import { useCanvas as f, useModal as _, useLayout as v } from "@opentiny/tiny-engine-meta-register";
|
|
3
|
+
import { constants as b } from "@opentiny/tiny-engine-utils";
|
|
4
|
+
import { ToolbarBase as k } from "@opentiny/tiny-engine-common";
|
|
5
|
+
const {
|
|
6
|
+
PAGE_STATUS: i
|
|
7
|
+
} = b, y = {
|
|
18
8
|
components: {
|
|
19
|
-
ToolbarBase:
|
|
9
|
+
ToolbarBase: k
|
|
20
10
|
},
|
|
21
11
|
props: {
|
|
22
12
|
options: {
|
|
@@ -26,69 +16,60 @@ const f = {
|
|
|
26
16
|
},
|
|
27
17
|
setup() {
|
|
28
18
|
const {
|
|
29
|
-
pageState:
|
|
30
|
-
clearCanvas:
|
|
31
|
-
} =
|
|
19
|
+
pageState: t,
|
|
20
|
+
clearCanvas: c
|
|
21
|
+
} = f(), o = l(t.isLock), {
|
|
32
22
|
confirm: e
|
|
33
|
-
} =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, {
|
|
49
|
-
metaData: {
|
|
50
|
-
id: `${f.id}.clean`
|
|
23
|
+
} = _();
|
|
24
|
+
return p(() => t.isLock, (n) => o.value = n), {
|
|
25
|
+
clean: () => {
|
|
26
|
+
var n, a;
|
|
27
|
+
[i.Occupy, i.Guest].includes((a = (n = v().layoutState) == null ? void 0 : n.pageStatus) == null ? void 0 : a.state) && (o.value || e({
|
|
28
|
+
title: "提示",
|
|
29
|
+
message: () => [s("div", {
|
|
30
|
+
class: "modal-content"
|
|
31
|
+
}, [s("div", {
|
|
32
|
+
class: "wrap"
|
|
33
|
+
}, [s("span", null, ["您确定要清除屏幕吗?"])])])],
|
|
34
|
+
exec: () => {
|
|
35
|
+
c();
|
|
36
|
+
}
|
|
37
|
+
}));
|
|
51
38
|
},
|
|
52
|
-
|
|
53
|
-
pageState: o,
|
|
54
|
-
clearCanvas: n,
|
|
55
|
-
isLock: t,
|
|
56
|
-
confirm: e,
|
|
57
|
-
clean: c,
|
|
58
|
-
useCanvas: l,
|
|
59
|
-
useLayout: u,
|
|
60
|
-
useModal: p,
|
|
61
|
-
constants: m,
|
|
62
|
-
ToolbarBase: d,
|
|
63
|
-
PAGE_STATUS: r
|
|
64
|
-
})
|
|
65
|
-
});
|
|
66
|
-
return {
|
|
67
|
-
clean: c,
|
|
68
|
-
isLock: t
|
|
39
|
+
isLock: o
|
|
69
40
|
};
|
|
70
41
|
}
|
|
71
|
-
},
|
|
72
|
-
const
|
|
73
|
-
for (const [e,
|
|
74
|
-
|
|
75
|
-
return
|
|
76
|
-
},
|
|
77
|
-
function
|
|
78
|
-
const
|
|
79
|
-
return
|
|
80
|
-
|
|
42
|
+
}, C = (t, c) => {
|
|
43
|
+
const o = t.__vccOpts || t;
|
|
44
|
+
for (const [e, r] of c)
|
|
45
|
+
o[e] = r;
|
|
46
|
+
return o;
|
|
47
|
+
}, g = { class: "toolbar-itm-clean" };
|
|
48
|
+
function x(t, c, o, e, r, n) {
|
|
49
|
+
const a = u("toolbar-base");
|
|
50
|
+
return m(), d("div", g, [
|
|
51
|
+
s(a, {
|
|
81
52
|
content: "清除屏幕",
|
|
82
|
-
icon:
|
|
83
|
-
options:
|
|
53
|
+
icon: o.options.icon.default || o.options.icon,
|
|
54
|
+
options: o.options,
|
|
84
55
|
onClickApi: e.clean
|
|
85
56
|
}, null, 8, ["icon", "options", "onClickApi"])
|
|
86
57
|
]);
|
|
87
58
|
}
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
59
|
+
const S = /* @__PURE__ */ C(y, [["render", x]]), A = {
|
|
60
|
+
id: "engine.toolbars.clean",
|
|
61
|
+
type: "toolbars",
|
|
62
|
+
title: "clean",
|
|
63
|
+
options: {
|
|
64
|
+
icon: {
|
|
65
|
+
default: "clear"
|
|
66
|
+
},
|
|
67
|
+
renderType: "icon"
|
|
68
|
+
}
|
|
69
|
+
}, B = {
|
|
70
|
+
...A,
|
|
71
|
+
entry: S
|
|
91
72
|
};
|
|
92
73
|
export {
|
|
93
|
-
|
|
74
|
+
B as default
|
|
94
75
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-toolbar-clean",
|
|
3
|
-
"version": "2.5.0-alpha.
|
|
3
|
+
"version": "2.5.0-alpha.2",
|
|
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.5.0-alpha.
|
|
29
|
-
"@opentiny/tiny-engine-meta-register": "2.5.0-alpha.
|
|
30
|
-
"@opentiny/tiny-engine-utils": "2.5.0-alpha.
|
|
28
|
+
"@opentiny/tiny-engine-common": "2.5.0-alpha.2",
|
|
29
|
+
"@opentiny/tiny-engine-meta-register": "2.5.0-alpha.2",
|
|
30
|
+
"@opentiny/tiny-engine-utils": "2.5.0-alpha.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.5.0-alpha.
|
|
33
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.5.0-alpha.2",
|
|
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": "f5707c379397bffc9a63c50c695f3ee3340ad0c6"
|
|
43
43
|
}
|