officialblock 2.1.6 → 2.1.8
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-DcjvupYq.mjs → index-Cdu-SB6F.mjs} +19946 -17798
- package/dist/index-CeyvU2LF.mjs +4 -0
- package/dist/index-D5Syws8E.js +1 -0
- package/dist/index-DhaWttC4.js +243 -0
- package/dist/{index-B1yWv0YS.js → index-DilJUiNb.js} +1 -1
- package/dist/{index-Em3TAL8o.js → index-U5IR8xhe.js} +1 -1
- package/dist/{index-7OmxLW6F.mjs → index-epdO2n6s.mjs} +1 -1
- package/dist/{index-Cp-cdRqx.mjs → index-hW7vH2sN.mjs} +1 -1
- package/dist/official-block.cjs.js +1 -1
- package/dist/official-block.es.js +131 -121
- package/dist/official-block.umd.js +45 -40
- package/dist/style.css +1 -1
- package/package.json +3 -1
- package/dist/index-BOG-7Ghe.js +0 -1
- package/dist/index-BXzRwf_F.js +0 -1
- package/dist/index-BdqQKcnl.js +0 -1
- package/dist/index-CU8BeqSQ.js +0 -238
- package/dist/index-CmKQGmlH.mjs +0 -304
- package/dist/index-D1DP-U_o.mjs +0 -609
- package/dist/index-DacD9d4A.js +0 -1
- package/dist/index-DeRtxVh8.mjs +0 -642
- package/dist/index-Z8RYRTX6.js +0 -1
- package/dist/index-k5A3MqeE.mjs +0 -4
- package/dist/index-omKkljt7.mjs +0 -357
package/dist/index-CmKQGmlH.mjs
DELETED
|
@@ -1,304 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Y, ref as k, resolveComponent as g, createBlock as f, openBlock as i, withCtx as w, createElementVNode as a, createVNode as u, createElementBlock as p, Fragment as N, renderList as O, createTextVNode as B, toDisplayString as H, normalizeStyle as E, computed as d, createCommentVNode as $, normalizeClass as U } from "vue";
|
|
2
|
-
import { P as j, _ as A, i as M, a as R, O as T, r as D } from "./index-DcjvupYq.mjs";
|
|
3
|
-
const F = { class: "setting-content" }, J = { class: "setting-header flex items-center" }, L = { class: "setting-header flex items-center" }, W = { class: "setting-header flex items-center" }, q = { class: "setting-header flex items-center" }, G = { class: "setting-header flex items-center" }, K = { class: "setting-header flex items-center" }, Q = { class: "preview-container" }, X = ["src"], Z = {
|
|
4
|
-
key: 1,
|
|
5
|
-
class: "no-preview"
|
|
6
|
-
}, _ = { class: "setting-body" }, ee = { class: "setting-item" }, te = { class: "components-content" }, ae = /* @__PURE__ */ Y({
|
|
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(o, { emit: h }) {
|
|
21
|
-
const n = o, v = k([
|
|
22
|
-
{
|
|
23
|
-
id: "preset-1",
|
|
24
|
-
name: "YCCECE Background 1",
|
|
25
|
-
image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-01.svg",
|
|
26
|
-
size: "cover",
|
|
27
|
-
position: "center center"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: "preset-2",
|
|
31
|
-
name: "YCCECE Background 2",
|
|
32
|
-
image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-02.svg",
|
|
33
|
-
size: "",
|
|
34
|
-
position: ""
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: "preset-3",
|
|
38
|
-
name: "YCCECE Background 3",
|
|
39
|
-
image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",
|
|
40
|
-
size: "cover",
|
|
41
|
-
position: ""
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "preset-4",
|
|
45
|
-
name: "YCCECE Background 4",
|
|
46
|
-
image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-04.svg",
|
|
47
|
-
size: "cover",
|
|
48
|
-
position: ""
|
|
49
|
-
}
|
|
50
|
-
]), m = k(), c = v.value.find((r) => r.image === n.data.backgroundImage);
|
|
51
|
-
m.value = c ? c.id : "";
|
|
52
|
-
const b = () => {
|
|
53
|
-
const r = v.value.find((t) => t.id === m.value);
|
|
54
|
-
r && (n.data.backgroundImage = `${r.image}`, n.data.backgroundSize = r.size, n.data.backgroundPosition = r.position);
|
|
55
|
-
}, V = h, C = () => {
|
|
56
|
-
V("update:show", !1);
|
|
57
|
-
};
|
|
58
|
-
return (r, t) => {
|
|
59
|
-
const P = g("a-switch"), x = g("a-option"), S = g("a-select"), z = g("a-button"), y = g("a-input"), I = g("a-drawer");
|
|
60
|
-
return i(), f(I, {
|
|
61
|
-
width: "60%",
|
|
62
|
-
visible: o.show,
|
|
63
|
-
footer: !1,
|
|
64
|
-
onCancel: C,
|
|
65
|
-
unmountOnClose: ""
|
|
66
|
-
}, {
|
|
67
|
-
title: w(() => [
|
|
68
|
-
B(H(o.data.type) + "组件编辑 ", 1)
|
|
69
|
-
]),
|
|
70
|
-
default: w(() => [
|
|
71
|
-
a("div", F, [
|
|
72
|
-
a("div", J, [
|
|
73
|
-
t[6] || (t[6] = a("span", { class: "header-title" }, "仅显示PC端", -1)),
|
|
74
|
-
u(P, {
|
|
75
|
-
modelValue: o.data.onlyShowPc,
|
|
76
|
-
"onUpdate:modelValue": t[0] || (t[0] = (e) => o.data.onlyShowPc = e)
|
|
77
|
-
}, null, 8, ["modelValue"])
|
|
78
|
-
]),
|
|
79
|
-
a("div", L, [
|
|
80
|
-
t[8] || (t[8] = a("span", { class: "header-title" }, "Background Preset", -1)),
|
|
81
|
-
u(S, {
|
|
82
|
-
modelValue: m.value,
|
|
83
|
-
"onUpdate:modelValue": t[1] || (t[1] = (e) => m.value = e),
|
|
84
|
-
style: { width: "300px", "margin-right": "8px" }
|
|
85
|
-
}, {
|
|
86
|
-
default: w(() => [
|
|
87
|
-
(i(!0), p(N, null, O(v.value, (e) => (i(), f(x, {
|
|
88
|
-
value: e.id,
|
|
89
|
-
key: e.id
|
|
90
|
-
}, {
|
|
91
|
-
default: w(() => [
|
|
92
|
-
B(H(e.name), 1)
|
|
93
|
-
]),
|
|
94
|
-
_: 2
|
|
95
|
-
}, 1032, ["value"]))), 128))
|
|
96
|
-
]),
|
|
97
|
-
_: 1
|
|
98
|
-
}, 8, ["modelValue"]),
|
|
99
|
-
u(z, {
|
|
100
|
-
type: "primary",
|
|
101
|
-
onClick: b
|
|
102
|
-
}, {
|
|
103
|
-
default: w(() => [...t[7] || (t[7] = [
|
|
104
|
-
B("Apply", -1)
|
|
105
|
-
])]),
|
|
106
|
-
_: 1
|
|
107
|
-
})
|
|
108
|
-
]),
|
|
109
|
-
a("div", W, [
|
|
110
|
-
t[9] || (t[9] = a("span", { class: "header-title" }, "Image", -1)),
|
|
111
|
-
u(y, {
|
|
112
|
-
modelValue: o.data.backgroundImage,
|
|
113
|
-
"onUpdate:modelValue": t[2] || (t[2] = (e) => o.data.backgroundImage = e),
|
|
114
|
-
disabled: !0,
|
|
115
|
-
placeholder: "图片路径",
|
|
116
|
-
style: { width: "300px" }
|
|
117
|
-
}, null, 8, ["modelValue"])
|
|
118
|
-
]),
|
|
119
|
-
a("div", q, [
|
|
120
|
-
t[10] || (t[10] = a("span", { class: "header-title" }, "Size", -1)),
|
|
121
|
-
u(y, {
|
|
122
|
-
modelValue: o.data.backgroundSize,
|
|
123
|
-
"onUpdate:modelValue": t[3] || (t[3] = (e) => o.data.backgroundSize = e),
|
|
124
|
-
disabled: !0,
|
|
125
|
-
placeholder: "尺寸",
|
|
126
|
-
style: { width: "300px" }
|
|
127
|
-
}, null, 8, ["modelValue"])
|
|
128
|
-
]),
|
|
129
|
-
a("div", G, [
|
|
130
|
-
t[11] || (t[11] = a("span", { class: "header-title" }, "Position", -1)),
|
|
131
|
-
u(y, {
|
|
132
|
-
modelValue: o.data.backgroundPosition,
|
|
133
|
-
"onUpdate:modelValue": t[4] || (t[4] = (e) => o.data.backgroundPosition = e),
|
|
134
|
-
disabled: !0,
|
|
135
|
-
placeholder: "位置",
|
|
136
|
-
style: { width: "300px" }
|
|
137
|
-
}, null, 8, ["modelValue"])
|
|
138
|
-
]),
|
|
139
|
-
a("div", K, [
|
|
140
|
-
t[13] || (t[13] = a("span", { class: "header-title" }, "Preview", -1)),
|
|
141
|
-
a("div", Q, [
|
|
142
|
-
o.data.backgroundImage ? (i(), p("img", {
|
|
143
|
-
key: 0,
|
|
144
|
-
src: o.data.backgroundImage,
|
|
145
|
-
style: E({
|
|
146
|
-
"object-fit": o.data.backgroundSize || "cover",
|
|
147
|
-
"background-position": o.data.backgroundPosition || "center center",
|
|
148
|
-
width: "100%",
|
|
149
|
-
height: "100px",
|
|
150
|
-
border: "1px solid #ddd"
|
|
151
|
-
}),
|
|
152
|
-
alt: "Background Preview"
|
|
153
|
-
}, null, 12, X)) : (i(), p("div", Z, "No preview available")),
|
|
154
|
-
t[12] || (t[12] = a("p", { class: "preview-note" }, " A light grey background has been applied for previewing and will not be reflected on website. ", -1))
|
|
155
|
-
])
|
|
156
|
-
]),
|
|
157
|
-
a("div", _, [
|
|
158
|
-
t[14] || (t[14] = a("div", { class: "setting-toolbar" }, [
|
|
159
|
-
a("h4", null, "组件")
|
|
160
|
-
], -1)),
|
|
161
|
-
a("div", ee, [
|
|
162
|
-
a("div", te, [
|
|
163
|
-
u(j, {
|
|
164
|
-
data: o.data.data,
|
|
165
|
-
onUpdate: t[5] || (t[5] = (e) => o.data.data = e)
|
|
166
|
-
}, null, 8, ["data"])
|
|
167
|
-
])
|
|
168
|
-
])
|
|
169
|
-
])
|
|
170
|
-
])
|
|
171
|
-
]),
|
|
172
|
-
_: 1
|
|
173
|
-
}, 8, ["visible"]);
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
}), oe = /* @__PURE__ */ A(ae, [["__scopeId", "data-v-f43efd7b"]]), ne = { class: "component-wrapper" }, le = {
|
|
177
|
-
__name: "index",
|
|
178
|
-
props: {
|
|
179
|
-
modelValue: {
|
|
180
|
-
type: Object,
|
|
181
|
-
default: () => {
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
// 是否预览
|
|
185
|
-
isPreview: {
|
|
186
|
-
type: Boolean,
|
|
187
|
-
default: !0
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
emits: ["update:modelValue", "handleDelete", "handleCopy", "handlePaste"],
|
|
191
|
-
setup(o, { emit: h }) {
|
|
192
|
-
const n = o, v = h, m = d(() => {
|
|
193
|
-
var e, l;
|
|
194
|
-
return !((e = n.modelValue) != null && e.data) || !Array.isArray(n.modelValue.data) ? [] : (l = n.modelValue) == null ? void 0 : l.data;
|
|
195
|
-
}), c = k(!1), b = k(!1), V = () => {
|
|
196
|
-
var l, s;
|
|
197
|
-
if (n.modelValue && n.modelValue.data)
|
|
198
|
-
return;
|
|
199
|
-
const e = {
|
|
200
|
-
id: ((l = n.modelValue) == null ? void 0 : l.id) || D(),
|
|
201
|
-
//componentKey
|
|
202
|
-
type: "BackgroundWrapper",
|
|
203
|
-
onlyShowPc: !1,
|
|
204
|
-
backgroundImage: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-01.svg",
|
|
205
|
-
backgroundSize: "cover",
|
|
206
|
-
backgroundPosition: "center center",
|
|
207
|
-
data: [
|
|
208
|
-
{
|
|
209
|
-
id: ((s = n.modelValue) == null ? void 0 : s.id) || D(),
|
|
210
|
-
type: "CustomText",
|
|
211
|
-
onlyShowPc: !1,
|
|
212
|
-
data: {
|
|
213
|
-
width: 1920,
|
|
214
|
-
backgroundColor: "#ffffff",
|
|
215
|
-
title: "这是标题",
|
|
216
|
-
description: "这是描述"
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
]
|
|
220
|
-
};
|
|
221
|
-
v("update:modelValue", e);
|
|
222
|
-
}, C = d(() => {
|
|
223
|
-
var e;
|
|
224
|
-
return n.isPreview ? !((e = n.modelValue) != null && e.onlyShowPc) || !M() : !0;
|
|
225
|
-
}), r = d(() => {
|
|
226
|
-
var e;
|
|
227
|
-
return ((e = n.modelValue) == null ? void 0 : e.classes) ?? null;
|
|
228
|
-
}), t = d(() => {
|
|
229
|
-
var e;
|
|
230
|
-
return ((e = n.modelValue) == null ? void 0 : e.style) ?? null;
|
|
231
|
-
}), P = d(() => {
|
|
232
|
-
var e;
|
|
233
|
-
return ((e = n.modelValue) == null ? void 0 : e.width) ?? null;
|
|
234
|
-
}), x = d(() => {
|
|
235
|
-
var e;
|
|
236
|
-
return ((e = n.modelValue) == null ? void 0 : e.backgroundImage) ?? "";
|
|
237
|
-
}), S = d(() => {
|
|
238
|
-
var e;
|
|
239
|
-
return ((e = n.modelValue) == null ? void 0 : e.backgroundColor) ?? "transparent";
|
|
240
|
-
}), z = d(() => {
|
|
241
|
-
var e;
|
|
242
|
-
return ((e = n.modelValue) == null ? void 0 : e.backgroundSize) ?? "contain";
|
|
243
|
-
}), y = d(() => {
|
|
244
|
-
var e;
|
|
245
|
-
return ((e = n.modelValue) == null ? void 0 : e.backgroundPosition) ?? "center";
|
|
246
|
-
}), I = d(() => {
|
|
247
|
-
var e;
|
|
248
|
-
return ((e = n.modelValue) == null ? void 0 : e.backgroundRepeat) ?? "no-repeat";
|
|
249
|
-
});
|
|
250
|
-
return V(), (e, l) => C.value ? (i(), p("div", {
|
|
251
|
-
key: 0,
|
|
252
|
-
class: U(["background-wrapper", r.value]),
|
|
253
|
-
style: E(t.value)
|
|
254
|
-
}, [
|
|
255
|
-
a("div", {
|
|
256
|
-
class: U(P.value),
|
|
257
|
-
style: { position: "relative" },
|
|
258
|
-
onMouseover: l[2] || (l[2] = (s) => c.value = !0),
|
|
259
|
-
onMouseout: l[3] || (l[3] = (s) => c.value = !1)
|
|
260
|
-
}, [
|
|
261
|
-
a("div", {
|
|
262
|
-
class: "background-wrapper__bg",
|
|
263
|
-
style: E({
|
|
264
|
-
"background-image": `url('${x.value}')`,
|
|
265
|
-
"background-color": `${S.value}`,
|
|
266
|
-
"background-size": `${z.value}`,
|
|
267
|
-
"background-position": `${y.value}`,
|
|
268
|
-
"background-repeat": `${I.value}`
|
|
269
|
-
})
|
|
270
|
-
}, [
|
|
271
|
-
(i(!0), p(N, null, O(m.value, (s, se) => (i(), p("div", {
|
|
272
|
-
key: s.id,
|
|
273
|
-
class: "page-item"
|
|
274
|
-
}, [
|
|
275
|
-
a("div", ne, [
|
|
276
|
-
u(R, {
|
|
277
|
-
type: s.type,
|
|
278
|
-
"props-data": { modelValue: s }
|
|
279
|
-
}, null, 8, ["type", "props-data"])
|
|
280
|
-
])
|
|
281
|
-
]))), 128))
|
|
282
|
-
], 4),
|
|
283
|
-
o.isPreview ? $("", !0) : (i(), f(T, {
|
|
284
|
-
key: 0,
|
|
285
|
-
show: c.value,
|
|
286
|
-
"onUpdate:show": l[0] || (l[0] = (s) => c.value = s),
|
|
287
|
-
onHandleEdit: l[1] || (l[1] = (s) => b.value = !0),
|
|
288
|
-
onHandleDelete: e.handleDelete,
|
|
289
|
-
onHandleCopy: e.handleCopy,
|
|
290
|
-
onHandlePaste: e.handlePaste
|
|
291
|
-
}, null, 8, ["show", "onHandleDelete", "onHandleCopy", "onHandlePaste"]))
|
|
292
|
-
], 34),
|
|
293
|
-
o.isPreview ? $("", !0) : (i(), f(oe, {
|
|
294
|
-
key: 0,
|
|
295
|
-
show: b.value,
|
|
296
|
-
"onUpdate:show": l[4] || (l[4] = (s) => b.value = s),
|
|
297
|
-
data: o.modelValue
|
|
298
|
-
}, null, 8, ["show", "data"]))
|
|
299
|
-
], 6)) : $("", !0);
|
|
300
|
-
}
|
|
301
|
-
}, re = /* @__PURE__ */ A(le, [["__scopeId", "data-v-e3f5b699"]]);
|
|
302
|
-
export {
|
|
303
|
-
re as default
|
|
304
|
-
};
|