@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.
Files changed (2) hide show
  1. package/dist/index.js +53 -72
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1,22 +1,12 @@
1
- import { ref as _, watch as v, createVNode as i, resolveComponent as b, createElementBlock as y, openBlock as k } from "vue";
2
- import { useCanvas as l, useModal as p, callEntry as x, useLayout as u } from "@opentiny/tiny-engine-meta-register";
3
- import { constants as m } from "@opentiny/tiny-engine-utils";
4
- import { ToolbarBase as d } from "@opentiny/tiny-engine-common";
5
- const f = {
6
- id: "engine.toolbars.clean",
7
- type: "toolbars",
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: d
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: o,
30
- clearCanvas: n
31
- } = l(), t = _(o.isLock), {
19
+ pageState: t,
20
+ clearCanvas: c
21
+ } = f(), o = l(t.isLock), {
32
22
  confirm: e
33
- } = p();
34
- v(() => o.isLock, (a) => t.value = a);
35
- const c = x(() => {
36
- var a, s;
37
- [r.Occupy, r.Guest].includes((s = (a = u().layoutState) == null ? void 0 : a.pageStatus) == null ? void 0 : s.state) && (t.value || e({
38
- title: "提示",
39
- message: () => [i("div", {
40
- class: "modal-content"
41
- }, [i("div", {
42
- class: "wrap"
43
- }, [i("span", null, ["您确定要清除屏幕吗?"])])])],
44
- exec: () => {
45
- n();
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
- ctx: () => ({
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
- }, g = (o, n) => {
72
- const t = o.__vccOpts || o;
73
- for (const [e, c] of n)
74
- t[e] = c;
75
- return t;
76
- }, E = { class: "toolbar-itm-clean" };
77
- function S(o, n, t, e, c, a) {
78
- const s = b("toolbar-base");
79
- return k(), y("div", E, [
80
- i(s, {
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: t.options.icon.default || t.options.icon,
83
- options: t.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 A = /* @__PURE__ */ g(C, [["render", S]]), O = {
89
- ...f,
90
- entry: A
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
- O as default
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.0",
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.0",
29
- "@opentiny/tiny-engine-meta-register": "2.5.0-alpha.0",
30
- "@opentiny/tiny-engine-utils": "2.5.0-alpha.0"
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.0",
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": "ae59c82734d79f650c9221cb9702714814b099c8"
42
+ "gitHead": "f5707c379397bffc9a63c50c695f3ee3340ad0c6"
43
43
  }