officialblock 2.1.0 → 2.1.2
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-B3PhukvS.js → index-BX3wo2uq.js} +1 -1
- package/dist/{index-CT1rjCCp.mjs → index-Btjp_XdI.mjs} +1 -1
- package/dist/index-CClVOzrU.js +20 -0
- package/dist/index-C_3-HeV5.js +1 -0
- package/dist/index-Chue7s0-.mjs +31274 -0
- package/dist/index-CmerRdhn.mjs +4 -0
- package/dist/index-Cn6a6HhI.mjs +289 -0
- package/dist/index-Cu03Azf6.js +1 -0
- package/dist/index-DCXncMaQ.mjs +4 -0
- package/dist/index-DPl0MPya.js +1 -0
- package/dist/index-DRMApk01.js +1 -0
- package/dist/index-rYdlY3SQ.mjs +361 -0
- package/dist/official-block.cjs.js +1 -1
- package/dist/official-block.es.js +106 -99
- 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-C0VvLaXk.js +0 -20
- package/dist/index-C_l0k6dm.mjs +0 -29122
- package/dist/index-CdakOmJX.js +0 -1
|
@@ -0,0 +1,289 @@
|
|
|
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 = {
|
|
4
|
+
key: 1,
|
|
5
|
+
class: "no-preview"
|
|
6
|
+
}, _ = { class: "setting-body" }, ee = { class: "setting-item" }, te = { class: "components-content" }, ae = /* @__PURE__ */ A({
|
|
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 = w([
|
|
22
|
+
{
|
|
23
|
+
id: "preset-1",
|
|
24
|
+
name: "YCCECE Background 1",
|
|
25
|
+
image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.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-04.svg",
|
|
33
|
+
size: "contain",
|
|
34
|
+
position: "left top"
|
|
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: "center center"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "preset-4",
|
|
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"
|
|
49
|
+
}
|
|
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);
|
|
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: k(() => [
|
|
68
|
+
B(H(o.data.type) + "组件编辑 ", 1)
|
|
69
|
+
]),
|
|
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, {
|
|
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: k(() => [
|
|
87
|
+
(i(!0), p(D, null, N(v.value, (e) => (i(), f(x, {
|
|
88
|
+
value: e.id,
|
|
89
|
+
key: e.id
|
|
90
|
+
}, {
|
|
91
|
+
default: k(() => [
|
|
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: k(() => [...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
|
+
placeholder: "图片路径",
|
|
115
|
+
style: { width: "300px" }
|
|
116
|
+
}, null, 8, ["modelValue"])
|
|
117
|
+
]),
|
|
118
|
+
a("div", q, [
|
|
119
|
+
t[10] || (t[10] = a("span", { class: "header-title" }, "Size", -1)),
|
|
120
|
+
u(y, {
|
|
121
|
+
modelValue: o.data.backgroundSize,
|
|
122
|
+
"onUpdate:modelValue": t[3] || (t[3] = (e) => o.data.backgroundSize = e),
|
|
123
|
+
placeholder: "尺寸",
|
|
124
|
+
style: { width: "300px" }
|
|
125
|
+
}, null, 8, ["modelValue"])
|
|
126
|
+
]),
|
|
127
|
+
a("div", G, [
|
|
128
|
+
t[11] || (t[11] = a("span", { class: "header-title" }, "Position", -1)),
|
|
129
|
+
u(y, {
|
|
130
|
+
modelValue: o.data.backgroundPosition,
|
|
131
|
+
"onUpdate:modelValue": t[4] || (t[4] = (e) => o.data.backgroundPosition = e),
|
|
132
|
+
placeholder: "位置",
|
|
133
|
+
style: { width: "300px" }
|
|
134
|
+
}, null, 8, ["modelValue"])
|
|
135
|
+
]),
|
|
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", {
|
|
140
|
+
key: 0,
|
|
141
|
+
src: o.data.backgroundImage,
|
|
142
|
+
style: E({
|
|
143
|
+
"object-fit": o.data.backgroundSize || "cover",
|
|
144
|
+
"background-position": o.data.backgroundPosition || "center center",
|
|
145
|
+
width: "100%",
|
|
146
|
+
height: "100px",
|
|
147
|
+
border: "1px solid #ddd"
|
|
148
|
+
}),
|
|
149
|
+
alt: "Background Preview"
|
|
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))
|
|
152
|
+
])
|
|
153
|
+
]),
|
|
154
|
+
a("div", _, [
|
|
155
|
+
t[14] || (t[14] = a("div", { class: "setting-toolbar" }, [
|
|
156
|
+
a("h4", null, "组件")
|
|
157
|
+
], -1)),
|
|
158
|
+
a("div", ee, [
|
|
159
|
+
a("div", te, [
|
|
160
|
+
u(Y, {
|
|
161
|
+
data: o.data.data,
|
|
162
|
+
onUpdate: t[5] || (t[5] = (e) => o.data.data = e)
|
|
163
|
+
}, null, 8, ["data"])
|
|
164
|
+
])
|
|
165
|
+
])
|
|
166
|
+
])
|
|
167
|
+
])
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["visible"]);
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
}), oe = /* @__PURE__ */ O(ae, [["__scopeId", "data-v-bb5b5b8c"]]), ne = { class: "component-wrapper" }, le = {
|
|
174
|
+
__name: "index",
|
|
175
|
+
props: {
|
|
176
|
+
modelValue: {
|
|
177
|
+
type: Object,
|
|
178
|
+
default: () => {
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
// 是否预览
|
|
182
|
+
isPreview: {
|
|
183
|
+
type: Boolean,
|
|
184
|
+
default: !0
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
emits: ["update:modelValue", "handleDelete", "handleCopy", "handlePaste"],
|
|
188
|
+
setup(o, { emit: h }) {
|
|
189
|
+
const n = o, v = h, m = d(() => {
|
|
190
|
+
var e, l;
|
|
191
|
+
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;
|
|
194
|
+
if (n.modelValue && n.modelValue.data)
|
|
195
|
+
return;
|
|
196
|
+
const e = {
|
|
197
|
+
id: ((l = n.modelValue) == null ? void 0 : l.id) || F(),
|
|
198
|
+
//componentKey
|
|
199
|
+
type: "BackgroundWrapper",
|
|
200
|
+
onlyShowPc: !1,
|
|
201
|
+
backgroundImage: "",
|
|
202
|
+
backgroundSize: "",
|
|
203
|
+
backgroundPosition: "",
|
|
204
|
+
data: []
|
|
205
|
+
};
|
|
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(() => {
|
|
211
|
+
var e;
|
|
212
|
+
return ((e = n.modelValue) == null ? void 0 : e.classes) ?? null;
|
|
213
|
+
}), t = d(() => {
|
|
214
|
+
var e;
|
|
215
|
+
return ((e = n.modelValue) == null ? void 0 : e.style) ?? null;
|
|
216
|
+
}), P = d(() => {
|
|
217
|
+
var e;
|
|
218
|
+
return ((e = n.modelValue) == null ? void 0 : e.width) ?? null;
|
|
219
|
+
}), x = d(() => {
|
|
220
|
+
var e;
|
|
221
|
+
return ((e = n.modelValue) == null ? void 0 : e.backgroundImage) ?? "";
|
|
222
|
+
}), S = d(() => {
|
|
223
|
+
var e;
|
|
224
|
+
return ((e = n.modelValue) == null ? void 0 : e.backgroundColor) ?? "transparent";
|
|
225
|
+
}), z = d(() => {
|
|
226
|
+
var e;
|
|
227
|
+
return ((e = n.modelValue) == null ? void 0 : e.backgroundSize) ?? "contain";
|
|
228
|
+
}), y = d(() => {
|
|
229
|
+
var e;
|
|
230
|
+
return ((e = n.modelValue) == null ? void 0 : e.backgroundPosition) ?? "center";
|
|
231
|
+
}), I = d(() => {
|
|
232
|
+
var e;
|
|
233
|
+
return ((e = n.modelValue) == null ? void 0 : e.backgroundRepeat) ?? "no-repeat";
|
|
234
|
+
});
|
|
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)
|
|
241
|
+
}, [
|
|
242
|
+
a("div", {
|
|
243
|
+
class: U(P.value)
|
|
244
|
+
}, [
|
|
245
|
+
a("div", {
|
|
246
|
+
class: "background-wrapper__bg",
|
|
247
|
+
style: E({
|
|
248
|
+
"background-image": `url('${x.value}')`,
|
|
249
|
+
"background-color": `${S.value}`,
|
|
250
|
+
"background-size": `${z.value}`,
|
|
251
|
+
"background-position": `${y.value}`,
|
|
252
|
+
"background-repeat": `${I.value}`
|
|
253
|
+
})
|
|
254
|
+
}, [
|
|
255
|
+
(i(!0), p(D, null, N(m.value, (s, se) => (i(), p("div", {
|
|
256
|
+
key: s.id,
|
|
257
|
+
class: "page-item"
|
|
258
|
+
}, [
|
|
259
|
+
a("div", ne, [
|
|
260
|
+
u(M, {
|
|
261
|
+
type: s.type,
|
|
262
|
+
"props-data": { modelValue: s }
|
|
263
|
+
}, null, 8, ["type", "props-data"])
|
|
264
|
+
])
|
|
265
|
+
]))), 128))
|
|
266
|
+
], 4),
|
|
267
|
+
o.isPreview ? $("", !0) : (i(), f(R, {
|
|
268
|
+
key: 0,
|
|
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),
|
|
272
|
+
onHandleDelete: e.handleDelete,
|
|
273
|
+
onHandleCopy: e.handleCopy,
|
|
274
|
+
onHandlePaste: e.handlePaste,
|
|
275
|
+
style: { top: "-20px" }
|
|
276
|
+
}, null, 8, ["show", "onHandleDelete", "onHandleCopy", "onHandlePaste"]))
|
|
277
|
+
], 2),
|
|
278
|
+
o.isPreview ? $("", !0) : (i(), f(oe, {
|
|
279
|
+
key: 0,
|
|
280
|
+
show: b.value,
|
|
281
|
+
"onUpdate:show": l[2] || (l[2] = (s) => b.value = s),
|
|
282
|
+
data: o.modelValue
|
|
283
|
+
}, null, 8, ["show", "data"]))
|
|
284
|
+
], 38)) : $("", !0);
|
|
285
|
+
}
|
|
286
|
+
}, re = /* @__PURE__ */ O(le, [["__scopeId", "data-v-b9fd2a2e"]]);
|
|
287
|
+
export {
|
|
288
|
+
re as default
|
|
289
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var I=Object.create;var B=Object.defineProperty;var M=Object.getOwnPropertyDescriptor;var F=Object.getOwnPropertyNames;var _=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty;var z=(t,a,o,c)=>{if(a&&typeof a=="object"||typeof a=="function")for(let s of F(a))!U.call(t,s)&&s!==o&&B(t,s,{get:()=>a[s],enumerable:!(c=M(a,s))||c.enumerable});return t};var D=(t,a,o)=>(o=t!=null?I(_(t)):{},z(a||!t||!t.__esModule?B(o,"default",{value:t,enumerable:!0}):o,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),y=require("./index-CClVOzrU.js");var E=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function L(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var H="Expected a function",P=NaN,A="[object Symbol]",W=/^\s+|\s+$/g,R=/^[-+]0x[0-9a-f]+$/i,q=/^0b[01]+$/i,G=/^0o[0-7]+$/i,J=parseInt,X=typeof E=="object"&&E&&E.Object===Object&&E,K=typeof self=="object"&&self&&self.Object===Object&&self,Q=X||K||Function("return this")(),Y=Object.prototype,Z=Y.toString,ee=Math.max,te=Math.min,S=function(){return Q.Date.now()};function ne(t,a,o){var c,s,n,f,u,d,p=0,g=!1,m=!1,b=!0;if(typeof t!="function")throw new TypeError(H);a=$(a)||0,T(o)&&(g=!!o.leading,m="maxWait"in o,n=m?ee($(o.maxWait)||0,a):n,b="trailing"in o?!!o.trailing:b);function N(r){var v=c,h=s;return c=s=void 0,p=r,f=t.apply(h,v),f}function k(r){return p=r,u=setTimeout(V,a),g?N(r):f}function O(r){var v=r-d,h=r-p,j=a-v;return m?te(j,n-h):j}function C(r){var v=r-d,h=r-p;return d===void 0||v>=a||v<0||m&&h>=n}function V(){var r=S();if(C(r))return l(r);u=setTimeout(V,O(r))}function l(r){return u=void 0,b&&c?N(r):(c=s=void 0,f)}function i(){u!==void 0&&clearTimeout(u),p=0,c=d=s=u=void 0}function x(){return u===void 0?f:l(S())}function w(){var r=S(),v=C(r);if(c=arguments,s=this,d=r,v){if(u===void 0)return k(d);if(m)return u=setTimeout(V,a),N(d)}return u===void 0&&(u=setTimeout(V,a)),f}return w.cancel=i,w.flush=x,w}function oe(t,a,o){var c=!0,s=!0;if(typeof t!="function")throw new TypeError(H);return T(o)&&(c="leading"in o?!!o.leading:c,s="trailing"in o?!!o.trailing:s),ne(t,a,{leading:c,maxWait:a,trailing:s})}function T(t){var a=typeof t;return!!t&&(a=="object"||a=="function")}function le(t){return!!t&&typeof t=="object"}function ae(t){return typeof t=="symbol"||le(t)&&Z.call(t)==A}function $(t){if(typeof t=="number")return t;if(ae(t))return P;if(T(t)){var a=typeof t.valueOf=="function"?t.valueOf():t;t=T(a)?a+"":a}if(typeof t!="string")return t===0?t:+t;t=t.replace(W,"");var o=q.test(t);return o||G.test(t)?J(t.slice(2),o?2:8):R.test(t)?P:+t}var re=oe;const se=L(re),ie={class:"setting-content"},de={class:"setting-header flex items-center"},ue={class:"setting-header flex items-center"},ce={class:"setting-header flex items-center"},me={class:"setting-header flex items-center"},fe={class:"setting-body"},pe={class:"setting-item"},ve={class:"components-content"},Ve=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(t,{emit:a}){e.defineAsyncComponent(()=>import("vuedraggable"));const o=a,c=()=>{o("update:show",!1)};return(s,n)=>{const f=e.resolveComponent("a-switch"),u=e.resolveComponent("a-input"),d=e.resolveComponent("a-option"),p=e.resolveComponent("a-select"),g=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(g,{width:"60%",visible:t.show,footer:!1,onCancel:c,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",ie,[e.createElementVNode("div",de,[n[5]||(n[5]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(f,{modelValue:t.data.onlyShowPc,"onUpdate:modelValue":n[0]||(n[0]=m=>t.data.onlyShowPc=m)},null,8,["modelValue"])]),e.createElementVNode("div",ue,[n[6]||(n[6]=e.createElementVNode("span",{class:"header-title"},"标题",-1)),e.createVNode(u,{modelValue:t.data.title,"onUpdate:modelValue":n[1]||(n[1]=m=>t.data.title=m),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",ce,[n[11]||(n[11]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(p,{modelValue:t.data.width,"onUpdate:modelValue":n[2]||(n[2]=m=>t.data.width=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(d,{value:"default"},{default:e.withCtx(()=>[...n[7]||(n[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(d,{value:"small"},{default:e.withCtx(()=>[...n[8]||(n[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(d,{value:"medium"},{default:e.withCtx(()=>[...n[9]||(n[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(d,{value:"max"},{default:e.withCtx(()=>[...n[10]||(n[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",me,[n[14]||(n[14]=e.createElementVNode("span",{class:"header-title"},"Opened by default",-1)),e.createVNode(p,{modelValue:t.data.openFirst,"onUpdate:modelValue":n[3]||(n[3]=m=>t.data.openFirst=m),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(d,{value:!0},{default:e.withCtx(()=>[...n[12]||(n[12]=[e.createTextVNode("yes",-1)])]),_:1}),e.createVNode(d,{value:!1},{default:e.withCtx(()=>[...n[13]||(n[13]=[e.createTextVNode("No",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",fe,[n[15]||(n[15]=e.createElementVNode("div",{class:"setting-toolbar"},[e.createElementVNode("h4",null,"组件")],-1)),e.createElementVNode("div",pe,[e.createElementVNode("div",ve,[e.createVNode(y.P,{data:t.data.data,onUpdate:n[4]||(n[4]=m=>t.data.data=m)},null,8,["data"])])])])])]),_:1},8,["visible"])}}}),ye=y._(Ve,[["__scopeId","data-v-23474794"]]),ge={class:"collapse-custom__wrapper"},we=["innerHTML"],be={class:"collapse-custom__content__wrapper"},Ne={class:"component-wrapper"},he={__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(t,{emit:a}){const o=t,c=a,s=e.ref(null),n=e.ref(0),f=e.ref(!1),u=e.ref(null),d=e.ref(!1),p=e.ref(!1),g=e.computed(()=>{var l;return((l=o.modelValue)==null?void 0:l.classes)??""}),m=e.computed(()=>{var l;return((l=o.modelValue)==null?void 0:l.style)??""});e.computed(()=>{var l;return(l=o.modelValue)==null?void 0:l.width});const b=e.computed(()=>{var l;return((l=o.modelValue)==null?void 0:l.title)??[]}),N=e.computed(()=>{var l;return((l=o.modelValue)==null?void 0:l.openFirst)??!1}),k=e.computed(()=>{var l,i;return!((l=o.modelValue)!=null&&l.data)||!Array.isArray(o.modelValue.data)?[]:(i=o.modelValue)==null?void 0:i.data}),O=()=>{var i;if(o.modelValue&&o.modelValue.data)return;const l={id:((i=o.modelValue)==null?void 0:i.id)||y.r(),type:"CollapseCustom",onlyShowPc:!1,title:"我是标题collaspse",openFirst:!1,width:"",style:{},data:[]};c("update:modelValue",l)},C=e.computed(()=>{var l;return o.isPreview?!((l=o.modelValue)!=null&&l.onlyShowPc)||!y.i():!0}),V=()=>{const l=s.value;l&&(n.value=l.scrollHeight)};return e.onMounted(()=>{f.value=N.value,e.nextTick(V);const l=se(()=>{V()},250);u.value=new ResizeObserver(l),u.value.observe(s.value)}),e.onBeforeUnmount(()=>{s.value&&u.value&&u.value.unobserve(s.value)}),O(),(l,i)=>{var x,w;return C.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["collapse-custom",g.value]),style:e.normalizeStyle(m.value),onMouseover:i[4]||(i[4]=r=>d.value=!0),onMouseout:i[5]||(i[5]=r=>d.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["collapse-custom_container",[(x=t.modelValue)!=null&&x.width?`container-content-${(w=t.modelValue)==null?void 0:w.width}`:"container-content"]])},[e.createElementVNode("div",ge,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["collapse-custom__btn",{"--is-collapsed":!f.value}]),onClick:i[0]||(i[0]=r=>f.value=!f.value)},[e.createElementVNode("h4",{class:"collapse-custom__btn__title",innerHTML:b.value},null,8,we),i[6]||(i[6]=e.createElementVNode("span",{class:"collapse-custom__btn__icon"},null,-1))],2),e.createElementVNode("div",{class:e.normalizeClass(["collapse-custom__content",{"--is-open":f.value}]),ref_key:"content",ref:s,style:e.normalizeStyle({"--scroll-height":`${n.value}px`})},[e.createElementVNode("div",be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(r,v)=>(e.openBlock(),e.createElementBlock("div",{key:r.id,class:"page-item"},[e.createElementVNode("div",Ne,[e.createVNode(y.a,{type:r.type,"props-data":{modelValue:r}},null,8,["type","props-data"])])]))),128))])],6)]),t.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(y.O,{key:0,show:d.value,"onUpdate:show":i[1]||(i[1]=r=>d.value=r),onHandleEdit:i[2]||(i[2]=r=>p.value=!0),onHandleDelete:l.handleDelete,onHandleCopy:l.handleCopy,onHandlePaste:l.handlePaste,style:{top:"-20px"}},null,8,["show","onHandleDelete","onHandleCopy","onHandlePaste"]))],2),t.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ye,{key:0,show:p.value,"onUpdate:show":i[3]||(i[3]=r=>p.value=r),data:t.modelValue},null,8,["show","data"]))],38)):e.createCommentVNode("",!0)}}},Ce=y._(he,[["__scopeId","data-v-6e5b9702"]]);exports.default=Ce;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CClVOzrU.js");exports.default=e.b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CClVOzrU.js");exports.default=e.c;
|