officialblock 2.1.0 → 2.1.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-BI82VZ91.js +1 -0
- package/dist/index-B_6DwUvb.js +1 -0
- package/dist/index-B__52Adx.mjs +4 -0
- package/dist/index-BjgdPzqR.mjs +349 -0
- package/dist/index-BsZbx0rW.js +1 -0
- package/dist/index-CEHf6M6x.js +1 -0
- package/dist/index-CroTuaW_.mjs +162 -0
- package/dist/{index-C0VvLaXk.js → index-CvCNRVPY.js} +5 -5
- package/dist/index-D3X7jHwZ.mjs +278 -0
- package/dist/{index-CT1rjCCp.mjs → index-DwAYwP3K.mjs} +1 -1
- package/dist/index-DwPHbe8R.mjs +216 -0
- package/dist/index-NTd6BVQQ.js +1 -0
- package/dist/{index-C_l0k6dm.mjs → index-QpRJyZ_6.mjs} +157 -163
- package/dist/index-ahwJ0pbt.mjs +143 -0
- package/dist/{index-B3PhukvS.js → index-esMFQfpR.js} +1 -1
- package/dist/index-qybMHiY-.js +1 -0
- package/dist/official-block.cjs.js +1 -1
- package/dist/official-block.es.js +7 -7
- package/dist/official-block.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-B1CWbJxM.mjs +0 -414
- package/dist/index-BlREL57D.js +0 -1
- package/dist/index-BmAKDKvH.mjs +0 -4
- package/dist/index-CdakOmJX.js +0 -1
package/package.json
CHANGED
package/dist/index-B1CWbJxM.mjs
DELETED
|
@@ -1,414 +0,0 @@
|
|
|
1
|
-
import { defineComponent as X, defineAsyncComponent as Z, ref as C, computed as w, resolveComponent as g, createBlock as L, openBlock as h, withCtx as r, createElementVNode as a, createVNode as s, createTextVNode as V, unref as R, mergeProps as ee, createElementBlock as D, normalizeClass as $, toDisplayString as F, createCommentVNode as E, getCurrentInstance as te, watch as q, onMounted as ae, normalizeStyle as ne, withDirectives as z, Fragment as oe, renderList as le, vShow as M } from "vue";
|
|
2
|
-
import { P as se, r as T, _ as j, u as de, a as ie, T as ue, b as re, c as me, O as ce, $ as pe } from "./index-C_l0k6dm.mjs";
|
|
3
|
-
const ve = { class: "setting-content" }, fe = { class: "setting-header flex items-center" }, ye = { class: "setting-body" }, be = { class: "setting-toolbar" }, ge = { class: "tools" }, Ve = { class: "setting-item" }, we = { class: "item-header" }, he = { class: "btn-group" }, ke = {
|
|
4
|
-
key: 0,
|
|
5
|
-
class: "drag-handle"
|
|
6
|
-
}, Ce = { class: "components-content" }, xe = /* @__PURE__ */ X({
|
|
7
|
-
__name: "setting",
|
|
8
|
-
props: {
|
|
9
|
-
show: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: !1
|
|
12
|
-
},
|
|
13
|
-
data: {
|
|
14
|
-
type: Object,
|
|
15
|
-
default: () => {
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
emits: ["update:show"],
|
|
20
|
-
setup(l, { emit: H }) {
|
|
21
|
-
const B = Z(() => import("vuedraggable")), f = C(!1), J = w(() => ({
|
|
22
|
-
animation: 200,
|
|
23
|
-
group: "gallerys",
|
|
24
|
-
disabled: !1,
|
|
25
|
-
ghostClass: "ghost",
|
|
26
|
-
handle: ".drag-handle",
|
|
27
|
-
filter: ".arco-input, .arco-select, .arco-checkbox",
|
|
28
|
-
preventOnFilter: !1
|
|
29
|
-
})), S = (i) => i && i.length > 1, P = l, d = H, K = () => {
|
|
30
|
-
d("update:show", !1);
|
|
31
|
-
}, c = (i) => {
|
|
32
|
-
P.data.data.push({
|
|
33
|
-
id: T(),
|
|
34
|
-
type: "Video",
|
|
35
|
-
videoSrc: "",
|
|
36
|
-
imgSrc: "",
|
|
37
|
-
name: "",
|
|
38
|
-
key: "",
|
|
39
|
-
componentsDataJson: []
|
|
40
|
-
});
|
|
41
|
-
}, O = (i) => {
|
|
42
|
-
P.data.data = P.data.data.filter((e) => e.id !== i);
|
|
43
|
-
};
|
|
44
|
-
return (i, e) => {
|
|
45
|
-
const y = g("a-option"), p = g("a-select"), x = g("icon-plus"), k = g("a-button"), _ = g("icon-drag-arrow"), A = g("icon-delete"), I = g("a-input"), U = g("a-drawer");
|
|
46
|
-
return h(), L(U, {
|
|
47
|
-
width: "60%",
|
|
48
|
-
visible: l.show,
|
|
49
|
-
footer: !1,
|
|
50
|
-
onCancel: K,
|
|
51
|
-
unmountOnClose: ""
|
|
52
|
-
}, {
|
|
53
|
-
title: r(() => [
|
|
54
|
-
V(F(l.data.type) + "组件编辑 ", 1)
|
|
55
|
-
]),
|
|
56
|
-
default: r(() => [
|
|
57
|
-
a("div", ve, [
|
|
58
|
-
a("div", fe, [
|
|
59
|
-
e[11] || (e[11] = a("span", { class: "header-title" }, "组件宽度", -1)),
|
|
60
|
-
s(p, {
|
|
61
|
-
modelValue: l.data.width,
|
|
62
|
-
"onUpdate:modelValue": e[0] || (e[0] = (o) => l.data.width = o),
|
|
63
|
-
placeholder: "请选择",
|
|
64
|
-
"allow-clear": ""
|
|
65
|
-
}, {
|
|
66
|
-
default: r(() => [
|
|
67
|
-
s(y, { value: "default" }, {
|
|
68
|
-
default: r(() => [...e[7] || (e[7] = [
|
|
69
|
-
V("默认", -1)
|
|
70
|
-
])]),
|
|
71
|
-
_: 1
|
|
72
|
-
}),
|
|
73
|
-
s(y, { value: "small" }, {
|
|
74
|
-
default: r(() => [...e[8] || (e[8] = [
|
|
75
|
-
V("小", -1)
|
|
76
|
-
])]),
|
|
77
|
-
_: 1
|
|
78
|
-
}),
|
|
79
|
-
s(y, { value: "medium" }, {
|
|
80
|
-
default: r(() => [...e[9] || (e[9] = [
|
|
81
|
-
V("中", -1)
|
|
82
|
-
])]),
|
|
83
|
-
_: 1
|
|
84
|
-
}),
|
|
85
|
-
s(y, { value: "max" }, {
|
|
86
|
-
default: r(() => [...e[10] || (e[10] = [
|
|
87
|
-
V("大", -1)
|
|
88
|
-
])]),
|
|
89
|
-
_: 1
|
|
90
|
-
})
|
|
91
|
-
]),
|
|
92
|
-
_: 1
|
|
93
|
-
}, 8, ["modelValue"])
|
|
94
|
-
]),
|
|
95
|
-
a("div", ye, [
|
|
96
|
-
a("div", be, [
|
|
97
|
-
e[14] || (e[14] = a("h4", null, "List", -1)),
|
|
98
|
-
a("div", ge, [
|
|
99
|
-
s(k, {
|
|
100
|
-
type: "primary",
|
|
101
|
-
onClick: e[1] || (e[1] = (o) => c())
|
|
102
|
-
}, {
|
|
103
|
-
icon: r(() => [
|
|
104
|
-
s(x)
|
|
105
|
-
]),
|
|
106
|
-
default: r(() => [
|
|
107
|
-
e[12] || (e[12] = V(" 添加 Tab ", -1))
|
|
108
|
-
]),
|
|
109
|
-
_: 1
|
|
110
|
-
}),
|
|
111
|
-
s(k, {
|
|
112
|
-
type: "primary",
|
|
113
|
-
onClick: e[2] || (e[2] = (o) => c())
|
|
114
|
-
}, {
|
|
115
|
-
default: r(() => [...e[13] || (e[13] = [
|
|
116
|
-
V("粘贴 Tab", -1)
|
|
117
|
-
])]),
|
|
118
|
-
_: 1
|
|
119
|
-
})
|
|
120
|
-
])
|
|
121
|
-
]),
|
|
122
|
-
a("div", Ve, [
|
|
123
|
-
s(R(B), ee({
|
|
124
|
-
modelValue: l.data.data,
|
|
125
|
-
"onUpdate:modelValue": e[4] || (e[4] = (o) => l.data.data = o),
|
|
126
|
-
"component-data": {
|
|
127
|
-
tag: "div",
|
|
128
|
-
type: "transition-group",
|
|
129
|
-
name: f.value ? null : "flip-list"
|
|
130
|
-
}
|
|
131
|
-
}, J.value, {
|
|
132
|
-
disabled: !S(l.data.data),
|
|
133
|
-
onStart: e[5] || (e[5] = (o) => f.value = !0),
|
|
134
|
-
onEnd: e[6] || (e[6] = (o) => f.value = !1),
|
|
135
|
-
"item-key": "id"
|
|
136
|
-
}), {
|
|
137
|
-
item: r(({ element: o }) => [
|
|
138
|
-
(h(), D("div", {
|
|
139
|
-
class: $(["item-button draggable-item", {
|
|
140
|
-
"sortable-disabled": !S(l.data.data)
|
|
141
|
-
}]),
|
|
142
|
-
key: o.id
|
|
143
|
-
}, [
|
|
144
|
-
a("div", we, [
|
|
145
|
-
a("div", null, [
|
|
146
|
-
a("h5", null, F(o.name), 1),
|
|
147
|
-
a("span", null, F(o.key), 1)
|
|
148
|
-
]),
|
|
149
|
-
a("div", he, [
|
|
150
|
-
S(l.data.data) ? (h(), D("div", ke, [
|
|
151
|
-
s(_, { class: "drag-icon" })
|
|
152
|
-
])) : E("", !0),
|
|
153
|
-
s(A, {
|
|
154
|
-
class: "btn-delete",
|
|
155
|
-
onClick: (v) => O(o.id)
|
|
156
|
-
}, null, 8, ["onClick"]),
|
|
157
|
-
s(k, {
|
|
158
|
-
size: "mini",
|
|
159
|
-
type: "primary",
|
|
160
|
-
onClick: e[3] || (e[3] = (v) => c())
|
|
161
|
-
}, {
|
|
162
|
-
default: r(() => [...e[15] || (e[15] = [
|
|
163
|
-
V("复制 Tab", -1)
|
|
164
|
-
])]),
|
|
165
|
-
_: 1
|
|
166
|
-
})
|
|
167
|
-
])
|
|
168
|
-
]),
|
|
169
|
-
e[16] || (e[16] = a("p", { class: "item-title" }, "Tab名称", -1)),
|
|
170
|
-
s(I, {
|
|
171
|
-
modelValue: o.name,
|
|
172
|
-
"onUpdate:modelValue": (v) => o.name = v,
|
|
173
|
-
placeholder: "请输入标题",
|
|
174
|
-
"allow-clear": ""
|
|
175
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
176
|
-
e[17] || (e[17] = a("p", { class: "item-title" }, "Key", -1)),
|
|
177
|
-
s(I, {
|
|
178
|
-
modelValue: o.key,
|
|
179
|
-
"onUpdate:modelValue": (v) => o.key = v,
|
|
180
|
-
placeholder: "请输入key",
|
|
181
|
-
"allow-clear": ""
|
|
182
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
183
|
-
e[18] || (e[18] = a("p", null, "components", -1)),
|
|
184
|
-
a("div", Ce, [
|
|
185
|
-
s(se, {
|
|
186
|
-
data: o.componentsDataJson,
|
|
187
|
-
onUpdate: (v) => o.componentsDataJson = v
|
|
188
|
-
}, null, 8, ["data", "onUpdate"])
|
|
189
|
-
])
|
|
190
|
-
], 2))
|
|
191
|
-
]),
|
|
192
|
-
_: 1
|
|
193
|
-
}, 16, ["modelValue", "component-data", "disabled"])
|
|
194
|
-
])
|
|
195
|
-
])
|
|
196
|
-
])
|
|
197
|
-
]),
|
|
198
|
-
_: 1
|
|
199
|
-
}, 8, ["visible"]);
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
}), _e = /* @__PURE__ */ j(xe, [["__scopeId", "data-v-f4b12dfa"]]), $e = { class: "tab-default__content" }, Te = {
|
|
203
|
-
"data-aos": "fade-in",
|
|
204
|
-
"data-aos-duration": "1500",
|
|
205
|
-
class: "aos-init aos-animate"
|
|
206
|
-
}, De = { class: "component-wrapper" }, Se = { class: "tab-timeline__mobile" }, Pe = {
|
|
207
|
-
__name: "index",
|
|
208
|
-
props: {
|
|
209
|
-
modelValue: {
|
|
210
|
-
type: Object,
|
|
211
|
-
default: () => {
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
// 是否预览
|
|
215
|
-
isPreview: {
|
|
216
|
-
type: Boolean,
|
|
217
|
-
default: !0
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
|
-
emits: ["update:modelValue", "handleDelete", "handleCopy", "handlePaste"],
|
|
221
|
-
setup(l, { emit: H }) {
|
|
222
|
-
const { proxy: B } = te(), { $_vsWidth: f, $_vsScrollY: J, $vsScreenAddListener: S, $vsScreenDestroyListener: P } = B, d = l, K = H, c = de(), O = ie(), i = C(null), e = C(null), y = w(() => {
|
|
223
|
-
var t;
|
|
224
|
-
return (t = d.modelValue) == null ? void 0 : t.data;
|
|
225
|
-
}), p = C(0), x = C(!1), k = C(!1), _ = C(!1), A = w(() => {
|
|
226
|
-
var t;
|
|
227
|
-
return ((t = d.modelValue) == null ? void 0 : t.classes) ?? null;
|
|
228
|
-
}), I = w(() => {
|
|
229
|
-
var t;
|
|
230
|
-
return ((t = d.modelValue) == null ? void 0 : t.style) ?? null;
|
|
231
|
-
});
|
|
232
|
-
w(() => {
|
|
233
|
-
var t;
|
|
234
|
-
return (t = d.modelValue) == null ? void 0 : t.width;
|
|
235
|
-
});
|
|
236
|
-
const U = w(() => {
|
|
237
|
-
var t;
|
|
238
|
-
return (t = d.modelValue) == null ? void 0 : t.id;
|
|
239
|
-
}), o = w(() => {
|
|
240
|
-
var t;
|
|
241
|
-
return (t = d.modelValue) != null && t.bgColor ? d.modelValue.bgColor : f.value >= 768 ? "bg-neutral-lightest" : null;
|
|
242
|
-
}), v = w(() => {
|
|
243
|
-
var n;
|
|
244
|
-
if (!((n = d.modelValue) != null && n.data) || !Array.isArray(d.modelValue.data))
|
|
245
|
-
return [];
|
|
246
|
-
const t = d.modelValue.data[p.value];
|
|
247
|
-
return t ? t.componentsDataJson || [] : [];
|
|
248
|
-
}), W = () => {
|
|
249
|
-
var n;
|
|
250
|
-
if (d.modelValue && d.modelValue.data) {
|
|
251
|
-
setTimeout(() => {
|
|
252
|
-
var u;
|
|
253
|
-
selectTab((u = d.modelValue) == null ? void 0 : u.data[0].id);
|
|
254
|
-
}, 0);
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
const t = {
|
|
258
|
-
id: ((n = d.modelValue) == null ? void 0 : n.id) || T(),
|
|
259
|
-
//componentKey
|
|
260
|
-
type: "TabTimeLine",
|
|
261
|
-
containerWidth: "",
|
|
262
|
-
bgColor: "",
|
|
263
|
-
classes: "custom-class another-class",
|
|
264
|
-
style: {
|
|
265
|
-
// marginTop: "20px",
|
|
266
|
-
// backgroundColor: "#f5f5f5",
|
|
267
|
-
},
|
|
268
|
-
width: "container-content-middle",
|
|
269
|
-
data: [
|
|
270
|
-
//list
|
|
271
|
-
{
|
|
272
|
-
id: T(),
|
|
273
|
-
key: "11111111",
|
|
274
|
-
name: "tab1",
|
|
275
|
-
componentsDataJson: []
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
id: T(),
|
|
279
|
-
key: "2222",
|
|
280
|
-
name: "tab2",
|
|
281
|
-
componentsDataJson: []
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
id: T(),
|
|
285
|
-
key: "33333",
|
|
286
|
-
name: "tab3",
|
|
287
|
-
componentsDataJson: []
|
|
288
|
-
}
|
|
289
|
-
]
|
|
290
|
-
};
|
|
291
|
-
K("update:modelValue", t), p.value = t.data[0].id;
|
|
292
|
-
}, Y = () => {
|
|
293
|
-
if (!e.value || !i.value) return;
|
|
294
|
-
const t = e.value.getBoundingClientRect().top, n = i.value.getBoundingClientRect().top, u = i.value.getBoundingClientRect().bottom, b = +window.getComputedStyle(document.body).getPropertyValue("--header-height-calc").split("px")[0];
|
|
295
|
-
if (n > b || u < b) {
|
|
296
|
-
x.value = !1;
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
t <= b && (x.value = !0);
|
|
300
|
-
}, Q = () => {
|
|
301
|
-
if (f.value <= 768) return;
|
|
302
|
-
const t = i.value, u = pe(t).y - 150;
|
|
303
|
-
window.scroll({ top: u, left: 0, behavior: "smooth" });
|
|
304
|
-
}, N = () => {
|
|
305
|
-
var u;
|
|
306
|
-
const t = c.query.tab_timeline, n = (u = y.value) == null ? void 0 : u.findIndex((b) => b.key == t);
|
|
307
|
-
n > -1 ? p.value = n : p.value = 0;
|
|
308
|
-
}, G = (t) => {
|
|
309
|
-
debugger;
|
|
310
|
-
p.value = t, O.push({
|
|
311
|
-
path: c.path,
|
|
312
|
-
query: {
|
|
313
|
-
...c.query,
|
|
314
|
-
tab_timeline: y.value[t].key
|
|
315
|
-
},
|
|
316
|
-
hash: c.hash
|
|
317
|
-
});
|
|
318
|
-
};
|
|
319
|
-
return q(
|
|
320
|
-
() => J.value,
|
|
321
|
-
() => {
|
|
322
|
-
console.log("==========$_vsScrollY.value"), Y();
|
|
323
|
-
}
|
|
324
|
-
), q(p, () => {
|
|
325
|
-
Q();
|
|
326
|
-
}), q(
|
|
327
|
-
() => c.query.tab_line,
|
|
328
|
-
() => {
|
|
329
|
-
N();
|
|
330
|
-
}
|
|
331
|
-
), W(), ae(() => {
|
|
332
|
-
N();
|
|
333
|
-
}), (t, n) => {
|
|
334
|
-
var u, b;
|
|
335
|
-
return h(), D("div", {
|
|
336
|
-
class: $(["tab-timeline", A.value]),
|
|
337
|
-
ref_key: "wrapper",
|
|
338
|
-
ref: i,
|
|
339
|
-
style: ne(I.value),
|
|
340
|
-
onMouseover: n[3] || (n[3] = (m) => _.value = !0),
|
|
341
|
-
onMouseout: n[4] || (n[4] = (m) => _.value = !1)
|
|
342
|
-
}, [
|
|
343
|
-
a("div", {
|
|
344
|
-
class: $(["tab-timeline__wrapper", [(u = l.modelValue) != null && u.width ? `container-content-${(b = l.modelValue) == null ? void 0 : b.width}` : "container-content"]])
|
|
345
|
-
}, [
|
|
346
|
-
z(a("div", {
|
|
347
|
-
class: $(["tab-timeline__desktop", [o.value]])
|
|
348
|
-
}, [
|
|
349
|
-
a("div", {
|
|
350
|
-
class: $(["tab-timeline__hold", { "is-fixed": x.value }])
|
|
351
|
-
}, [
|
|
352
|
-
a("div", {
|
|
353
|
-
class: "tab-timeline__nav",
|
|
354
|
-
ref_key: "tab",
|
|
355
|
-
ref: e
|
|
356
|
-
}, [
|
|
357
|
-
s(ue, {
|
|
358
|
-
list: y.value,
|
|
359
|
-
isFixed: x.value,
|
|
360
|
-
currentIdx: p.value,
|
|
361
|
-
onUpdateIdx: G,
|
|
362
|
-
componentKey: U.value
|
|
363
|
-
}, null, 8, ["list", "isFixed", "currentIdx", "componentKey"])
|
|
364
|
-
], 512)
|
|
365
|
-
], 2),
|
|
366
|
-
a("div", $e, [
|
|
367
|
-
a("div", Te, [
|
|
368
|
-
(h(!0), D(oe, null, le(v.value, (m, Ie) => (h(), D("div", {
|
|
369
|
-
key: m.id,
|
|
370
|
-
class: "page-item"
|
|
371
|
-
}, [
|
|
372
|
-
a("div", De, [
|
|
373
|
-
s(re, {
|
|
374
|
-
type: m.type,
|
|
375
|
-
"props-data": { modelValue: m }
|
|
376
|
-
}, null, 8, ["type", "props-data"])
|
|
377
|
-
])
|
|
378
|
-
]))), 128))
|
|
379
|
-
])
|
|
380
|
-
])
|
|
381
|
-
], 2), [
|
|
382
|
-
[M, R(f) >= 768]
|
|
383
|
-
]),
|
|
384
|
-
z(a("div", Se, [
|
|
385
|
-
s(me, {
|
|
386
|
-
modelValue: l.modelValue,
|
|
387
|
-
componentKey: U.value
|
|
388
|
-
}, null, 8, ["modelValue", "componentKey"])
|
|
389
|
-
], 512), [
|
|
390
|
-
[M, R(f) < 768]
|
|
391
|
-
]),
|
|
392
|
-
l.isPreview ? E("", !0) : (h(), L(ce, {
|
|
393
|
-
key: 0,
|
|
394
|
-
show: _.value,
|
|
395
|
-
"onUpdate:show": n[0] || (n[0] = (m) => _.value = m),
|
|
396
|
-
onHandleEdit: n[1] || (n[1] = (m) => k.value = !0),
|
|
397
|
-
onHandleDelete: t.handleDelete,
|
|
398
|
-
onHandleCopy: t.handleCopy,
|
|
399
|
-
onHandlePaste: t.handlePaste
|
|
400
|
-
}, null, 8, ["show", "onHandleDelete", "onHandleCopy", "onHandlePaste"]))
|
|
401
|
-
], 2),
|
|
402
|
-
l.isPreview ? E("", !0) : (h(), L(_e, {
|
|
403
|
-
key: 0,
|
|
404
|
-
show: k.value,
|
|
405
|
-
"onUpdate:show": n[2] || (n[2] = (m) => k.value = m),
|
|
406
|
-
data: l.modelValue
|
|
407
|
-
}, null, 8, ["show", "data"]))
|
|
408
|
-
], 38);
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
}, Be = /* @__PURE__ */ j(Pe, [["__scopeId", "data-v-1d36ae44"]]);
|
|
412
|
-
export {
|
|
413
|
-
Be as default
|
|
414
|
-
};
|
package/dist/index-BlREL57D.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-C0VvLaXk.js");exports.default=e.d;
|
package/dist/index-BmAKDKvH.mjs
DELETED
package/dist/index-CdakOmJX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var H=Object.create;var _=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var O=(a,i,p,c)=>{if(i&&typeof i=="object"||typeof i=="function")for(let v of q(i))!K.call(a,v)&&v!==p&&_(a,v,{get:()=>i[v],enumerable:!(c=J(i,v))||c.enumerable});return a};var F=(a,i,p)=>(p=a!=null?H(z(a)):{},O(i||!a||!a.__esModule?_(p,"default",{value:a,enumerable:!0}):p,a));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-C0VvLaXk.js"),A={class:"setting-content"},L={class:"setting-header flex items-center"},M={class:"setting-body"},j={class:"setting-toolbar"},R={class:"tools"},W={class:"setting-item"},Y={class:"item-header"},Q={class:"btn-group"},G={key:0,class:"drag-handle"},X={class:"components-content"},Z=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(a,{emit:i}){const p=e.defineAsyncComponent(()=>import("vuedraggable")),c=e.ref(!1),v=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),g=r=>r&&r.length>1,x=a,d=i,T=()=>{d("update:show",!1)},V=r=>{x.data.data.push({id:s.r(),type:"Video",videoSrc:"",imgSrc:"",name:"",key:"",componentsDataJson:[]})},B=r=>{x.data.data=x.data.data.filter(t=>t.id!==r)};return(r,t)=>{const w=e.resolveComponent("a-option"),f=e.resolveComponent("a-select"),h=e.resolveComponent("icon-plus"),N=e.resolveComponent("a-button"),C=e.resolveComponent("icon-drag-arrow"),$=e.resolveComponent("icon-delete"),k=e.resolveComponent("a-input"),E=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(E,{width:"60%",visible:a.show,footer:!1,onCancel:T,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",A,[e.createElementVNode("div",L,[t[11]||(t[11]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(f,{modelValue:a.data.width,"onUpdate:modelValue":t[0]||(t[0]=l=>a.data.width=l),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(w,{value:"default"},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(w,{value:"small"},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(w,{value:"medium"},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(w,{value:"max"},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",M,[e.createElementVNode("div",j,[t[14]||(t[14]=e.createElementVNode("h4",null,"List",-1)),e.createElementVNode("div",R,[e.createVNode(N,{type:"primary",onClick:t[1]||(t[1]=l=>V())},{icon:e.withCtx(()=>[e.createVNode(h)]),default:e.withCtx(()=>[t[12]||(t[12]=e.createTextVNode(" 添加 Tab ",-1))]),_:1}),e.createVNode(N,{type:"primary",onClick:t[2]||(t[2]=l=>V())},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",W,[e.createVNode(e.unref(p),e.mergeProps({modelValue:a.data.data,"onUpdate:modelValue":t[4]||(t[4]=l=>a.data.data=l),"component-data":{tag:"div",type:"transition-group",name:c.value?null:"flip-list"}},v.value,{disabled:!g(a.data.data),onStart:t[5]||(t[5]=l=>c.value=!0),onEnd:t[6]||(t[6]=l=>c.value=!1),"item-key":"id"}),{item:e.withCtx(({element:l})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!g(a.data.data)}]),key:l.id},[e.createElementVNode("div",Y,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(l.name),1),e.createElementVNode("span",null,e.toDisplayString(l.key),1)]),e.createElementVNode("div",Q,[g(a.data.data)?(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(C,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode($,{class:"btn-delete",onClick:y=>B(l.id)},null,8,["onClick"]),e.createVNode(N,{size:"mini",type:"primary",onClick:t[3]||(t[3]=y=>V())},{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),t[16]||(t[16]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(k,{modelValue:l.name,"onUpdate:modelValue":y=>l.name=y,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),t[17]||(t[17]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(k,{modelValue:l.key,"onUpdate:modelValue":y=>l.key=y,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),t[18]||(t[18]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",X,[e.createVNode(s.P,{data:l.componentsDataJson,onUpdate:y=>l.componentsDataJson=y},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),ee=s._(Z,[["__scopeId","data-v-f4b12dfa"]]),te={class:"tab-default__content"},oe={"data-aos":"fade-in","data-aos-duration":"1500",class:"aos-init aos-animate"},ae={class:"component-wrapper"},ne={class:"tab-timeline__mobile"},le={__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(a,{emit:i}){const{proxy:p}=e.getCurrentInstance(),{$_vsWidth:c,$_vsScrollY:v,$vsScreenAddListener:g,$vsScreenDestroyListener:x}=p,d=a,T=i,V=s.u(),B=s.a(),r=e.ref(null),t=e.ref(null),w=e.computed(()=>{var o;return(o=d.modelValue)==null?void 0:o.data}),f=e.ref(0),h=e.ref(!1),N=e.ref(!1),C=e.ref(!1),$=e.computed(()=>{var o;return((o=d.modelValue)==null?void 0:o.classes)??null}),k=e.computed(()=>{var o;return((o=d.modelValue)==null?void 0:o.style)??null});e.computed(()=>{var o;return(o=d.modelValue)==null?void 0:o.width});const E=e.computed(()=>{var o;return(o=d.modelValue)==null?void 0:o.id}),l=e.computed(()=>{var o;return(o=d.modelValue)!=null&&o.bgColor?d.modelValue.bgColor:c.value>=768?"bg-neutral-lightest":null}),y=e.computed(()=>{var n;if(!((n=d.modelValue)!=null&&n.data)||!Array.isArray(d.modelValue.data))return[];const o=d.modelValue.data[f.value];return o?o.componentsDataJson||[]:[]}),S=()=>{var n;if(d.modelValue&&d.modelValue.data){setTimeout(()=>{var u;selectTab((u=d.modelValue)==null?void 0:u.data[0].id)},0);return}const o={id:((n=d.modelValue)==null?void 0:n.id)||s.r(),type:"TabTimeLine",containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"container-content-middle",data:[{id:s.r(),key:"11111111",name:"tab1",componentsDataJson:[]},{id:s.r(),key:"2222",name:"tab2",componentsDataJson:[]},{id:s.r(),key:"33333",name:"tab3",componentsDataJson:[]}]};T("update:modelValue",o),f.value=o.data[0].id},P=()=>{if(!t.value||!r.value)return;const o=t.value.getBoundingClientRect().top,n=r.value.getBoundingClientRect().top,u=r.value.getBoundingClientRect().bottom,b=+window.getComputedStyle(document.body).getPropertyValue("--header-height-calc").split("px")[0];if(n>b||u<b){h.value=!1;return}o<=b&&(h.value=!0)},I=()=>{if(c.value<=768)return;const o=r.value,u=s.$(o).y-150;window.scroll({top:u,left:0,behavior:"smooth"})},D=()=>{var u;const o=V.query.tab_timeline,n=(u=w.value)==null?void 0:u.findIndex(b=>b.key==o);n>-1?f.value=n:f.value=0},U=o=>{debugger;f.value=o,B.push({path:V.path,query:{...V.query,tab_timeline:w.value[o].key},hash:V.hash})};return e.watch(()=>v.value,()=>{console.log("==========$_vsScrollY.value"),P()}),e.watch(f,()=>{I()}),e.watch(()=>V.query.tab_line,()=>{D()}),S(),e.onMounted(()=>{D()}),(o,n)=>{var u,b;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-timeline",$.value]),ref_key:"wrapper",ref:r,style:e.normalizeStyle(k.value),onMouseover:n[3]||(n[3]=m=>C.value=!0),onMouseout:n[4]||(n[4]=m=>C.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__wrapper",[(u=a.modelValue)!=null&&u.width?`container-content-${(b=a.modelValue)==null?void 0:b.width}`:"container-content"]])},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__desktop",[l.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__hold",{"is-fixed":h.value}])},[e.createElementVNode("div",{class:"tab-timeline__nav",ref_key:"tab",ref:t},[e.createVNode(s.T,{list:w.value,isFixed:h.value,currentIdx:f.value,onUpdateIdx:U,componentKey:E.value},null,8,["list","isFixed","currentIdx","componentKey"])],512)],2),e.createElementVNode("div",te,[e.createElementVNode("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(m,se)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:"page-item"},[e.createElementVNode("div",ae,[e.createVNode(s.b,{type:m.type,"props-data":{modelValue:m}},null,8,["type","props-data"])])]))),128))])])],2),[[e.vShow,e.unref(c)>=768]]),e.withDirectives(e.createElementVNode("div",ne,[e.createVNode(s.c,{modelValue:a.modelValue,componentKey:E.value},null,8,["modelValue","componentKey"])],512),[[e.vShow,e.unref(c)<768]]),a.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s.O,{key:0,show:C.value,"onUpdate:show":n[0]||(n[0]=m=>C.value=m),onHandleEdit:n[1]||(n[1]=m=>N.value=!0),onHandleDelete:o.handleDelete,onHandleCopy:o.handleCopy,onHandlePaste:o.handlePaste},null,8,["show","onHandleDelete","onHandleCopy","onHandlePaste"]))],2),a.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ee,{key:0,show:N.value,"onUpdate:show":n[2]||(n[2]=m=>N.value=m),data:a.modelValue},null,8,["show","data"]))],38)}}},de=s._(le,[["__scopeId","data-v-1d36ae44"]]);exports.default=de;
|