officialblock 2.1.2 → 2.1.4

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.
@@ -1,9 +1,9 @@
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-Chue7s0-.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 = {
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-mXDfSi-N.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
4
  key: 1,
5
5
  class: "no-preview"
6
- }, _ = { class: "setting-body" }, ee = { class: "setting-item" }, te = { class: "components-content" }, ae = /* @__PURE__ */ A({
6
+ }, _ = { class: "setting-body" }, ee = { class: "setting-item" }, te = { class: "components-content" }, ae = /* @__PURE__ */ Y({
7
7
  __name: "setting",
8
8
  props: {
9
9
  show: {
@@ -18,36 +18,36 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
18
18
  },
19
19
  emits: ["update:show"],
20
20
  setup(o, { emit: h }) {
21
- const n = o, v = w([
21
+ const n = o, v = k([
22
22
  {
23
23
  id: "preset-1",
24
24
  name: "YCCECE Background 1",
25
- image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",
25
+ image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-01.svg",
26
26
  size: "cover",
27
27
  position: "center center"
28
28
  },
29
29
  {
30
30
  id: "preset-2",
31
31
  name: "YCCECE Background 2",
32
- image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-04.svg",
33
- size: "contain",
34
- position: "left top"
32
+ image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-02.svg",
33
+ size: "",
34
+ position: ""
35
35
  },
36
36
  {
37
37
  id: "preset-3",
38
38
  name: "YCCECE Background 3",
39
39
  image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",
40
40
  size: "cover",
41
- position: "center center"
41
+ position: ""
42
42
  },
43
43
  {
44
44
  id: "preset-4",
45
45
  name: "YCCECE Background 4",
46
- image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",
47
- size: "100% auto",
48
- position: "right bottom"
46
+ image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-04.svg",
47
+ size: "cover",
48
+ position: ""
49
49
  }
50
- ]), m = w(), c = v.value.find((r) => r.image === n.data.backgroundImage);
50
+ ]), m = k(), c = v.value.find((r) => r.image === n.data.backgroundImage);
51
51
  m.value = c ? c.id : "";
52
52
  const b = () => {
53
53
  const r = v.value.find((t) => t.id === m.value);
@@ -64,31 +64,31 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
64
64
  onCancel: C,
65
65
  unmountOnClose: ""
66
66
  }, {
67
- title: k(() => [
67
+ title: w(() => [
68
68
  B(H(o.data.type) + "组件编辑 ", 1)
69
69
  ]),
70
- default: k(() => [
71
- a("div", J, [
72
- a("div", L, [
70
+ default: w(() => [
71
+ a("div", F, [
72
+ a("div", J, [
73
73
  t[6] || (t[6] = a("span", { class: "header-title" }, "仅显示PC端", -1)),
74
74
  u(P, {
75
75
  modelValue: o.data.onlyShowPc,
76
76
  "onUpdate:modelValue": t[0] || (t[0] = (e) => o.data.onlyShowPc = e)
77
77
  }, null, 8, ["modelValue"])
78
78
  ]),
79
- a("div", T, [
79
+ a("div", L, [
80
80
  t[8] || (t[8] = a("span", { class: "header-title" }, "Background Preset", -1)),
81
81
  u(S, {
82
82
  modelValue: m.value,
83
83
  "onUpdate:modelValue": t[1] || (t[1] = (e) => m.value = e),
84
84
  style: { width: "300px", "margin-right": "8px" }
85
85
  }, {
86
- default: k(() => [
87
- (i(!0), p(D, null, N(v.value, (e) => (i(), f(x, {
86
+ default: w(() => [
87
+ (i(!0), p(N, null, O(v.value, (e) => (i(), f(x, {
88
88
  value: e.id,
89
89
  key: e.id
90
90
  }, {
91
- default: k(() => [
91
+ default: w(() => [
92
92
  B(H(e.name), 1)
93
93
  ]),
94
94
  _: 2
@@ -100,7 +100,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
100
100
  type: "primary",
101
101
  onClick: b
102
102
  }, {
103
- default: k(() => [...t[7] || (t[7] = [
103
+ default: w(() => [...t[7] || (t[7] = [
104
104
  B("Apply", -1)
105
105
  ])]),
106
106
  _: 1
@@ -111,6 +111,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
111
111
  u(y, {
112
112
  modelValue: o.data.backgroundImage,
113
113
  "onUpdate:modelValue": t[2] || (t[2] = (e) => o.data.backgroundImage = e),
114
+ disabled: !0,
114
115
  placeholder: "图片路径",
115
116
  style: { width: "300px" }
116
117
  }, null, 8, ["modelValue"])
@@ -120,6 +121,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
120
121
  u(y, {
121
122
  modelValue: o.data.backgroundSize,
122
123
  "onUpdate:modelValue": t[3] || (t[3] = (e) => o.data.backgroundSize = e),
124
+ disabled: !0,
123
125
  placeholder: "尺寸",
124
126
  style: { width: "300px" }
125
127
  }, null, 8, ["modelValue"])
@@ -129,6 +131,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
129
131
  u(y, {
130
132
  modelValue: o.data.backgroundPosition,
131
133
  "onUpdate:modelValue": t[4] || (t[4] = (e) => o.data.backgroundPosition = e),
134
+ disabled: !0,
132
135
  placeholder: "位置",
133
136
  style: { width: "300px" }
134
137
  }, null, 8, ["modelValue"])
@@ -157,7 +160,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
157
160
  ], -1)),
158
161
  a("div", ee, [
159
162
  a("div", te, [
160
- u(Y, {
163
+ u(j, {
161
164
  data: o.data.data,
162
165
  onUpdate: t[5] || (t[5] = (e) => o.data.data = e)
163
166
  }, null, 8, ["data"])
@@ -170,7 +173,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
170
173
  }, 8, ["visible"]);
171
174
  };
172
175
  }
173
- }), oe = /* @__PURE__ */ O(ae, [["__scopeId", "data-v-bb5b5b8c"]]), ne = { class: "component-wrapper" }, le = {
176
+ }), oe = /* @__PURE__ */ A(ae, [["__scopeId", "data-v-f43efd7b"]]), ne = { class: "component-wrapper" }, le = {
174
177
  __name: "index",
175
178
  props: {
176
179
  modelValue: {
@@ -189,24 +192,36 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
189
192
  const n = o, v = h, m = d(() => {
190
193
  var e, l;
191
194
  return !((e = n.modelValue) != null && e.data) || !Array.isArray(n.modelValue.data) ? [] : (l = n.modelValue) == null ? void 0 : l.data;
192
- }), c = w(!1), b = w(!1), V = () => {
193
- var l;
195
+ }), c = k(!1), b = k(!1), V = () => {
196
+ var l, s;
194
197
  if (n.modelValue && n.modelValue.data)
195
198
  return;
196
199
  const e = {
197
- id: ((l = n.modelValue) == null ? void 0 : l.id) || F(),
200
+ id: ((l = n.modelValue) == null ? void 0 : l.id) || D(),
198
201
  //componentKey
199
202
  type: "BackgroundWrapper",
200
203
  onlyShowPc: !1,
201
- backgroundImage: "",
202
- backgroundSize: "",
203
- backgroundPosition: "",
204
- data: []
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
+ ]
205
220
  };
206
221
  v("update:modelValue", e);
207
222
  }, C = d(() => {
208
223
  var e;
209
- return n.isPreview ? !((e = n.modelValue) != null && e.onlyShowPc) || !j() : !0;
224
+ return n.isPreview ? !((e = n.modelValue) != null && e.onlyShowPc) || !M() : !0;
210
225
  }), r = d(() => {
211
226
  var e;
212
227
  return ((e = n.modelValue) == null ? void 0 : e.classes) ?? null;
@@ -235,12 +250,13 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
235
250
  return V(), (e, l) => C.value ? (i(), p("div", {
236
251
  key: 0,
237
252
  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)
253
+ style: E(t.value)
241
254
  }, [
242
255
  a("div", {
243
- class: U(P.value)
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)
244
260
  }, [
245
261
  a("div", {
246
262
  class: "background-wrapper__bg",
@@ -252,38 +268,37 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
252
268
  "background-repeat": `${I.value}`
253
269
  })
254
270
  }, [
255
- (i(!0), p(D, null, N(m.value, (s, se) => (i(), p("div", {
271
+ (i(!0), p(N, null, O(m.value, (s, se) => (i(), p("div", {
256
272
  key: s.id,
257
273
  class: "page-item"
258
274
  }, [
259
275
  a("div", ne, [
260
- u(M, {
276
+ u(R, {
261
277
  type: s.type,
262
278
  "props-data": { modelValue: s }
263
279
  }, null, 8, ["type", "props-data"])
264
280
  ])
265
281
  ]))), 128))
266
282
  ], 4),
267
- o.isPreview ? $("", !0) : (i(), f(R, {
283
+ o.isPreview ? $("", !0) : (i(), f(T, {
268
284
  key: 0,
269
285
  show: c.value,
270
286
  "onUpdate:show": l[0] || (l[0] = (s) => c.value = s),
271
287
  onHandleEdit: l[1] || (l[1] = (s) => b.value = !0),
272
288
  onHandleDelete: e.handleDelete,
273
289
  onHandleCopy: e.handleCopy,
274
- onHandlePaste: e.handlePaste,
275
- style: { top: "-20px" }
290
+ onHandlePaste: e.handlePaste
276
291
  }, null, 8, ["show", "onHandleDelete", "onHandleCopy", "onHandlePaste"]))
277
- ], 2),
292
+ ], 34),
278
293
  o.isPreview ? $("", !0) : (i(), f(oe, {
279
294
  key: 0,
280
295
  show: b.value,
281
- "onUpdate:show": l[2] || (l[2] = (s) => b.value = s),
296
+ "onUpdate:show": l[4] || (l[4] = (s) => b.value = s),
282
297
  data: o.modelValue
283
298
  }, null, 8, ["show", "data"]))
284
- ], 38)) : $("", !0);
299
+ ], 6)) : $("", !0);
285
300
  }
286
- }, re = /* @__PURE__ */ O(le, [["__scopeId", "data-v-b9fd2a2e"]]);
301
+ }, re = /* @__PURE__ */ A(le, [["__scopeId", "data-v-e3f5b699"]]);
287
302
  export {
288
303
  re as default
289
304
  };