@opentiny/tiny-engine-toolbar-clean 1.0.3 → 2.0.0-alpha.1

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 +34 -31
  2. package/package.json +7 -6
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { getCurrentInstance as d, ref as u, watch as v, createVNode as a, resolveComponent as l, openBlock as f, createElementBlock as _, withCtx as g, createElementVNode as y, normalizeClass as k } from "vue";
1
+ import { getCurrentInstance as d, ref as u, watch as v, createVNode as c, resolveComponent as l, openBlock as f, createElementBlock as _, withCtx as g, createElementVNode as y, normalizeClass as k } from "vue";
2
2
  import { Popover as C, Modal as S } from "@opentiny/vue";
3
- import { useCanvas as h, useLayout as x } from "@opentiny/tiny-engine-controller";
4
- import { constants as L } from "@opentiny/tiny-engine-utils";
3
+ import { useCanvas as b, useLayout as h } from "@opentiny/tiny-engine-meta-register";
4
+ import { constants as x } from "@opentiny/tiny-engine-utils";
5
5
  const {
6
6
  PAGE_STATUS: p
7
- } = L, b = {
7
+ } = x, L = {
8
8
  components: {
9
9
  TinyPopover: C
10
10
  },
@@ -16,42 +16,42 @@ const {
16
16
  },
17
17
  setup() {
18
18
  const e = d().appContext.components.SvgIcon, {
19
- pageState: n,
20
- clearCanvas: o
21
- } = h(), t = u(n.isLock);
19
+ pageState: o,
20
+ clearCanvas: n
21
+ } = b(), t = u(o.isLock);
22
22
  return v(
23
- () => n.isLock,
23
+ () => o.isLock,
24
24
  // eslint-disable-next-line no-return-assign
25
- (c) => t.value = c
25
+ (a) => t.value = a
26
26
  ), {
27
27
  clean: () => {
28
- var c, r;
29
- [p.Occupy, p.Guest].includes((r = (c = x().layoutState) == null ? void 0 : c.pageStatus) == null ? void 0 : r.state) && (t.value || S.confirm({
28
+ var a, r;
29
+ [p.Occupy, p.Guest].includes((r = (a = h().layoutState) == null ? void 0 : a.pageStatus) == null ? void 0 : r.state) && (t.value || S.confirm({
30
30
  title: "提示",
31
- message: () => [a("div", {
31
+ message: () => [c("div", {
32
32
  class: "modal-content"
33
- }, [a("div", {
33
+ }, [c("div", {
34
34
  class: "wrap"
35
- }, [a(e, {
35
+ }, [c(e, {
36
36
  name: "warning"
37
- }, null), a("span", null, ["您确定要清除屏幕吗?"])])])]
37
+ }, null), c("span", null, ["您确定要清除屏幕吗?"])])])]
38
38
  }).then((i) => {
39
- i === "confirm" && o();
39
+ i === "confirm" && n();
40
40
  }));
41
41
  },
42
42
  isLock: t
43
43
  };
44
44
  }
45
45
  }, w = (s, e) => {
46
- const n = s.__vccOpts || s;
47
- for (const [o, t] of e)
48
- n[o] = t;
49
- return n;
46
+ const o = s.__vccOpts || s;
47
+ for (const [n, t] of e)
48
+ o[n] = t;
49
+ return o;
50
50
  }, E = { class: "toolbar-itm-clean" };
51
- function I(s, e, n, o, t, m) {
52
- const c = l("svg-icon"), r = l("tiny-popover");
51
+ function I(s, e, o, n, t, m) {
52
+ const a = l("svg-icon"), r = l("tiny-popover");
53
53
  return f(), _("div", E, [
54
- a(r, {
54
+ c(r, {
55
55
  trigger: "hover",
56
56
  "open-delay": 1e3,
57
57
  "popper-class": "toolbar-right-popover",
@@ -60,23 +60,26 @@ function I(s, e, n, o, t, m) {
60
60
  }, {
61
61
  reference: g(() => [
62
62
  y("span", {
63
- class: k(["icon", { disabled: o.isLock }]),
64
- onClick: e[0] || (e[0] = (...i) => o.clean && o.clean(...i))
63
+ class: k(["icon", { disabled: n.isLock }]),
64
+ onClick: e[0] || (e[0] = (...i) => n.clean && n.clean(...i))
65
65
  }, [
66
- a(c, { name: n.icon }, null, 8, ["name"])
66
+ c(a, { name: o.icon }, null, 8, ["name"])
67
67
  ], 2)
68
68
  ]),
69
69
  _: 1
70
70
  })
71
71
  ]);
72
72
  }
73
- const P = /* @__PURE__ */ w(b, [["render", I]]), N = {
74
- id: "clean",
73
+ const P = /* @__PURE__ */ w(L, [["render", I]]), T = {
74
+ id: "engine.toolbars.clean",
75
+ type: "toolbars",
75
76
  title: "clean",
76
77
  icon: "",
77
- align: "right",
78
- component: P
78
+ align: "right"
79
+ }, O = {
80
+ ...T,
81
+ entry: P
79
82
  };
80
83
  export {
81
- N as default
84
+ O as default
82
85
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/tiny-engine-toolbar-clean",
3
- "version": "1.0.3",
3
+ "version": "2.0.0-alpha.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -24,17 +24,18 @@
24
24
  "license": "MIT",
25
25
  "homepage": "https://opentiny.design/tiny-engine",
26
26
  "dependencies": {
27
- "@opentiny/tiny-engine-controller": "1.0.3",
28
- "@opentiny/tiny-engine-utils": "1.0.4",
29
- "@opentiny/vue": "~3.10.0"
27
+ "@opentiny/tiny-engine-meta-register": "2.0.0-alpha.1",
28
+ "@opentiny/tiny-engine-utils": "2.0.0-alpha.1"
30
29
  },
31
30
  "devDependencies": {
31
+ "@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0-alpha.1",
32
32
  "@vitejs/plugin-vue": "^4.2.3",
33
- "@vitejs/plugin-vue-jsx": "^1.3.10",
33
+ "@vitejs/plugin-vue-jsx": "^3.1.0",
34
34
  "vite": "^4.3.7"
35
35
  },
36
36
  "peerDependencies": {
37
+ "@opentiny/vue": "^3.14.0",
37
38
  "vue": "^3.4.15"
38
39
  },
39
- "gitHead": "9a6cce3988accb39c97a9a21169c022c65a8e27f"
40
+ "gitHead": "f15ccc5dde391288bf4297e3ffc35aab52651f3d"
40
41
  }