@opentiny/tiny-engine-toolbar-clean 2.0.0 → 2.1.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.
Files changed (2) hide show
  1. package/dist/index.js +38 -38
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -1,13 +1,12 @@
1
- import { getCurrentInstance as u, ref as m, watch as f, createVNode as c, resolveComponent as d, openBlock as _, createElementBlock as v } from "vue";
2
- import { Modal as b } from "@opentiny/vue";
3
- import { useCanvas as g, useLayout as k } from "@opentiny/tiny-engine-meta-register";
4
- import { constants as y } from "@opentiny/tiny-engine-utils";
5
- import { ToolbarBase as C } from "@opentiny/tiny-engine-common";
1
+ import { ref as l, watch as p, createVNode as s, resolveComponent as u, openBlock as d, createElementBlock 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";
6
5
  const {
7
6
  PAGE_STATUS: i
8
- } = y, S = {
7
+ } = b, y = {
9
8
  components: {
10
- ToolbarBase: C
9
+ ToolbarBase: k
11
10
  },
12
11
  props: {
13
12
  options: {
@@ -16,43 +15,44 @@ const {
16
15
  }
17
16
  },
18
17
  setup() {
19
- const s = u().appContext.components.SvgIcon, {
20
- pageState: o,
21
- clearCanvas: e
22
- } = g(), t = m(o.isLock);
23
- return f(
24
- () => o.isLock,
18
+ const {
19
+ pageState: t,
20
+ clearCanvas: c
21
+ } = f(), o = l(t.isLock), {
22
+ confirm: e
23
+ } = _();
24
+ return p(
25
+ () => t.isLock,
25
26
  // eslint-disable-next-line no-return-assign
26
- (n) => t.value = n
27
+ (n) => o.value = n
27
28
  ), {
28
29
  clean: () => {
29
- var n, r;
30
- [i.Occupy, i.Guest].includes((r = (n = k().layoutState) == null ? void 0 : n.pageStatus) == null ? void 0 : r.state) && (t.value || b.confirm({
30
+ var n, a;
31
+ [i.Occupy, i.Guest].includes((a = (n = v().layoutState) == null ? void 0 : n.pageStatus) == null ? void 0 : a.state) && (o.value || e({
31
32
  title: "提示",
32
- message: () => [c("div", {
33
+ message: () => [s("div", {
33
34
  class: "modal-content"
34
- }, [c("div", {
35
+ }, [s("div", {
35
36
  class: "wrap"
36
- }, [c(s, {
37
- name: "warning"
38
- }, null), c("span", null, ["您确定要清除屏幕吗?"])])])]
39
- }).then((p) => {
40
- p === "confirm" && e();
37
+ }, [s("span", null, ["您确定要清除屏幕吗?"])])])],
38
+ exec: () => {
39
+ c();
40
+ }
41
41
  }));
42
42
  },
43
- isLock: t
43
+ isLock: o
44
44
  };
45
45
  }
46
- }, x = (a, s) => {
47
- const o = a.__vccOpts || a;
48
- for (const [e, t] of s)
49
- o[e] = t;
46
+ }, g = (t, c) => {
47
+ const o = t.__vccOpts || t;
48
+ for (const [e, r] of c)
49
+ o[e] = r;
50
50
  return o;
51
- }, h = { class: "toolbar-itm-clean" };
52
- function A(a, s, o, e, t, l) {
53
- const n = d("toolbar-base");
54
- return _(), v("div", h, [
55
- c(n, {
51
+ }, x = { class: "toolbar-itm-clean" };
52
+ function C(t, c, o, e, r, n) {
53
+ const a = u("toolbar-base");
54
+ return d(), m("div", x, [
55
+ s(a, {
56
56
  content: "清除屏幕",
57
57
  icon: o.options.icon.default || o.options.icon,
58
58
  options: o.options,
@@ -60,7 +60,7 @@ function A(a, s, o, e, t, l) {
60
60
  }, null, 8, ["icon", "options", "onClickApi"])
61
61
  ]);
62
62
  }
63
- const L = /* @__PURE__ */ x(S, [["render", A]]), T = {
63
+ const S = /* @__PURE__ */ g(y, [["render", C]]), A = {
64
64
  id: "engine.toolbars.clean",
65
65
  type: "toolbars",
66
66
  title: "clean",
@@ -70,10 +70,10 @@ const L = /* @__PURE__ */ x(S, [["render", A]]), T = {
70
70
  },
71
71
  renderType: "icon"
72
72
  }
73
- }, G = {
74
- ...T,
75
- entry: L
73
+ }, O = {
74
+ ...A,
75
+ entry: S
76
76
  };
77
77
  export {
78
- G as default
78
+ O as default
79
79
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-toolbar-clean",
3
- "version": "2.0.0",
3
+ "version": "2.1.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.0.0",
29
- "@opentiny/tiny-engine-meta-register": "2.0.0",
30
- "@opentiny/tiny-engine-utils": "2.0.0"
28
+ "@opentiny/tiny-engine-common": "2.1.0",
29
+ "@opentiny/tiny-engine-meta-register": "2.1.0",
30
+ "@opentiny/tiny-engine-utils": "2.1.0"
31
31
  },
32
32
  "devDependencies": {
33
- "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0",
33
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.1.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.14.0",
40
40
  "vue": "^3.4.15"
41
41
  },
42
- "gitHead": "26b32b2236bb85d8113158fd1475884aa99a9657"
42
+ "gitHead": "faf3072c75ea5024689972e2a687916e084c156f"
43
43
  }