@opentiny/tiny-engine-toolbar-redoundo 1.0.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.
- package/dist/index.js +76 -0
- package/dist/style.css +1 -0
- package/package.json +24 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { Popover as m } from "@opentiny/vue";
|
|
3
|
+
import { useHistory as u } from "@opentiny/tiny-engine-controller";
|
|
4
|
+
import { resolveComponent as i, openBlock as _, createElementBlock as y, createVNode as t, withCtx as c, createElementVNode as l, normalizeClass as f } from "vue";
|
|
5
|
+
const v = (o, e) => {
|
|
6
|
+
const n = o.__vccOpts || o;
|
|
7
|
+
for (const [a, p] of e)
|
|
8
|
+
n[a] = p;
|
|
9
|
+
return n;
|
|
10
|
+
}, g = {
|
|
11
|
+
components: {
|
|
12
|
+
TinyPopover: m
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
undoIcon: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "undo"
|
|
18
|
+
},
|
|
19
|
+
redoIcon: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "redo"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
setup() {
|
|
25
|
+
return u();
|
|
26
|
+
}
|
|
27
|
+
}, b = { class: "redo-undo-wrap" };
|
|
28
|
+
function k(o, e, n, a, p, w) {
|
|
29
|
+
const s = i("svg-icon"), d = i("tiny-popover");
|
|
30
|
+
return _(), y("span", b, [
|
|
31
|
+
t(d, {
|
|
32
|
+
trigger: "hover",
|
|
33
|
+
"open-delay": 1e3,
|
|
34
|
+
"popper-class": "toolbar-right-popover",
|
|
35
|
+
"append-to-body": "",
|
|
36
|
+
content: o.historyState.back ? "撤销" : "没有要撤销的"
|
|
37
|
+
}, {
|
|
38
|
+
reference: c(() => [
|
|
39
|
+
l("span", {
|
|
40
|
+
class: f(["icon-wrap", "undo", { disabled: !o.historyState.back }]),
|
|
41
|
+
onClick: e[0] || (e[0] = (...r) => o.back && o.back(...r))
|
|
42
|
+
}, [
|
|
43
|
+
t(s, { name: n.undoIcon }, null, 8, ["name"])
|
|
44
|
+
], 2)
|
|
45
|
+
]),
|
|
46
|
+
_: 1
|
|
47
|
+
}, 8, ["content"]),
|
|
48
|
+
t(d, {
|
|
49
|
+
trigger: "hover",
|
|
50
|
+
"open-delay": 1e3,
|
|
51
|
+
"popper-class": "toolbar-right-popover",
|
|
52
|
+
"append-to-body": "",
|
|
53
|
+
content: o.historyState.forward ? "恢复" : "没有要恢复的"
|
|
54
|
+
}, {
|
|
55
|
+
reference: c(() => [
|
|
56
|
+
l("span", {
|
|
57
|
+
class: f(["icon-wrap", "redo", o.historyState.forward ? "" : "disabled"]),
|
|
58
|
+
onClick: e[1] || (e[1] = (...r) => o.forward && o.forward(...r))
|
|
59
|
+
}, [
|
|
60
|
+
t(s, { name: n.redoIcon }, null, 8, ["name"])
|
|
61
|
+
], 2)
|
|
62
|
+
]),
|
|
63
|
+
_: 1
|
|
64
|
+
}, 8, ["content"])
|
|
65
|
+
]);
|
|
66
|
+
}
|
|
67
|
+
const h = /* @__PURE__ */ v(g, [["render", k], ["__scopeId", "data-v-efd23f2b"]]), E = {
|
|
68
|
+
id: "aa",
|
|
69
|
+
title: "redoundo",
|
|
70
|
+
icon: "",
|
|
71
|
+
align: "right",
|
|
72
|
+
component: h
|
|
73
|
+
};
|
|
74
|
+
export {
|
|
75
|
+
E as default
|
|
76
|
+
};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.redo-undo-wrap[data-v-efd23f2b]{display:flex}.redo-undo-wrap[data-v-efd23f2b] .icon-wrap{display:inline-flex;align-items:center;justify-content:center;height:32px;width:32px;border-radius:6px;font-size:20px}.redo-undo-wrap[data-v-efd23f2b] .icon-wrap svg{color:var(--ti-lowcode-toolbar-title-color)}.redo-undo-wrap[data-v-efd23f2b] .icon-wrap.disabled{cursor:not-allowed}.redo-undo-wrap[data-v-efd23f2b] .icon-wrap.disabled svg{color:var(--ti-lowcode-disabled-color)}.redo-undo-wrap[data-v-efd23f2b] .icon-wrap:not(.disabled):hover{background:var(--ti-lowcode-toolbar-view-active-bg)}.redo-undo-wrap[data-v-efd23f2b] .icon-wrap:not(.disabled):hover svg{color:var(--ti-lowcode-toolbar-active-color)}.redo-undo-wrap[data-v-efd23f2b] .icon-wrap.redo{margin-left:-5px}
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@opentiny/tiny-engine-toolbar-redoundo",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "vite build"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"module": "dist/index.js",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist"
|
|
14
|
+
],
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@opentiny/vue": "^3.8.0",
|
|
17
|
+
"vue": "3.2.45"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
21
|
+
"@vitejs/plugin-vue-jsx": "^1.3.10",
|
|
22
|
+
"vite": "^4.3.7"
|
|
23
|
+
}
|
|
24
|
+
}
|