officialblock 2.1.1 → 2.1.3
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-0C0pBmhT.js +238 -0
- package/dist/index-AlzeRld6.js +1 -0
- package/dist/index-B-J4Tx8e.js +1 -0
- package/dist/index-B63YF03C.mjs +357 -0
- package/dist/{index-qybMHiY-.js → index-BEACmL51.js} +1 -1
- package/dist/index-BFCRwkCQ.js +1 -0
- package/dist/{index-DwAYwP3K.mjs → index-BUq__F-C.mjs} +1 -1
- package/dist/{index-esMFQfpR.js → index-BWSB4K5c.js} +1 -1
- package/dist/index-BZZpFLbf.mjs +609 -0
- package/dist/index-BykzKd3s.js +1 -0
- package/dist/index-CPFXI7lC.mjs +68485 -0
- package/dist/index-DGbVewT4.js +1 -0
- package/dist/index-DKDZzpmS.mjs +642 -0
- package/dist/{index-D3X7jHwZ.mjs → index-DSpGOD0e.mjs} +104 -93
- package/dist/index-DX4-RCdr.mjs +4 -0
- package/dist/index-Dl0NsdjZ.mjs +542 -0
- package/dist/official-block.cjs.js +1 -1
- package/dist/official-block.es.js +120 -105
- package/dist/official-block.umd.js +223 -5
- package/dist/style.css +1 -1
- package/package.json +2 -1
- package/dist/index-BI82VZ91.js +0 -1
- package/dist/index-B_6DwUvb.js +0 -1
- package/dist/index-B__52Adx.mjs +0 -4
- package/dist/index-BjgdPzqR.mjs +0 -349
- package/dist/index-BsZbx0rW.js +0 -1
- package/dist/index-CEHf6M6x.js +0 -1
- package/dist/index-CroTuaW_.mjs +0 -162
- package/dist/index-CvCNRVPY.js +0 -20
- package/dist/index-DwPHbe8R.mjs +0 -216
- package/dist/index-NTd6BVQQ.js +0 -1
- package/dist/index-QpRJyZ_6.mjs +0 -29116
- package/dist/index-ahwJ0pbt.mjs +0 -143
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { P as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as A, ref as w, resolveComponent as g, createBlock as f, openBlock as i, withCtx as k, createElementVNode as a, createVNode as u, createElementBlock as p, Fragment as D, renderList as N, createTextVNode as B, toDisplayString as H, normalizeStyle as E, computed as d, createCommentVNode as $, normalizeClass as U } from "vue";
|
|
2
|
+
import { P as Y, _ as O, i as j, a as M, O as R, r as F } from "./index-CPFXI7lC.mjs";
|
|
3
|
+
const J = { class: "setting-content" }, L = { class: "setting-header flex items-center" }, T = { 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
4
|
key: 1,
|
|
5
5
|
class: "no-preview"
|
|
6
|
-
},
|
|
6
|
+
}, _ = { class: "setting-body" }, ee = { class: "setting-item" }, te = { class: "components-content" }, ae = /* @__PURE__ */ A({
|
|
7
7
|
__name: "setting",
|
|
8
8
|
props: {
|
|
9
9
|
show: {
|
|
@@ -18,7 +18,7 @@ const R = { class: "setting-content" }, F = { class: "setting-header flex items-
|
|
|
18
18
|
},
|
|
19
19
|
emits: ["update:show"],
|
|
20
20
|
setup(o, { emit: h }) {
|
|
21
|
-
const n = o,
|
|
21
|
+
const n = o, v = w([
|
|
22
22
|
{
|
|
23
23
|
id: "preset-1",
|
|
24
24
|
name: "YCCECE Background 1",
|
|
@@ -47,93 +47,99 @@ const R = { class: "setting-content" }, F = { class: "setting-header flex items-
|
|
|
47
47
|
size: "100% auto",
|
|
48
48
|
position: "right bottom"
|
|
49
49
|
}
|
|
50
|
-
]), m = w(),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
i && (n.data.backgroundImage = `${i.image}`, n.data.backgroundSize = i.size, n.data.backgroundPosition = i.position);
|
|
50
|
+
]), m = w(), 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);
|
|
56
55
|
}, V = h, C = () => {
|
|
57
56
|
V("update:show", !1);
|
|
58
57
|
};
|
|
59
|
-
return (
|
|
60
|
-
const x =
|
|
61
|
-
return
|
|
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, {
|
|
62
61
|
width: "60%",
|
|
63
62
|
visible: o.show,
|
|
64
63
|
footer: !1,
|
|
65
64
|
onCancel: C,
|
|
66
65
|
unmountOnClose: ""
|
|
67
66
|
}, {
|
|
68
|
-
title:
|
|
69
|
-
|
|
67
|
+
title: k(() => [
|
|
68
|
+
B(H(o.data.type) + "组件编辑 ", 1)
|
|
70
69
|
]),
|
|
71
|
-
default:
|
|
72
|
-
a("div",
|
|
73
|
-
a("div",
|
|
74
|
-
t[6] || (t[6] = a("span", { class: "header-title" }, "
|
|
75
|
-
|
|
70
|
+
default: k(() => [
|
|
71
|
+
a("div", J, [
|
|
72
|
+
a("div", L, [
|
|
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", T, [
|
|
80
|
+
t[8] || (t[8] = a("span", { class: "header-title" }, "Background Preset", -1)),
|
|
81
|
+
u(S, {
|
|
76
82
|
modelValue: m.value,
|
|
77
|
-
"onUpdate:modelValue": t[
|
|
83
|
+
"onUpdate:modelValue": t[1] || (t[1] = (e) => m.value = e),
|
|
78
84
|
style: { width: "300px", "margin-right": "8px" }
|
|
79
85
|
}, {
|
|
80
|
-
default:
|
|
81
|
-
(
|
|
86
|
+
default: k(() => [
|
|
87
|
+
(i(!0), p(D, null, N(v.value, (e) => (i(), f(x, {
|
|
82
88
|
value: e.id,
|
|
83
89
|
key: e.id
|
|
84
90
|
}, {
|
|
85
|
-
default:
|
|
86
|
-
|
|
91
|
+
default: k(() => [
|
|
92
|
+
B(H(e.name), 1)
|
|
87
93
|
]),
|
|
88
94
|
_: 2
|
|
89
95
|
}, 1032, ["value"]))), 128))
|
|
90
96
|
]),
|
|
91
97
|
_: 1
|
|
92
98
|
}, 8, ["modelValue"]),
|
|
93
|
-
|
|
99
|
+
u(z, {
|
|
94
100
|
type: "primary",
|
|
95
|
-
onClick:
|
|
101
|
+
onClick: b
|
|
96
102
|
}, {
|
|
97
|
-
default:
|
|
98
|
-
|
|
103
|
+
default: k(() => [...t[7] || (t[7] = [
|
|
104
|
+
B("Apply", -1)
|
|
99
105
|
])]),
|
|
100
106
|
_: 1
|
|
101
107
|
})
|
|
102
108
|
]),
|
|
103
|
-
a("div",
|
|
104
|
-
t[
|
|
105
|
-
|
|
109
|
+
a("div", W, [
|
|
110
|
+
t[9] || (t[9] = a("span", { class: "header-title" }, "Image", -1)),
|
|
111
|
+
u(y, {
|
|
106
112
|
modelValue: o.data.backgroundImage,
|
|
107
|
-
"onUpdate:modelValue": t[
|
|
113
|
+
"onUpdate:modelValue": t[2] || (t[2] = (e) => o.data.backgroundImage = e),
|
|
108
114
|
placeholder: "图片路径",
|
|
109
115
|
style: { width: "300px" }
|
|
110
116
|
}, null, 8, ["modelValue"])
|
|
111
117
|
]),
|
|
112
|
-
a("div",
|
|
113
|
-
t[
|
|
114
|
-
|
|
118
|
+
a("div", q, [
|
|
119
|
+
t[10] || (t[10] = a("span", { class: "header-title" }, "Size", -1)),
|
|
120
|
+
u(y, {
|
|
115
121
|
modelValue: o.data.backgroundSize,
|
|
116
|
-
"onUpdate:modelValue": t[
|
|
122
|
+
"onUpdate:modelValue": t[3] || (t[3] = (e) => o.data.backgroundSize = e),
|
|
117
123
|
placeholder: "尺寸",
|
|
118
124
|
style: { width: "300px" }
|
|
119
125
|
}, null, 8, ["modelValue"])
|
|
120
126
|
]),
|
|
121
|
-
a("div",
|
|
122
|
-
t[
|
|
123
|
-
|
|
127
|
+
a("div", G, [
|
|
128
|
+
t[11] || (t[11] = a("span", { class: "header-title" }, "Position", -1)),
|
|
129
|
+
u(y, {
|
|
124
130
|
modelValue: o.data.backgroundPosition,
|
|
125
|
-
"onUpdate:modelValue": t[
|
|
131
|
+
"onUpdate:modelValue": t[4] || (t[4] = (e) => o.data.backgroundPosition = e),
|
|
126
132
|
placeholder: "位置",
|
|
127
133
|
style: { width: "300px" }
|
|
128
134
|
}, null, 8, ["modelValue"])
|
|
129
135
|
]),
|
|
130
|
-
a("div",
|
|
131
|
-
t[
|
|
132
|
-
a("div",
|
|
133
|
-
o.data.backgroundImage ? (
|
|
136
|
+
a("div", K, [
|
|
137
|
+
t[13] || (t[13] = a("span", { class: "header-title" }, "Preview", -1)),
|
|
138
|
+
a("div", Q, [
|
|
139
|
+
o.data.backgroundImage ? (i(), p("img", {
|
|
134
140
|
key: 0,
|
|
135
141
|
src: o.data.backgroundImage,
|
|
136
|
-
style:
|
|
142
|
+
style: E({
|
|
137
143
|
"object-fit": o.data.backgroundSize || "cover",
|
|
138
144
|
"background-position": o.data.backgroundPosition || "center center",
|
|
139
145
|
width: "100%",
|
|
@@ -141,19 +147,19 @@ const R = { class: "setting-content" }, F = { class: "setting-header flex items-
|
|
|
141
147
|
border: "1px solid #ddd"
|
|
142
148
|
}),
|
|
143
149
|
alt: "Background Preview"
|
|
144
|
-
}, null, 12,
|
|
145
|
-
t[
|
|
150
|
+
}, null, 12, X)) : (i(), p("div", Z, "No preview available")),
|
|
151
|
+
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))
|
|
146
152
|
])
|
|
147
153
|
]),
|
|
148
|
-
a("div",
|
|
149
|
-
t[
|
|
154
|
+
a("div", _, [
|
|
155
|
+
t[14] || (t[14] = a("div", { class: "setting-toolbar" }, [
|
|
150
156
|
a("h4", null, "组件")
|
|
151
157
|
], -1)),
|
|
152
|
-
a("div",
|
|
153
|
-
a("div",
|
|
154
|
-
|
|
158
|
+
a("div", ee, [
|
|
159
|
+
a("div", te, [
|
|
160
|
+
u(Y, {
|
|
155
161
|
data: o.data.data,
|
|
156
|
-
onUpdate: t[
|
|
162
|
+
onUpdate: t[5] || (t[5] = (e) => o.data.data = e)
|
|
157
163
|
}, null, 8, ["data"])
|
|
158
164
|
])
|
|
159
165
|
])
|
|
@@ -164,7 +170,7 @@ const R = { class: "setting-content" }, F = { class: "setting-header flex items-
|
|
|
164
170
|
}, 8, ["visible"]);
|
|
165
171
|
};
|
|
166
172
|
}
|
|
167
|
-
}),
|
|
173
|
+
}), oe = /* @__PURE__ */ O(ae, [["__scopeId", "data-v-bb5b5b8c"]]), ne = { class: "component-wrapper" }, le = {
|
|
168
174
|
__name: "index",
|
|
169
175
|
props: {
|
|
170
176
|
modelValue: {
|
|
@@ -180,99 +186,104 @@ const R = { class: "setting-content" }, F = { class: "setting-header flex items-
|
|
|
180
186
|
},
|
|
181
187
|
emits: ["update:modelValue", "handleDelete", "handleCopy", "handlePaste"],
|
|
182
188
|
setup(o, { emit: h }) {
|
|
183
|
-
const n = o,
|
|
189
|
+
const n = o, v = h, m = d(() => {
|
|
184
190
|
var e, l;
|
|
185
191
|
return !((e = n.modelValue) != null && e.data) || !Array.isArray(n.modelValue.data) ? [] : (l = n.modelValue) == null ? void 0 : l.data;
|
|
186
|
-
}),
|
|
192
|
+
}), c = w(!1), b = w(!1), V = () => {
|
|
187
193
|
var l;
|
|
188
194
|
if (n.modelValue && n.modelValue.data)
|
|
189
195
|
return;
|
|
190
196
|
const e = {
|
|
191
|
-
id: ((l = n.modelValue) == null ? void 0 : l.id) ||
|
|
197
|
+
id: ((l = n.modelValue) == null ? void 0 : l.id) || F(),
|
|
192
198
|
//componentKey
|
|
193
199
|
type: "BackgroundWrapper",
|
|
200
|
+
onlyShowPc: !1,
|
|
194
201
|
backgroundImage: "",
|
|
195
202
|
backgroundSize: "",
|
|
196
203
|
backgroundPosition: "",
|
|
197
204
|
data: []
|
|
198
205
|
};
|
|
199
|
-
|
|
200
|
-
}, C =
|
|
206
|
+
v("update:modelValue", e);
|
|
207
|
+
}, C = d(() => {
|
|
208
|
+
var e;
|
|
209
|
+
return n.isPreview ? !((e = n.modelValue) != null && e.onlyShowPc) || !j() : !0;
|
|
210
|
+
}), r = d(() => {
|
|
201
211
|
var e;
|
|
202
212
|
return ((e = n.modelValue) == null ? void 0 : e.classes) ?? null;
|
|
203
|
-
}),
|
|
213
|
+
}), t = d(() => {
|
|
204
214
|
var e;
|
|
205
215
|
return ((e = n.modelValue) == null ? void 0 : e.style) ?? null;
|
|
206
|
-
}),
|
|
216
|
+
}), P = d(() => {
|
|
207
217
|
var e;
|
|
208
218
|
return ((e = n.modelValue) == null ? void 0 : e.width) ?? null;
|
|
209
|
-
}), x =
|
|
219
|
+
}), x = d(() => {
|
|
210
220
|
var e;
|
|
211
221
|
return ((e = n.modelValue) == null ? void 0 : e.backgroundImage) ?? "";
|
|
212
|
-
}),
|
|
222
|
+
}), S = d(() => {
|
|
213
223
|
var e;
|
|
214
224
|
return ((e = n.modelValue) == null ? void 0 : e.backgroundColor) ?? "transparent";
|
|
215
|
-
}), z =
|
|
225
|
+
}), z = d(() => {
|
|
216
226
|
var e;
|
|
217
227
|
return ((e = n.modelValue) == null ? void 0 : e.backgroundSize) ?? "contain";
|
|
218
|
-
}),
|
|
228
|
+
}), y = d(() => {
|
|
219
229
|
var e;
|
|
220
230
|
return ((e = n.modelValue) == null ? void 0 : e.backgroundPosition) ?? "center";
|
|
221
|
-
}), I =
|
|
231
|
+
}), I = d(() => {
|
|
222
232
|
var e;
|
|
223
233
|
return ((e = n.modelValue) == null ? void 0 : e.backgroundRepeat) ?? "no-repeat";
|
|
224
234
|
});
|
|
225
|
-
return V(), (e, l) => (
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
235
|
+
return V(), (e, l) => C.value ? (i(), p("div", {
|
|
236
|
+
key: 0,
|
|
237
|
+
class: U(["background-wrapper", r.value]),
|
|
238
|
+
style: E(t.value),
|
|
239
|
+
onMouseover: l[3] || (l[3] = (s) => c.value = !0),
|
|
240
|
+
onMouseout: l[4] || (l[4] = (s) => c.value = !1)
|
|
230
241
|
}, [
|
|
231
242
|
a("div", {
|
|
232
|
-
class:
|
|
243
|
+
class: U(P.value)
|
|
233
244
|
}, [
|
|
234
245
|
a("div", {
|
|
235
246
|
class: "background-wrapper__bg",
|
|
236
|
-
style:
|
|
247
|
+
style: E({
|
|
237
248
|
"background-image": `url('${x.value}')`,
|
|
238
|
-
"background-color": `${
|
|
249
|
+
"background-color": `${S.value}`,
|
|
239
250
|
"background-size": `${z.value}`,
|
|
240
|
-
"background-position": `${
|
|
251
|
+
"background-position": `${y.value}`,
|
|
241
252
|
"background-repeat": `${I.value}`
|
|
242
253
|
})
|
|
243
254
|
}, [
|
|
244
|
-
(
|
|
245
|
-
key:
|
|
255
|
+
(i(!0), p(D, null, N(m.value, (s, se) => (i(), p("div", {
|
|
256
|
+
key: s.id,
|
|
246
257
|
class: "page-item"
|
|
247
258
|
}, [
|
|
248
|
-
a("div",
|
|
249
|
-
|
|
250
|
-
type:
|
|
251
|
-
"props-data": { modelValue:
|
|
259
|
+
a("div", ne, [
|
|
260
|
+
u(M, {
|
|
261
|
+
type: s.type,
|
|
262
|
+
"props-data": { modelValue: s }
|
|
252
263
|
}, null, 8, ["type", "props-data"])
|
|
253
264
|
])
|
|
254
265
|
]))), 128))
|
|
255
266
|
], 4),
|
|
256
|
-
o.isPreview ?
|
|
267
|
+
o.isPreview ? $("", !0) : (i(), f(R, {
|
|
257
268
|
key: 0,
|
|
258
|
-
show:
|
|
259
|
-
"onUpdate:show": l[0] || (l[0] = (
|
|
260
|
-
onHandleEdit: l[1] || (l[1] = (
|
|
269
|
+
show: c.value,
|
|
270
|
+
"onUpdate:show": l[0] || (l[0] = (s) => c.value = s),
|
|
271
|
+
onHandleEdit: l[1] || (l[1] = (s) => b.value = !0),
|
|
261
272
|
onHandleDelete: e.handleDelete,
|
|
262
273
|
onHandleCopy: e.handleCopy,
|
|
263
274
|
onHandlePaste: e.handlePaste,
|
|
264
275
|
style: { top: "-20px" }
|
|
265
276
|
}, null, 8, ["show", "onHandleDelete", "onHandleCopy", "onHandlePaste"]))
|
|
266
277
|
], 2),
|
|
267
|
-
o.isPreview ?
|
|
278
|
+
o.isPreview ? $("", !0) : (i(), f(oe, {
|
|
268
279
|
key: 0,
|
|
269
|
-
show:
|
|
270
|
-
"onUpdate:show": l[2] || (l[2] = (
|
|
280
|
+
show: b.value,
|
|
281
|
+
"onUpdate:show": l[2] || (l[2] = (s) => b.value = s),
|
|
271
282
|
data: o.modelValue
|
|
272
283
|
}, null, 8, ["show", "data"]))
|
|
273
|
-
], 38));
|
|
284
|
+
], 38)) : $("", !0);
|
|
274
285
|
}
|
|
275
|
-
},
|
|
286
|
+
}, re = /* @__PURE__ */ O(le, [["__scopeId", "data-v-b9fd2a2e"]]);
|
|
276
287
|
export {
|
|
277
|
-
|
|
288
|
+
re as default
|
|
278
289
|
};
|