@opentiny/tiny-engine-toolbar-media 2.0.0 → 2.1.0-rc.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.
- package/LICENSE +22 -22
- package/dist/index.js +173 -186
- package/dist/style.css +1 -1
- package/package.json +5 -5
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 - present TinyEngine Authors.
|
|
4
|
-
Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 - present TinyEngine Authors.
|
|
4
|
+
Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
|
-
import { ref as
|
|
3
|
-
import { Popover as
|
|
4
|
-
import { IconWebPlus as
|
|
5
|
-
import { useLayout as
|
|
6
|
-
import { ToolbarBase as
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
for (const [
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
},
|
|
2
|
+
import { ref as C, computed as E, reactive as Y, toRaw as Z, watch as F, watchEffect as $, onMounted as ee, onUnmounted as te, resolveComponent as _, openBlock as v, createBlock as W, withCtx as p, createElementVNode as t, createElementBlock as I, Fragment as ne, renderList as oe, normalizeClass as ie, createVNode as f, createTextVNode as D, toDisplayString as r, createCommentVNode as N, pushScopeId as ae, popScopeId as se } from "vue";
|
|
3
|
+
import { Popover as le, Input as de, Switch as ce } from "@opentiny/vue";
|
|
4
|
+
import { IconWebPlus as P } from "@opentiny/vue-icon";
|
|
5
|
+
import { useLayout as g, useCanvas as L } from "@opentiny/tiny-engine-meta-register";
|
|
6
|
+
import { ToolbarBase as re } from "@opentiny/tiny-engine-common";
|
|
7
|
+
const pe = (d, l) => {
|
|
8
|
+
const c = d.__vccOpts || d;
|
|
9
|
+
for (const [n, u] of l)
|
|
10
|
+
c[n] = u;
|
|
11
|
+
return c;
|
|
12
|
+
}, ue = {
|
|
13
13
|
components: {
|
|
14
|
-
TinyPopover:
|
|
15
|
-
TinyInput:
|
|
16
|
-
TinySwitch:
|
|
17
|
-
ToolbarBase:
|
|
14
|
+
TinyPopover: le,
|
|
15
|
+
TinyInput: de,
|
|
16
|
+
TinySwitch: ce,
|
|
17
|
+
ToolbarBase: re
|
|
18
18
|
},
|
|
19
19
|
props: {
|
|
20
20
|
data: {
|
|
@@ -30,9 +30,9 @@ const de = (b, n) => {
|
|
|
30
30
|
default: () => ({})
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
setup(
|
|
34
|
-
let
|
|
35
|
-
const { layoutState:
|
|
33
|
+
setup(d, { emit: l }) {
|
|
34
|
+
let c = null, n = "", u = "";
|
|
35
|
+
const { layoutState: w } = g(), m = C(!1), b = C(!1), h = C(!1), { getCanvasType: y } = L().canvasApi.value, T = C((y == null ? void 0 : y()) === "absolute"), o = E(() => g().getDimension()), x = E(() => o.value.scale * 100), i = Y({
|
|
36
36
|
activeIndex: 0,
|
|
37
37
|
guideValue: "",
|
|
38
38
|
width: "",
|
|
@@ -43,15 +43,15 @@ const de = (b, n) => {
|
|
|
43
43
|
title: "添加大断点",
|
|
44
44
|
list: [
|
|
45
45
|
{
|
|
46
|
-
icon:
|
|
46
|
+
icon: P(),
|
|
47
47
|
text: "1280px"
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
|
-
icon:
|
|
50
|
+
icon: P(),
|
|
51
51
|
text: "1440px"
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
icon:
|
|
54
|
+
icon: P(),
|
|
55
55
|
text: "1920px"
|
|
56
56
|
}
|
|
57
57
|
],
|
|
@@ -93,8 +93,8 @@ const de = (b, n) => {
|
|
|
93
93
|
maxWidth: "1920px",
|
|
94
94
|
title: "大屏",
|
|
95
95
|
subTitle: "1200px 及以上",
|
|
96
|
-
content: "此处添加的样式将适用于 1200
|
|
97
|
-
enContent: "Style added here will apply at 1200px and up,unless they′re edited at a larger breakpoint"
|
|
96
|
+
content: "此处添加的样式将适用于 1200 像素及以上,除非它们在更大的断点处进行编辑。",
|
|
97
|
+
enContent: "Style added here will apply at 1200px and up,unless they′re edited at a larger breakpoint."
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
idx: 1,
|
|
@@ -149,233 +149,220 @@ const de = (b, n) => {
|
|
|
149
149
|
enContent: "styles added here will apply at 480px and down."
|
|
150
150
|
}
|
|
151
151
|
]
|
|
152
|
-
}),
|
|
153
|
-
|
|
154
|
-
}, O = () => {
|
|
155
|
-
d = setTimeout(() => {
|
|
156
|
-
u.value = !0;
|
|
157
|
-
}, 1e3);
|
|
152
|
+
}), O = () => {
|
|
153
|
+
b.value = !1;
|
|
158
154
|
}, U = () => {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
155
|
+
c = setTimeout(() => {
|
|
156
|
+
m.value = !0;
|
|
157
|
+
}, 1e3);
|
|
162
158
|
}, j = () => {
|
|
163
|
-
|
|
164
|
-
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
159
|
+
m.value = !1, clearTimeout(c);
|
|
160
|
+
}, q = () => {
|
|
161
|
+
w.toolbars.visiblePopover = !0, h.value = !0;
|
|
162
|
+
}, z = () => {
|
|
163
|
+
w.toolbars.visiblePopover = !1, h.value = !1;
|
|
164
|
+
}, S = (e) => {
|
|
165
|
+
const a = document.querySelector(".reference-text"), s = a == null ? void 0 : a.contains(e.target);
|
|
166
|
+
a !== e.target && !s && (w.toolbars.visiblePopover = !1);
|
|
167
|
+
}, k = i.media.reduce((e, a, s) => (e[a.view] = { ...Z(a), index: s }, e), {}), M = (e) => {
|
|
168
|
+
d.isCanvas ? g().setDimension({
|
|
169
169
|
deviceType: e.view,
|
|
170
170
|
width: e.width,
|
|
171
171
|
minWidth: e.minWidth,
|
|
172
172
|
maxWidth: e.maxWidth
|
|
173
|
-
}) : (
|
|
174
|
-
},
|
|
175
|
-
const s =
|
|
176
|
-
|
|
173
|
+
}) : (i.activeIndex = e.idx, l("setViewPort", e.width));
|
|
174
|
+
}, R = (e, a) => {
|
|
175
|
+
const s = k[a];
|
|
176
|
+
g().setDimension({
|
|
177
177
|
deviceType: s.view,
|
|
178
178
|
width: e ? `${e}px` : s.width,
|
|
179
179
|
minWidth: s.minWidth,
|
|
180
180
|
maxWidth: s.maxWidth
|
|
181
181
|
});
|
|
182
|
-
},
|
|
182
|
+
}, G = [
|
|
183
183
|
{ type: "mobile", min: 240, max: 480 },
|
|
184
184
|
{ type: "lanMobile", min: 480, max: 768 },
|
|
185
185
|
{ type: "tablet", min: 768, max: 992 },
|
|
186
186
|
{ type: "desktop", min: 992, max: 1200 },
|
|
187
187
|
{ type: "mdx", min: 1200, max: 1920 }
|
|
188
|
-
],
|
|
189
|
-
var
|
|
190
|
-
const
|
|
191
|
-
String(e).match(
|
|
192
|
-
const s = Number(
|
|
193
|
-
|
|
194
|
-
},
|
|
195
|
-
const
|
|
196
|
-
String(e).match(s) ? Number(e) > 100 ?
|
|
197
|
-
scale: Number(
|
|
188
|
+
], H = (e) => {
|
|
189
|
+
var A;
|
|
190
|
+
const a = /^\d+$/;
|
|
191
|
+
String(e).match(a) ? Number(e) < 240 ? i.width = 240 : Number(e) > 1920 ? i.width = 1920 : i.width = e : i.width = n || parseInt(o.value.width, 10);
|
|
192
|
+
const s = Number(i.width), X = ((A = G.find((B) => B.min <= s && s <= B.max)) == null ? void 0 : A.type) || "desktop";
|
|
193
|
+
R(s, X);
|
|
194
|
+
}, J = (e) => {
|
|
195
|
+
const a = k.mdx, s = /^\d+(\.\d+)?$/;
|
|
196
|
+
String(e).match(s) ? Number(e) > 100 ? i.scaleValue = 100 : Number(e) < 20 ? i.scaleValue = 20 : i.scaleValue = e : i.scaleValue = u || parseInt(a.scale), i.scaleValue = Number(i.scaleValue).toFixed(2), g().setDimension({
|
|
197
|
+
scale: Number(i.scaleValue) / 100
|
|
198
198
|
});
|
|
199
|
-
},
|
|
200
|
-
const { setCanvasType:
|
|
201
|
-
|
|
199
|
+
}, K = (e) => {
|
|
200
|
+
const { setCanvasType: a } = L().canvasApi.value;
|
|
201
|
+
a(e ? "absolute" : "normal");
|
|
202
202
|
};
|
|
203
|
-
|
|
204
|
-
() =>
|
|
203
|
+
F(
|
|
204
|
+
() => o.value.deviceType,
|
|
205
205
|
(e) => {
|
|
206
|
-
|
|
206
|
+
i.activeIndex = k[e].index, i.readonly = e !== "mdx";
|
|
207
207
|
},
|
|
208
208
|
{ immediate: !0 }
|
|
209
|
-
),
|
|
210
|
-
|
|
211
|
-
}),
|
|
212
|
-
() =>
|
|
209
|
+
), $(() => {
|
|
210
|
+
i.scaleValue = x.value.toFixed(2), u = x.value;
|
|
211
|
+
}), F(
|
|
212
|
+
() => o.value.width,
|
|
213
213
|
(e) => {
|
|
214
|
-
const
|
|
215
|
-
Number.isInteger(
|
|
214
|
+
const a = parseInt(e, 10);
|
|
215
|
+
Number.isInteger(a) && (i.width = a, n = a);
|
|
216
216
|
}
|
|
217
|
-
),
|
|
218
|
-
document.addEventListener("click",
|
|
219
|
-
}),
|
|
220
|
-
document.removeEventListener("click",
|
|
217
|
+
), ee(() => {
|
|
218
|
+
document.addEventListener("click", S);
|
|
219
|
+
}), te(() => {
|
|
220
|
+
document.removeEventListener("click", S);
|
|
221
221
|
});
|
|
222
|
-
const
|
|
223
|
-
return
|
|
224
|
-
scale:
|
|
225
|
-
state:
|
|
226
|
-
active:
|
|
227
|
-
flag:
|
|
228
|
-
hide:
|
|
229
|
-
layoutState:
|
|
230
|
-
visible:
|
|
231
|
-
showTips:
|
|
232
|
-
hideTips:
|
|
233
|
-
timer:
|
|
234
|
-
dimension:
|
|
235
|
-
setViewPort:
|
|
236
|
-
showPopover:
|
|
237
|
-
hidePopover:
|
|
238
|
-
widthChange:
|
|
239
|
-
scaleChange:
|
|
240
|
-
isAbsolute:
|
|
241
|
-
changeCanvasType:
|
|
222
|
+
const Q = o.value.deviceType || "desktop";
|
|
223
|
+
return M(k[Q]), {
|
|
224
|
+
scale: x,
|
|
225
|
+
state: i,
|
|
226
|
+
active: b,
|
|
227
|
+
flag: h,
|
|
228
|
+
hide: O,
|
|
229
|
+
layoutState: w,
|
|
230
|
+
visible: m,
|
|
231
|
+
showTips: U,
|
|
232
|
+
hideTips: j,
|
|
233
|
+
timer: c,
|
|
234
|
+
dimension: o,
|
|
235
|
+
setViewPort: M,
|
|
236
|
+
showPopover: q,
|
|
237
|
+
hidePopover: z,
|
|
238
|
+
widthChange: H,
|
|
239
|
+
scaleChange: J,
|
|
240
|
+
isAbsolute: T,
|
|
241
|
+
changeCanvasType: K
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
-
},
|
|
244
|
+
}, V = (d) => (ae("data-v-036ff61a"), d = d(), se(), d), me = { class: "toolbar-wrap" }, he = { class: "toolbar-icon-wrap" }, xe = ["onClick"], ve = { class: "media-content" }, we = { class: "media-title" }, be = {
|
|
245
245
|
key: 0,
|
|
246
246
|
class: "sub-title"
|
|
247
|
-
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
247
|
+
}, ye = { class: "content" }, _e = {
|
|
248
|
+
class: "reference-text",
|
|
249
|
+
title: "画布设置"
|
|
250
|
+
}, fe = /* @__PURE__ */ V(() => /* @__PURE__ */ t("span", { class: "symbol" }, "px", -1)), ge = /* @__PURE__ */ V(() => /* @__PURE__ */ t("span", { class: "symbol" }, "%", -1)), Ve = { class: "content-wrap text-content" }, ke = { class: "title text-title" }, Ce = { class: "setting" }, Te = /* @__PURE__ */ V(() => /* @__PURE__ */ t("span", null, "px", -1)), We = /* @__PURE__ */ V(() => /* @__PURE__ */ t("span", null, "%", -1)), Ie = /* @__PURE__ */ V(() => /* @__PURE__ */ t("label", null, /* @__PURE__ */ r("自由布局"), -1));
|
|
251
|
+
function De(d, l, c, n, u, w) {
|
|
252
|
+
const m = _("svg-icon"), b = _("tiny-popover"), h = _("tiny-input"), y = _("tiny-switch"), T = _("toolbar-base");
|
|
253
|
+
return v(), W(T, { options: c.options }, {
|
|
254
|
+
default: p(() => [
|
|
255
|
+
t("div", me, [
|
|
256
|
+
t("div", he, [
|
|
257
|
+
(v(!0), I(ne, null, oe(n.state.media, (o, x) => (v(), I("span", {
|
|
258
|
+
key: x,
|
|
259
|
+
class: ie(["icon", { active: n.state.activeIndex === x, "is-rotate": o.view === "lanMobile" }]),
|
|
260
|
+
onClick: (i) => n.setViewPort(o)
|
|
258
261
|
}, [
|
|
259
|
-
|
|
262
|
+
f(b, {
|
|
260
263
|
trigger: "hover",
|
|
261
|
-
width: "
|
|
264
|
+
width: "260",
|
|
262
265
|
"append-to-body": "",
|
|
263
266
|
"open-delay": 1e3,
|
|
264
267
|
"popper-class": "media-icon-popover"
|
|
265
268
|
}, {
|
|
266
|
-
reference:
|
|
267
|
-
|
|
268
|
-
name:
|
|
269
|
+
reference: p(() => [
|
|
270
|
+
f(m, {
|
|
271
|
+
name: o.liked,
|
|
269
272
|
class: "media-icon"
|
|
270
273
|
}, null, 8, ["name"])
|
|
271
274
|
]),
|
|
272
|
-
default:
|
|
273
|
-
t("div",
|
|
274
|
-
t("div",
|
|
275
|
-
t("div", null,
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
275
|
+
default: p(() => [
|
|
276
|
+
t("div", ve, [
|
|
277
|
+
t("div", we, [
|
|
278
|
+
t("div", null, [
|
|
279
|
+
D(r(o.title) + " ", 1),
|
|
280
|
+
o.subTitle ? (v(), I("span", be, [
|
|
281
|
+
D(" ("),
|
|
282
|
+
o.view === "desktop" ? (v(), W(m, {
|
|
283
|
+
key: 0,
|
|
284
|
+
name: "stars"
|
|
285
|
+
})) : N("", !0),
|
|
286
|
+
t("span", null, r(o.subTitle), 1),
|
|
287
|
+
D(") ")
|
|
288
|
+
])) : N("", !0)
|
|
289
|
+
])
|
|
286
290
|
]),
|
|
287
|
-
t("div",
|
|
291
|
+
t("div", ye, r(o.content), 1)
|
|
288
292
|
])
|
|
289
293
|
]),
|
|
290
294
|
_: 2
|
|
291
295
|
}, 1024)
|
|
292
|
-
], 10,
|
|
296
|
+
], 10, xe))), 128))
|
|
293
297
|
]),
|
|
294
|
-
|
|
298
|
+
c.isCanvas ? (v(), W(b, {
|
|
295
299
|
key: 0,
|
|
296
|
-
width: "
|
|
300
|
+
width: "200",
|
|
297
301
|
trigger: "click",
|
|
298
302
|
"popper-class": "toolbar-media-popper"
|
|
299
303
|
}, {
|
|
300
|
-
reference:
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
"append-to-body": "",
|
|
306
|
-
content: "画布设置"
|
|
307
|
-
}, {
|
|
308
|
-
reference: c(() => [
|
|
309
|
-
t("span", we, [
|
|
310
|
-
t("span", null, [
|
|
311
|
-
t("span", null, r(parseInt(o.state.width)), 1),
|
|
312
|
-
n[6] || (n[6] = t("span", { class: "symbol" }, "PX", -1))
|
|
313
|
-
]),
|
|
314
|
-
t("span", null, [
|
|
315
|
-
t("span", null, r(o.scale.toFixed(2)), 1),
|
|
316
|
-
n[7] || (n[7] = t("span", { class: "symbol" }, "%", -1))
|
|
317
|
-
])
|
|
318
|
-
])
|
|
304
|
+
reference: p(() => [
|
|
305
|
+
t("span", _e, [
|
|
306
|
+
t("span", null, [
|
|
307
|
+
t("span", null, r(parseInt(n.state.width)), 1),
|
|
308
|
+
fe
|
|
319
309
|
]),
|
|
320
|
-
|
|
321
|
-
|
|
310
|
+
t("span", null, [
|
|
311
|
+
t("span", null, r(n.scale.toFixed(2)), 1),
|
|
312
|
+
ge
|
|
313
|
+
])
|
|
314
|
+
])
|
|
322
315
|
]),
|
|
323
|
-
default:
|
|
324
|
-
t("div",
|
|
325
|
-
t("
|
|
326
|
-
t("div",
|
|
316
|
+
default: p(() => [
|
|
317
|
+
t("div", Ve, [
|
|
318
|
+
t("div", ke, r(n.state.textData.title), 1),
|
|
319
|
+
t("div", Ce, [
|
|
327
320
|
t("div", null, [
|
|
328
|
-
t("label",
|
|
329
|
-
|
|
330
|
-
modelValue:
|
|
331
|
-
"onUpdate:modelValue":
|
|
332
|
-
onChange:
|
|
321
|
+
t("label", null, r(n.state.textData.width), 1),
|
|
322
|
+
f(h, {
|
|
323
|
+
modelValue: n.state.width,
|
|
324
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => n.state.width = o),
|
|
325
|
+
onChange: n.widthChange
|
|
333
326
|
}, {
|
|
334
|
-
suffix:
|
|
335
|
-
|
|
336
|
-
])
|
|
327
|
+
suffix: p(() => [
|
|
328
|
+
Te
|
|
329
|
+
]),
|
|
337
330
|
_: 1
|
|
338
331
|
}, 8, ["modelValue", "onChange"])
|
|
339
332
|
]),
|
|
340
333
|
t("div", null, [
|
|
341
|
-
t("label",
|
|
342
|
-
|
|
343
|
-
modelValue:
|
|
344
|
-
"onUpdate:modelValue":
|
|
345
|
-
readonly:
|
|
346
|
-
onChange:
|
|
334
|
+
t("label", null, r(n.state.textData.scale), 1),
|
|
335
|
+
f(h, {
|
|
336
|
+
modelValue: n.state.scaleValue,
|
|
337
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => n.state.scaleValue = o),
|
|
338
|
+
readonly: n.state.readonly,
|
|
339
|
+
onChange: n.scaleChange
|
|
347
340
|
}, {
|
|
348
|
-
suffix:
|
|
349
|
-
|
|
350
|
-
])
|
|
341
|
+
suffix: p(() => [
|
|
342
|
+
We
|
|
343
|
+
]),
|
|
351
344
|
_: 1
|
|
352
345
|
}, 8, ["modelValue", "readonly", "onChange"])
|
|
353
|
-
])
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
w(f, {
|
|
362
|
-
modelValue: o.isAbsolute,
|
|
363
|
-
"onUpdate:modelValue": n[2] || (n[2] = (i) => o.isAbsolute = i),
|
|
364
|
-
onChange: o.changeCanvasType
|
|
365
|
-
}, null, 8, ["modelValue", "onChange"])
|
|
366
|
-
])
|
|
346
|
+
]),
|
|
347
|
+
t("div", null, [
|
|
348
|
+
Ie,
|
|
349
|
+
f(y, {
|
|
350
|
+
modelValue: n.isAbsolute,
|
|
351
|
+
"onUpdate:modelValue": l[2] || (l[2] = (o) => n.isAbsolute = o),
|
|
352
|
+
onChange: n.changeCanvasType
|
|
353
|
+
}, null, 8, ["modelValue", "onChange"])
|
|
367
354
|
])
|
|
368
355
|
])
|
|
369
356
|
])
|
|
370
357
|
]),
|
|
371
358
|
_: 1
|
|
372
|
-
})) :
|
|
359
|
+
})) : N("", !0)
|
|
373
360
|
])
|
|
374
361
|
]),
|
|
375
362
|
_: 1
|
|
376
363
|
}, 8, ["options"]);
|
|
377
364
|
}
|
|
378
|
-
const
|
|
365
|
+
const Ne = /* @__PURE__ */ pe(ue, [["render", De], ["__scopeId", "data-v-036ff61a"]]), Pe = {
|
|
379
366
|
id: "engine.toolbars.media",
|
|
380
367
|
type: "toolbars",
|
|
381
368
|
title: "media",
|
|
@@ -385,10 +372,10 @@ const Ce = /* @__PURE__ */ de(re, [["render", ke], ["__scopeId", "data-v-40ac19c
|
|
|
385
372
|
},
|
|
386
373
|
renderType: "slot"
|
|
387
374
|
}
|
|
388
|
-
},
|
|
389
|
-
...
|
|
390
|
-
entry:
|
|
375
|
+
}, Le = {
|
|
376
|
+
...Pe,
|
|
377
|
+
entry: Ne
|
|
391
378
|
};
|
|
392
379
|
export {
|
|
393
|
-
|
|
380
|
+
Le as default
|
|
394
381
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.toolbar-wrap[data-v-
|
|
1
|
+
.toolbar-wrap[data-v-036ff61a]{display:flex;align-items:center}.toolbar-wrap .reference-text[data-v-036ff61a]{cursor:pointer;height:var(--base-top-panel-height);line-height:var(--base-top-panel-height);padding:0 7px;color:var(--ti-lowcode-toolbar-breadcrumb-color);display:inline-block}.toolbar-wrap .reference-text>span[data-v-036ff61a]:last-child{margin-left:8px}.toolbar-wrap .toolbar-icon-wrap[data-v-036ff61a]{display:flex;flex-wrap:nowrap;align-items:center;gap:6px}.toolbar-wrap .toolbar-icon-wrap .icon[data-v-036ff61a]{width:24px;height:24px;display:inline-flex;justify-content:center;align-items:center;border-radius:4px}.toolbar-wrap .toolbar-icon-wrap .icon svg[data-v-036ff61a]{cursor:pointer;color:var(--ti-lowcode-toolbar-title-color);outline:none;width:18px;height:18px;margin-top:-.5px}.toolbar-wrap .toolbar-icon-wrap .icon.active[data-v-036ff61a],.toolbar-wrap .toolbar-icon-wrap .icon[data-v-036ff61a]:hover{background:var(--ti-lowcode-toolbar-view-active-bg)}.toolbar-wrap .toolbar-icon-wrap .icon.active svg[data-v-036ff61a]{color:var(--ti-lowcode-common-primary-color)}.toolbar-wrap .more-setting .setting-item[data-v-036ff61a]{display:flex;justify-content:space-between;padding:12px}.media-content[data-v-036ff61a]{padding:12px 8px;line-height:18px}.media-content .media-title[data-v-036ff61a]{font-weight:600}.media-content .content[data-v-036ff61a]{color:var(--te-common-text-secondary)}.setting-content[data-v-036ff61a]{padding:12px 8px}.content-wrap[data-v-036ff61a]{padding:20px 12px}.content-wrap .title[data-v-036ff61a]{font-weight:600;margin-bottom:16px}.content-wrap .setting[data-v-036ff61a]{display:flex;flex-direction:column;gap:12px}.content-wrap .setting div[data-v-036ff61a]{display:flex;align-items:center;justify-content:space-between}.content-wrap .setting div label[data-v-036ff61a]{color:var(--te-common-text-secondary);min-width:64px}.content-wrap .setting div[data-v-036ff61a]:last-child{justify-content:flex-start}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/tiny-engine-toolbar-media",
|
|
3
|
-
"version": "2.0.0",
|
|
3
|
+
"version": "2.1.0-rc.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,11 +25,11 @@
|
|
|
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"
|
|
28
|
+
"@opentiny/tiny-engine-common": "2.1.0-rc.0",
|
|
29
|
+
"@opentiny/tiny-engine-meta-register": "2.1.0-rc.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.0.0",
|
|
32
|
+
"@opentiny/tiny-engine-vite-plugin-meta-comments": "2.1.0-rc.0",
|
|
33
33
|
"@vitejs/plugin-vue": "^5.1.2",
|
|
34
34
|
"@vitejs/plugin-vue-jsx": "^4.0.1",
|
|
35
35
|
"vite": "^5.4.2"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@opentiny/vue-icon": "^3.14.0",
|
|
40
40
|
"vue": "^3.4.15"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "71a3549d5f1d38d2ed3934ce83b722b11878aa7c"
|
|
43
43
|
}
|