@vipl520/dk-ui 1.0.13 → 1.0.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/index.js +115 -78
- package/dist/index.min.js +3 -3
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +5 -5
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +115 -78
- package/dist/web-types.json +1 -1
- package/es/hot-area-input/style/index.scss +0 -1
- package/es/page-diy/index.d.ts +18 -0
- package/es/page-diy/src/components/DragBox.vue.mjs +1 -0
- package/es/page-diy/src/components/DragBox.vue.mjs.map +1 -1
- package/es/page-diy/src/components/DragTool.vue.mjs.map +1 -1
- package/es/page-diy/src/components/PreviewPhone.vue2.mjs +26 -4
- package/es/page-diy/src/components/PreviewPhone.vue2.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/common/DkMinBlank.d.ts +1 -1
- package/es/page-diy/src/config/rule/min/common/DkMinBlank.mjs +1 -1
- package/es/page-diy/src/config/rule/min/common/DkMinBlank.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/common/index.d.ts +2 -2
- package/es/page-diy/src/config/rule/min/index.d.ts +2 -2
- package/es/page-diy/src/page-diy.vue.d.ts +18 -0
- package/es/page-diy/src/page-diy.vue.mjs +2 -2
- package/es/page-diy/src/page-diy.vue.mjs.map +1 -1
- package/es/page-diy/src/props.d.ts +8 -0
- package/es/page-diy/src/props.mjs +8 -0
- package/es/page-diy/src/props.mjs.map +1 -1
- package/es/page-diy/src/views/min/DkMinBlank.vue.d.ts +5 -5
- package/es/page-diy/src/views/min/DkMinBlank.vue.mjs +2 -2
- package/es/page-diy/src/views/min/DkMinBlank.vue.mjs.map +1 -1
- package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs +2 -1
- package/es/page-diy/src/views/min/DkMinHotArea.vue.mjs.map +1 -1
- package/es/page-diy/style/drag-tool.css +1 -1
- package/es/page-diy/style/drag-tool.scss +2 -1
- package/es/page-diy/style/index.css +1 -1
- package/es/select/src/select.vue2.mjs +1 -1
- package/es/select/src/select.vue2.mjs.map +1 -1
- package/es/style-border-input/src/style-border-input.vue2.mjs +49 -45
- package/es/style-border-input/src/style-border-input.vue2.mjs.map +1 -1
- package/es/style-shadow-input/src/style-shadow-input.vue2.mjs +3 -2
- package/es/style-shadow-input/src/style-shadow-input.vue2.mjs.map +1 -1
- package/lib/hot-area-input/style/index.scss +0 -1
- package/lib/page-diy/index.d.ts +18 -0
- package/lib/page-diy/src/components/DragBox.vue.js +1 -0
- package/lib/page-diy/src/components/DragBox.vue.js.map +1 -1
- package/lib/page-diy/src/components/DragTool.vue.js.map +1 -1
- package/lib/page-diy/src/components/PreviewPhone.vue2.js +26 -4
- package/lib/page-diy/src/components/PreviewPhone.vue2.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinBlank.d.ts +1 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinBlank.js +1 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinBlank.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/common/index.d.ts +2 -2
- package/lib/page-diy/src/config/rule/min/index.d.ts +2 -2
- package/lib/page-diy/src/page-diy.vue.d.ts +18 -0
- package/lib/page-diy/src/page-diy.vue.js +2 -2
- package/lib/page-diy/src/page-diy.vue.js.map +1 -1
- package/lib/page-diy/src/props.d.ts +8 -0
- package/lib/page-diy/src/props.js +8 -0
- package/lib/page-diy/src/props.js.map +1 -1
- package/lib/page-diy/src/views/min/DkMinBlank.vue.d.ts +5 -5
- package/lib/page-diy/src/views/min/DkMinBlank.vue.js +2 -2
- package/lib/page-diy/src/views/min/DkMinBlank.vue.js.map +1 -1
- package/lib/page-diy/src/views/min/DkMinHotArea.vue.js +2 -1
- package/lib/page-diy/src/views/min/DkMinHotArea.vue.js.map +1 -1
- package/lib/page-diy/style/drag-tool.css +1 -1
- package/lib/page-diy/style/drag-tool.scss +2 -1
- package/lib/page-diy/style/index.css +1 -1
- package/lib/select/src/select.vue2.js +1 -1
- package/lib/select/src/select.vue2.js.map +1 -1
- package/lib/style-border-input/src/style-border-input.vue2.js +49 -45
- package/lib/style-border-input/src/style-border-input.vue2.js.map +1 -1
- package/lib/style-shadow-input/src/style-shadow-input.vue2.js +3 -2
- package/lib/style-shadow-input/src/style-shadow-input.vue2.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -9866,7 +9866,7 @@ const groupProps = {
|
|
9866
9866
|
|
9867
9867
|
const _hoisted_1$Q = { key: 1 };
|
9868
9868
|
const _hoisted_2$C = { class: "collapse-title" };
|
9869
|
-
const _hoisted_3$
|
9869
|
+
const _hoisted_3$q = { class: "_dk-group-handle" };
|
9870
9870
|
const __default__$I = defineComponent({
|
9871
9871
|
name: "DkGroup"
|
9872
9872
|
});
|
@@ -10177,7 +10177,7 @@ var _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
10177
10177
|
onEmitEvent: (name, ...args) => emitEvent(name, args, index),
|
10178
10178
|
"onUpdate:api": ($f) => add$f(index, $f)
|
10179
10179
|
}, null, 8, ["model-value", "rule", "option", "onUpdate:modelValue", "onEmitEvent", "onUpdate:api"])),
|
10180
|
-
createElementVNode("div", _hoisted_3$
|
10180
|
+
createElementVNode("div", _hoisted_3$q, [
|
10181
10181
|
createVNode(
|
10182
10182
|
_component_el_button_group,
|
10183
10183
|
null,
|
@@ -10344,7 +10344,7 @@ const tinyEditorProps = {
|
|
10344
10344
|
|
10345
10345
|
const _hoisted_1$P = { key: 0 };
|
10346
10346
|
const _hoisted_2$B = { key: 1 };
|
10347
|
-
const _hoisted_3$
|
10347
|
+
const _hoisted_3$p = { class: "text-center" };
|
10348
10348
|
const __default__$H = defineComponent({
|
10349
10349
|
name: "DkTinyEditor"
|
10350
10350
|
});
|
@@ -10475,7 +10475,7 @@ var _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
10475
10475
|
width: "900px"
|
10476
10476
|
}, {
|
10477
10477
|
footer: withCtx(() => [
|
10478
|
-
createElementVNode("div", _hoisted_3$
|
10478
|
+
createElementVNode("div", _hoisted_3$p, [
|
10479
10479
|
createVNode(_component_el_button, {
|
10480
10480
|
type: "primary",
|
10481
10481
|
style: { "width": "200px" },
|
@@ -10704,7 +10704,7 @@ const hotAreaInputProps = {
|
|
10704
10704
|
|
10705
10705
|
const _hoisted_1$N = { class: "hot-area-content" };
|
10706
10706
|
const _hoisted_2$A = { class: "hot-area-draggable" };
|
10707
|
-
const _hoisted_3$
|
10707
|
+
const _hoisted_3$o = {
|
10708
10708
|
class: "hot-item-content",
|
10709
10709
|
style: { "position": "relative", "width": "100%", "height": "100%", "background": "#0003" }
|
10710
10710
|
};
|
@@ -10861,7 +10861,7 @@ var _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
10861
10861
|
default: withCtx(() => [
|
10862
10862
|
createElementVNode(
|
10863
10863
|
"div",
|
10864
|
-
_hoisted_3$
|
10864
|
+
_hoisted_3$o,
|
10865
10865
|
toDisplayString(key + 1),
|
10866
10866
|
1
|
10867
10867
|
/* TEXT */
|
@@ -11585,7 +11585,7 @@ const _hoisted_2$x = /* @__PURE__ */ createElementVNode(
|
|
11585
11585
|
-1
|
11586
11586
|
/* HOISTED */
|
11587
11587
|
);
|
11588
|
-
const _hoisted_3$
|
11588
|
+
const _hoisted_3$n = /* @__PURE__ */ createElementVNode(
|
11589
11589
|
"path",
|
11590
11590
|
{
|
11591
11591
|
fill: "#B0B7BD",
|
@@ -11722,7 +11722,7 @@ var _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
11722
11722
|
return openBlock(), createElementBlock("svg", _hoisted_1$J, [
|
11723
11723
|
createElementVNode("g", null, [
|
11724
11724
|
_hoisted_2$x,
|
11725
|
-
_hoisted_3$
|
11725
|
+
_hoisted_3$n,
|
11726
11726
|
_hoisted_4$i,
|
11727
11727
|
createElementVNode(
|
11728
11728
|
"path",
|
@@ -11770,7 +11770,7 @@ const attachmentProps = {
|
|
11770
11770
|
|
11771
11771
|
const _hoisted_1$I = { class: "dk-attachment attachment" };
|
11772
11772
|
const _hoisted_2$w = { class: "attachment-header flex justify-between pt-5px pb-5px" };
|
11773
|
-
const _hoisted_3$
|
11773
|
+
const _hoisted_3$m = { class: "header-form z" };
|
11774
11774
|
const _hoisted_4$h = { class: "header-button y" };
|
11775
11775
|
const _hoisted_5$c = /* @__PURE__ */ createElementVNode(
|
11776
11776
|
"i",
|
@@ -12026,7 +12026,7 @@ var _sfc_main$Y = /* @__PURE__ */ defineComponent({
|
|
12026
12026
|
return openBlock(), createElementBlock("div", _hoisted_1$I, [
|
12027
12027
|
createCommentVNode(" \u9876\u90E8"),
|
12028
12028
|
createElementVNode("div", _hoisted_2$w, [
|
12029
|
-
createElementVNode("div", _hoisted_3$
|
12029
|
+
createElementVNode("div", _hoisted_3$m, [
|
12030
12030
|
createVNode(_component_el_input, {
|
12031
12031
|
modelValue: searchFileName.value,
|
12032
12032
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchFileName.value = $event),
|
@@ -12448,7 +12448,7 @@ const fileInputProps = {
|
|
12448
12448
|
|
12449
12449
|
const _hoisted_1$G = { class: "show m-t-5px" };
|
12450
12450
|
const _hoisted_2$v = { class: "image-error" };
|
12451
|
-
const _hoisted_3$
|
12451
|
+
const _hoisted_3$l = { class: "image-slot" };
|
12452
12452
|
const _hoisted_4$g = { class: "no-image" };
|
12453
12453
|
const __default__$x = defineComponent({
|
12454
12454
|
name: "DkFileInput"
|
@@ -12585,7 +12585,7 @@ var _sfc_main$W = /* @__PURE__ */ defineComponent({
|
|
12585
12585
|
style: { "width": "100%", "height": "100%" }
|
12586
12586
|
}, {
|
12587
12587
|
error: withCtx(() => [
|
12588
|
-
createElementVNode("div", _hoisted_3$
|
12588
|
+
createElementVNode("div", _hoisted_3$l, [
|
12589
12589
|
createElementVNode("div", _hoisted_4$g, [
|
12590
12590
|
createVNode(_component_el_icon, null, {
|
12591
12591
|
default: withCtx(() => [
|
@@ -12845,7 +12845,7 @@ const fileListInputProps = {
|
|
12845
12845
|
|
12846
12846
|
const _hoisted_1$F = { class: "dk-image-list" };
|
12847
12847
|
const _hoisted_2$u = ["onClick"];
|
12848
|
-
const _hoisted_3$
|
12848
|
+
const _hoisted_3$k = { key: 0 };
|
12849
12849
|
const __default__$t = defineComponent({
|
12850
12850
|
name: "DkFileListInput"
|
12851
12851
|
});
|
@@ -12955,7 +12955,7 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
12955
12955
|
128
|
12956
12956
|
/* KEYED_FRAGMENT */
|
12957
12957
|
)),
|
12958
|
-
_ctx.limit > input.value.length && !_ctx.disabled ? (openBlock(), createElementBlock("li", _hoisted_3$
|
12958
|
+
_ctx.limit > input.value.length && !_ctx.disabled ? (openBlock(), createElementBlock("li", _hoisted_3$k, [
|
12959
12959
|
createElementVNode(
|
12960
12960
|
"div",
|
12961
12961
|
{
|
@@ -13217,7 +13217,7 @@ const _hoisted_2$t = {
|
|
13217
13217
|
class: "text-center",
|
13218
13218
|
style: { "font-size": "12px", "color": "#999" }
|
13219
13219
|
};
|
13220
|
-
const _hoisted_3$
|
13220
|
+
const _hoisted_3$j = { class: "search-icon" };
|
13221
13221
|
const __default__$p = defineComponent({
|
13222
13222
|
name: "DkIconContent"
|
13223
13223
|
});
|
@@ -13431,7 +13431,7 @@ var _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
13431
13431
|
_: 1
|
13432
13432
|
/* STABLE */
|
13433
13433
|
}, 8, ["modelValue"]),
|
13434
|
-
createElementVNode("div", _hoisted_3$
|
13434
|
+
createElementVNode("div", _hoisted_3$j, [
|
13435
13435
|
createVNode(_component_el_input, {
|
13436
13436
|
modelValue: searchIcon.value,
|
13437
13437
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchIcon.value = $event),
|
@@ -14366,7 +14366,7 @@ const paddings = [
|
|
14366
14366
|
|
14367
14367
|
const _hoisted_1$z = { class: "dk-style-box-input" };
|
14368
14368
|
const _hoisted_2$r = { class: "header" };
|
14369
|
-
const _hoisted_3$
|
14369
|
+
const _hoisted_3$i = { class: "items-center" };
|
14370
14370
|
const _hoisted_4$f = { class: "float-right cursor-pointer" };
|
14371
14371
|
const _hoisted_5$b = { class: "name-header-operations" };
|
14372
14372
|
const _hoisted_6$8 = { class: "name-header-operations" };
|
@@ -14665,7 +14665,7 @@ var _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
14665
14665
|
/* STYLE */
|
14666
14666
|
),
|
14667
14667
|
createElementVNode("div", _hoisted_2$r, [
|
14668
|
-
createElementVNode("label", _hoisted_3$
|
14668
|
+
createElementVNode("label", _hoisted_3$i, [
|
14669
14669
|
createTextVNode(" \u5185\u5916\u8FB9\u8DDD | \u9AD8\u5BBD "),
|
14670
14670
|
createVNode(_component_el_popover, {
|
14671
14671
|
ref: "popover",
|
@@ -14982,7 +14982,7 @@ const styleFontInputProps = {
|
|
14982
14982
|
|
14983
14983
|
const _hoisted_1$y = { class: "dk-style-font-input" };
|
14984
14984
|
const _hoisted_2$q = { style: { "display": "flex", "flex-flow": "row wrap" } };
|
14985
|
-
const _hoisted_3$
|
14985
|
+
const _hoisted_3$h = { class: "m-b-5px" };
|
14986
14986
|
const _hoisted_4$e = {
|
14987
14987
|
style: { "width": "100px" },
|
14988
14988
|
class: "m-b-5px"
|
@@ -15096,7 +15096,7 @@ var _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
15096
15096
|
}, 8, ["disabled"])
|
15097
15097
|
]),
|
15098
15098
|
default: withCtx(() => [
|
15099
|
-
createElementVNode("div", _hoisted_3$
|
15099
|
+
createElementVNode("div", _hoisted_3$h, [
|
15100
15100
|
createVNode(_component_el_color_picker, {
|
15101
15101
|
modelValue: styles.color,
|
15102
15102
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => styles.color = $event)
|
@@ -15445,6 +15445,7 @@ const _hoisted_2$p = {
|
|
15445
15445
|
style: { "width": "100%" },
|
15446
15446
|
class: "m-l-20px"
|
15447
15447
|
};
|
15448
|
+
const _hoisted_3$g = { style: { "display": "flex" } };
|
15448
15449
|
const __default__$i = defineComponent({
|
15449
15450
|
name: "DkStyleBorderInput"
|
15450
15451
|
});
|
@@ -15676,51 +15677,54 @@ var _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
15676
15677
|
}, 8, ["disabled"])
|
15677
15678
|
]),
|
15678
15679
|
default: withCtx(() => [
|
15679
|
-
|
15680
|
-
|
15681
|
-
|
15682
|
-
|
15683
|
-
|
15684
|
-
|
15685
|
-
|
15686
|
-
|
15687
|
-
|
15688
|
-
|
15689
|
-
|
15690
|
-
|
15691
|
-
|
15692
|
-
|
15693
|
-
|
15694
|
-
|
15695
|
-
|
15696
|
-
|
15697
|
-
|
15698
|
-
|
15699
|
-
|
15700
|
-
|
15701
|
-
|
15702
|
-
|
15703
|
-
|
15704
|
-
|
15705
|
-
|
15706
|
-
|
15707
|
-
|
15708
|
-
|
15709
|
-
|
15710
|
-
|
15711
|
-
|
15712
|
-
|
15713
|
-
|
15714
|
-
|
15715
|
-
|
15716
|
-
|
15717
|
-
|
15718
|
-
|
15719
|
-
|
15720
|
-
|
15721
|
-
|
15722
|
-
|
15723
|
-
|
15680
|
+
createElementVNode("div", _hoisted_3$g, [
|
15681
|
+
createVNode(_component_el_slider, {
|
15682
|
+
modelValue: form[position.value].borderWidth,
|
15683
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => form[position.value].borderWidth = $event),
|
15684
|
+
class: "dk-border-slider",
|
15685
|
+
max: 50,
|
15686
|
+
onChange: _cache[2] || (_cache[2] = ($event) => clearOtherBorder())
|
15687
|
+
}, null, 8, ["modelValue"]),
|
15688
|
+
createVNode(_component_el_input, {
|
15689
|
+
modelValue: form[position.value].borderWidth,
|
15690
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => form[position.value].borderWidth = $event),
|
15691
|
+
class: "dk-border-input",
|
15692
|
+
type: "number",
|
15693
|
+
onChange: _cache[6] || (_cache[6] = ($event) => clearOtherBorder())
|
15694
|
+
}, {
|
15695
|
+
append: withCtx(() => [
|
15696
|
+
createVNode(_component_el_select, {
|
15697
|
+
modelValue: form[position.value].unit,
|
15698
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => form[position.value].unit = $event),
|
15699
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
15700
|
+
class: "dk-border-select",
|
15701
|
+
style: { "width": "50px" },
|
15702
|
+
"suffix-icon": "",
|
15703
|
+
onChange: _cache[4] || (_cache[4] = ($event) => clearOtherBorder())
|
15704
|
+
}, {
|
15705
|
+
default: withCtx(() => [
|
15706
|
+
(openBlock(), createElementBlock(
|
15707
|
+
Fragment,
|
15708
|
+
null,
|
15709
|
+
renderList(units, (item) => {
|
15710
|
+
return createVNode(_component_el_option, {
|
15711
|
+
key: item,
|
15712
|
+
label: item,
|
15713
|
+
value: item
|
15714
|
+
}, null, 8, ["label", "value"]);
|
15715
|
+
}),
|
15716
|
+
64
|
15717
|
+
/* STABLE_FRAGMENT */
|
15718
|
+
))
|
15719
|
+
]),
|
15720
|
+
_: 1
|
15721
|
+
/* STABLE */
|
15722
|
+
}, 8, ["modelValue"])
|
15723
|
+
]),
|
15724
|
+
_: 1
|
15725
|
+
/* STABLE */
|
15726
|
+
}, 8, ["modelValue"])
|
15727
|
+
])
|
15724
15728
|
]),
|
15725
15729
|
_: 1
|
15726
15730
|
/* STABLE */
|
@@ -16012,13 +16016,14 @@ var _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
16012
16016
|
return shadows.value.join(",");
|
16013
16017
|
});
|
16014
16018
|
watch(boxShadow, (n, o) => {
|
16015
|
-
emit("update:modelValue", { boxShadow });
|
16019
|
+
emit("update:modelValue", { boxShadow: boxShadow.value });
|
16016
16020
|
});
|
16017
16021
|
watch(
|
16018
16022
|
() => props.modelValue,
|
16019
16023
|
() => {
|
16020
16024
|
init();
|
16021
|
-
}
|
16025
|
+
},
|
16026
|
+
{ deep: true }
|
16022
16027
|
);
|
16023
16028
|
onMounted(() => {
|
16024
16029
|
init();
|
@@ -17872,7 +17877,8 @@ var _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
17872
17877
|
const cache = JSON.parse(storage.get(key) || "{}");
|
17873
17878
|
const form = ref({
|
17874
17879
|
showLine: cache.showLine || false,
|
17875
|
-
margin: cache.margin || 0
|
17880
|
+
margin: cache.margin || 0,
|
17881
|
+
preview: cache.preview || false
|
17876
17882
|
});
|
17877
17883
|
const changeForm = () => {
|
17878
17884
|
storage.set(key, JSON.stringify(form.value));
|
@@ -17894,13 +17900,23 @@ var _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
17894
17900
|
});
|
17895
17901
|
};
|
17896
17902
|
const _style = computed(() => {
|
17897
|
-
let line = {
|
17898
|
-
|
17903
|
+
let line = {
|
17904
|
+
"--padding": "0",
|
17905
|
+
"--overflow": "initial"
|
17906
|
+
};
|
17907
|
+
if (form.value.showLine && !form.value.preview) {
|
17899
17908
|
line = {
|
17900
17909
|
"--margin": form.value.margin + "px",
|
17901
17910
|
"--showDashed": "1px"
|
17902
17911
|
};
|
17903
17912
|
}
|
17913
|
+
if (form.value.preview) {
|
17914
|
+
line["--padding"] = "0";
|
17915
|
+
line["--overflow"] = "hidden";
|
17916
|
+
} else {
|
17917
|
+
line["--padding"] = "2px 0";
|
17918
|
+
line["--overflow"] = "initial";
|
17919
|
+
}
|
17904
17920
|
return {
|
17905
17921
|
...props.pageConfig.style,
|
17906
17922
|
...line
|
@@ -18029,12 +18045,23 @@ var _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
18029
18045
|
min: 0,
|
18030
18046
|
step: 1,
|
18031
18047
|
"show-stops": "",
|
18032
|
-
max:
|
18048
|
+
max: 20,
|
18033
18049
|
onChange: _cache[5] || (_cache[5] = ($event) => changeForm())
|
18034
18050
|
}, null, 8, ["modelValue"])
|
18035
18051
|
]),
|
18036
18052
|
_: 1
|
18037
18053
|
/* STABLE */
|
18054
|
+
}),
|
18055
|
+
createVNode(_component_el_form_item, { label: "\u6548\u679C\u9884\u89C8" }, {
|
18056
|
+
default: withCtx(() => [
|
18057
|
+
createVNode(_component_el_switch, {
|
18058
|
+
modelValue: form.value.preview,
|
18059
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => form.value.preview = $event),
|
18060
|
+
onChange: _cache[7] || (_cache[7] = ($event) => changeForm())
|
18061
|
+
}, null, 8, ["modelValue"])
|
18062
|
+
]),
|
18063
|
+
_: 1
|
18064
|
+
/* STABLE */
|
18038
18065
|
})
|
18039
18066
|
]),
|
18040
18067
|
_: 1
|
@@ -20739,7 +20766,7 @@ var DkMinBlank$1 = {
|
|
20739
20766
|
return {
|
20740
20767
|
type: name$2,
|
20741
20768
|
props: {
|
20742
|
-
height:
|
20769
|
+
height: 20
|
20743
20770
|
},
|
20744
20771
|
showStyle: true
|
20745
20772
|
};
|
@@ -20977,6 +21004,14 @@ const pageDiyProps = {
|
|
20977
21004
|
loading: {
|
20978
21005
|
type: Boolean,
|
20979
21006
|
default: void 0
|
21007
|
+
},
|
21008
|
+
rightAsideWidth: {
|
21009
|
+
type: String,
|
21010
|
+
default: "300px"
|
21011
|
+
},
|
21012
|
+
leftAsideWidth: {
|
21013
|
+
type: String,
|
21014
|
+
default: "285px"
|
20980
21015
|
}
|
20981
21016
|
// 'menu', 'height', 'config', 'mask', 'locale', 'loading'
|
20982
21017
|
};
|
@@ -21204,8 +21239,8 @@ const _sfc_main$x = {
|
|
21204
21239
|
name: 'DkMinBlank',
|
21205
21240
|
props: {
|
21206
21241
|
height: {
|
21207
|
-
default:
|
21208
|
-
type: String,
|
21242
|
+
default: 20,
|
21243
|
+
type: [String, Number],
|
21209
21244
|
},
|
21210
21245
|
},
|
21211
21246
|
data() {
|
@@ -21345,7 +21380,8 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
|
|
21345
21380
|
? (openBlock(), createElementBlock("img", {
|
21346
21381
|
key: 0,
|
21347
21382
|
src: $props.hotData.background,
|
21348
|
-
alt: ""
|
21383
|
+
alt: "",
|
21384
|
+
style: {"width":"100%"}
|
21349
21385
|
}, null, 8 /* PROPS */, _hoisted_2$i))
|
21350
21386
|
: (openBlock(), createBlock(_component_el_empty, {
|
21351
21387
|
key: 1,
|
@@ -22637,12 +22673,12 @@ const _sfc_main$g = defineComponent({
|
|
22637
22673
|
stopChangeBound: null,
|
22638
22674
|
rightAside: {
|
22639
22675
|
style: {
|
22640
|
-
width:
|
22676
|
+
width: props.rightAsideWidth,
|
22641
22677
|
},
|
22642
22678
|
hide: false,
|
22643
22679
|
},
|
22644
22680
|
leftAside: {
|
22645
|
-
style: { width:
|
22681
|
+
style: { width: props.leftAsideWidth },
|
22646
22682
|
hide: false,
|
22647
22683
|
},
|
22648
22684
|
treeAside: {
|
@@ -23936,6 +23972,7 @@ const _sfc_main$e = defineComponent({
|
|
23936
23972
|
|
23937
23973
|
const keys = {};
|
23938
23974
|
if (ctx.$slots.default) {
|
23975
|
+
// 这里报错 Unhandled error during execution of render function
|
23939
23976
|
const children = ctx.$slots.default();
|
23940
23977
|
children.forEach((v) => {
|
23941
23978
|
if (v.key) {
|
@@ -30900,7 +30937,7 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
30900
30937
|
}, { ...props }, {
|
30901
30938
|
"remote-method": remoteMethod,
|
30902
30939
|
remote: "",
|
30903
|
-
placeholder: "
|
30940
|
+
placeholder: "\u8BF7\u9009\u62E9",
|
30904
30941
|
options: internalOptions.value,
|
30905
30942
|
style: { "width": "100%" },
|
30906
30943
|
onChange: handleChange,
|
package/dist/web-types.json
CHANGED
package/es/page-diy/index.d.ts
CHANGED
@@ -23,6 +23,14 @@ export declare const PageDiy: import("@vipl520/utils").WithInstall<import("vue")
|
|
23
23
|
type: BooleanConstructor;
|
24
24
|
default: undefined;
|
25
25
|
};
|
26
|
+
rightAsideWidth: {
|
27
|
+
type: StringConstructor;
|
28
|
+
default: string;
|
29
|
+
};
|
30
|
+
leftAsideWidth: {
|
31
|
+
type: StringConstructor;
|
32
|
+
default: string;
|
33
|
+
};
|
26
34
|
}, {
|
27
35
|
countObj: import("vue").ComputedRef<{}>;
|
28
36
|
diyTree: import("vue").ComputedRef<any[]>;
|
@@ -270,6 +278,14 @@ export declare const PageDiy: import("@vipl520/utils").WithInstall<import("vue")
|
|
270
278
|
type: BooleanConstructor;
|
271
279
|
default: undefined;
|
272
280
|
};
|
281
|
+
rightAsideWidth: {
|
282
|
+
type: StringConstructor;
|
283
|
+
default: string;
|
284
|
+
};
|
285
|
+
leftAsideWidth: {
|
286
|
+
type: StringConstructor;
|
287
|
+
default: string;
|
288
|
+
};
|
273
289
|
}>>, {
|
274
290
|
type: string;
|
275
291
|
config: Record<string, any>;
|
@@ -277,6 +293,8 @@ export declare const PageDiy: import("@vipl520/utils").WithInstall<import("vue")
|
|
277
293
|
menu: Record<string, any>;
|
278
294
|
mask: string;
|
279
295
|
height: string;
|
296
|
+
rightAsideWidth: string;
|
297
|
+
leftAsideWidth: string;
|
280
298
|
}, {}>>;
|
281
299
|
export default PageDiy;
|
282
300
|
export * from './src/props';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DragBox.vue.mjs","sources":["../../../../src/page-diy/src/components/DragBox.vue"],"sourcesContent":["<script>\nimport { h, defineComponent } from 'vue'\nimport draggable from 'vuedraggable/src/vuedraggable'\n\nexport default defineComponent({\n name: 'DragBox',\n props: ['rule', 'tag', 'formCreateInject'],\n render(ctx) {\n const subRule = { ...ctx.$props.rule.props, ...ctx.$attrs }\n let _class = ctx.tag + '-drag drag-box'\n if (!Object.keys(ctx.$slots).length) {\n _class += ' ' + ctx.tag + '-holder'\n }\n subRule.class = _class\n subRule.modelValue = [...this.$props.formCreateInject.children]\n\n const keys = {}\n if (ctx.$slots.default) {\n const children = ctx.$slots.default()\n children.forEach((v) => {\n if (v.key) {\n keys[v.key] = v\n }\n })\n }\n\n return h(draggable, subRule, {\n item: ({ element }) => {\n return h('div', {}, keys[element.__fc__.key + 'fc'])\n },\n })\n },\n})\n</script>\n"],"names":[],"mappings":";;;;AAIA,MAAK,SAAU,GAAG,eAAa,CAAA;AAC7B,EAAA,IAAI,EAAE,SAAS;AACf,EAAA,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,kBAAkB,CAAC;EAC1C,MAAM,CAAC,GAAG,EAAE;IACV,MAAM,OAAM,GAAI,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC,MAAO,GAAA;AAC1D,IAAA,IAAI,MAAK,GAAI,GAAG,CAAC,GAAI,GAAE,iBAAe;AACtC,IAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE;MACnC,MAAK,IAAK,GAAI,GAAE,GAAG,CAAC,GAAE,GAAI,UAAQ;AACpC,KAAA;AACA,IAAA,OAAO,CAAC,KAAM,GAAE,OAAK;IACrB,OAAO,CAAC,UAAS,GAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAA;;IAE9D,MAAM,IAAK,GAAE,GAAC;IACd,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE
|
1
|
+
{"version":3,"file":"DragBox.vue.mjs","sources":["../../../../src/page-diy/src/components/DragBox.vue"],"sourcesContent":["<script>\nimport { h, defineComponent } from 'vue'\nimport draggable from 'vuedraggable/src/vuedraggable'\n\nexport default defineComponent({\n name: 'DragBox',\n props: ['rule', 'tag', 'formCreateInject'],\n render(ctx) {\n const subRule = { ...ctx.$props.rule.props, ...ctx.$attrs }\n let _class = ctx.tag + '-drag drag-box'\n if (!Object.keys(ctx.$slots).length) {\n _class += ' ' + ctx.tag + '-holder'\n }\n subRule.class = _class\n subRule.modelValue = [...this.$props.formCreateInject.children]\n\n const keys = {}\n if (ctx.$slots.default) {\n // 这里报错 Unhandled error during execution of render function\n const children = ctx.$slots.default()\n children.forEach((v) => {\n if (v.key) {\n keys[v.key] = v\n }\n })\n }\n\n return h(draggable, subRule, {\n item: ({ element }) => {\n return h('div', {}, keys[element.__fc__.key + 'fc'])\n },\n })\n },\n})\n</script>\n"],"names":[],"mappings":";;;;AAIA,MAAK,SAAU,GAAG,eAAa,CAAA;AAC7B,EAAA,IAAI,EAAE,SAAS;AACf,EAAA,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,kBAAkB,CAAC;EAC1C,MAAM,CAAC,GAAG,EAAE;IACV,MAAM,OAAM,GAAI,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,GAAG,CAAC,MAAO,GAAA;AAC1D,IAAA,IAAI,MAAK,GAAI,GAAG,CAAC,GAAI,GAAE,iBAAe;AACtC,IAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE;MACnC,MAAK,IAAK,GAAI,GAAE,GAAG,CAAC,GAAE,GAAI,UAAQ;AACpC,KAAA;AACA,IAAA,OAAO,CAAC,KAAM,GAAE,OAAK;IACrB,OAAO,CAAC,UAAS,GAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAA;;IAE9D,MAAM,IAAK,GAAE,GAAC;IACd,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE;;AAEtB,MAAA,MAAM,QAAO,GAAI,GAAG,CAAC,MAAM,CAAC,OAAO,GAAC;MACpC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK;AACtB,QAAA,IAAI,CAAC,CAAC,GAAG,EAAE;UACT,IAAI,CAAC,CAAC,CAAC,GAAG,CAAA,GAAI,EAAA;AAChB,SAAA;OACD,EAAA;AACH,KAAA;;IAEA,OAAO,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE;AAC3B,MAAA,IAAI,EAAE,CAAC,EAAE,OAAM,EAAG,KAAK;QACrB,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAI,GAAE,IAAI,CAAC,CAAA;OACpD;KACF,CAAA;GACF;AACH,CAAC,EAAA;;;;;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DragTool.vue.mjs","sources":["../../../../src/page-diy/src/components/DragTool.vue"],"sourcesContent":["<template>\n <div\n class=\"drag-tool animate__animated\"\n :class=\"{ active: state.active === id }\"\n :style=\"_style\"\n @click.stop=\"active\"\n >\n <div v-if=\"mask\" class=\"drag-mask\"></div>\n <div class=\"drag-r\">\n <div class=\"drag-btn\" title=\"添加当前组件\" @click=\"$emit('create')\">\n <dk-icon icon=\"CirclePlus\"></dk-icon>\n </div>\n <div class=\"drag-btn\" title=\"复制当前组件\" @click=\"$emit('copy')\">\n <dk-icon icon=\"CopyDocument\"></dk-icon>\n </div>\n <div
|
1
|
+
{"version":3,"file":"DragTool.vue.mjs","sources":["../../../../src/page-diy/src/components/DragTool.vue"],"sourcesContent":["<template>\n <div\n class=\"drag-tool animate__animated\"\n :class=\"{ active: state.active === id }\"\n :style=\"_style\"\n @click.stop=\"active\"\n >\n <div v-if=\"mask\" class=\"drag-mask\"></div>\n <div class=\"drag-r\">\n <div class=\"drag-btn\" title=\"添加当前组件\" @click=\"$emit('create')\">\n <dk-icon icon=\"CirclePlus\"></dk-icon>\n </div>\n <div class=\"drag-btn\" title=\"复制当前组件\" @click=\"$emit('copy')\">\n <dk-icon icon=\"CopyDocument\"></dk-icon>\n </div>\n <div v-if=\"children\" class=\"drag-btn\" title=\"添加子组件\" @click=\"$emit('addChild')\">\n <dk-icon icon=\"fluent:tab-add-20-regular\"></dk-icon>\n </div>\n <div class=\"drag-btn drag-btn-danger\" title=\"删除组件\" @click=\"$emit('delete')\">\n <dk-icon icon=\"Close\"></dk-icon>\n </div>\n </div>\n <slot name=\"default\"></slot>\n </div>\n</template>\n\n<script>\nimport { computed, inject, toRefs, defineComponent } from 'vue'\n\nlet uni = 1\nexport default defineComponent({\n name: 'DragTool',\n props: {\n dragBtn: {\n default: false,\n type: Boolean,\n },\n children: {\n default: '',\n type: String,\n },\n unique: {\n default: '',\n type: String,\n },\n mask: {\n default: false,\n type: Boolean,\n },\n setting: {\n default: () => {},\n type: [Object],\n },\n },\n setup(props) {\n const { unique } = toRefs(props)\n const id = computed(() => unique.value || uni++)\n const state = inject('fcx')\n return {\n id,\n state,\n }\n },\n computed: {\n pageConfig() {\n return {}\n },\n _style() {\n if (this.setting.is_position) {\n return {\n ...this.setting.style,\n ...this.setting.position,\n position: 'absolute',\n }\n } else {\n return {\n ...this.setting.style,\n }\n }\n },\n _animate() {\n // if (this.setting.loop_animate) {\n // return 'animate__' + this.setting.loop_animate + ' '\n // } else if (this.setting.animate) {\n // return 'animate__' + this.setting.animate\n // } else {\n return ''\n // }\n },\n },\n beforeUnmount() {\n this.state = {}\n },\n methods: {\n active() {\n if (this.state.active === this.id) return\n this.state.active = this.id\n this.$emit('active')\n },\n },\n})\n</script>\n"],"names":["_createElementBlock","_openBlock","_createElementVNode","_createVNode","_renderSlot"],"mappings":";;;AA6BA,IAAI,MAAM,EAAA;AACV,MAAK,SAAU,GAAG,eAAa,CAAA;AAC7B,EAAA,IAAI,EAAE,UAAU;AAChB,EAAA,KAAK,EAAE;AACL,IAAA,OAAO,EAAE;MACP,OAAO,EAAE,KAAK;MACd,IAAI,EAAE,OAAO;KACd;AACD,IAAA,QAAQ,EAAE;MACR,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;AACD,IAAA,MAAM,EAAE;MACN,OAAO,EAAE,EAAE;MACX,IAAI,EAAE,MAAM;KACb;IACD,IAAI,EAAE;MACJ,OAAO,EAAE,KAAK;MACd,IAAI,EAAE,OAAO;KACd;AACD,IAAA,OAAO,EAAE;AACP,MAAA,OAAO,EAAE,MAAM,EAAE;MACjB,IAAI,EAAE,CAAC,MAAM,CAAC;KACf;GACF;EACD,KAAK,CAAC,KAAK,EAAE;IACX,MAAM,EAAE,MAAO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AA,OAAK,uCAAE,IAAK,CAAA,KAAA,CAAA,QAAA,CAAA,CAAA,CAAA;;QAC9DC,WAAgC,CAAA,kBAAA,EAAA,EAAvB,IAAI,EAAC,OAAO,EAAA,CAAA;;;IAGzBC,UAA4B,CAAA,IAAA,CAAA,MAAA,EAAA,SAAA,CAAA;;;;;;;"}
|
@@ -55,7 +55,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
55
55
|
const cache = JSON.parse(storage.get(key) || "{}");
|
56
56
|
const form = ref({
|
57
57
|
showLine: cache.showLine || false,
|
58
|
-
margin: cache.margin || 0
|
58
|
+
margin: cache.margin || 0,
|
59
|
+
preview: cache.preview || false
|
59
60
|
});
|
60
61
|
const changeForm = () => {
|
61
62
|
storage.set(key, JSON.stringify(form.value));
|
@@ -77,13 +78,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
77
78
|
});
|
78
79
|
};
|
79
80
|
const _style = computed(() => {
|
80
|
-
let line = {
|
81
|
-
|
81
|
+
let line = {
|
82
|
+
"--padding": "0",
|
83
|
+
"--overflow": "initial"
|
84
|
+
};
|
85
|
+
if (form.value.showLine && !form.value.preview) {
|
82
86
|
line = {
|
83
87
|
"--margin": form.value.margin + "px",
|
84
88
|
"--showDashed": "1px"
|
85
89
|
};
|
86
90
|
}
|
91
|
+
if (form.value.preview) {
|
92
|
+
line["--padding"] = "0";
|
93
|
+
line["--overflow"] = "hidden";
|
94
|
+
} else {
|
95
|
+
line["--padding"] = "2px 0";
|
96
|
+
line["--overflow"] = "initial";
|
97
|
+
}
|
87
98
|
return {
|
88
99
|
...props.pageConfig.style,
|
89
100
|
...line
|
@@ -212,12 +223,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
212
223
|
min: 0,
|
213
224
|
step: 1,
|
214
225
|
"show-stops": "",
|
215
|
-
max:
|
226
|
+
max: 20,
|
216
227
|
onChange: _cache[5] || (_cache[5] = ($event) => changeForm())
|
217
228
|
}, null, 8, ["modelValue"])
|
218
229
|
]),
|
219
230
|
_: 1
|
220
231
|
/* STABLE */
|
232
|
+
}),
|
233
|
+
createVNode(_component_el_form_item, { label: "\u6548\u679C\u9884\u89C8" }, {
|
234
|
+
default: withCtx(() => [
|
235
|
+
createVNode(_component_el_switch, {
|
236
|
+
modelValue: form.value.preview,
|
237
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => form.value.preview = $event),
|
238
|
+
onChange: _cache[7] || (_cache[7] = ($event) => changeForm())
|
239
|
+
}, null, 8, ["modelValue"])
|
240
|
+
]),
|
241
|
+
_: 1
|
242
|
+
/* STABLE */
|
221
243
|
})
|
222
244
|
]),
|
223
245
|
_: 1
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PreviewPhone.vue2.mjs","sources":["../../../../src/page-diy/src/components/PreviewPhone.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'PreviewPhone',\n});\n</script>\n<template>\n <div class=\"preview-phone\">\n <div class=\"phone\">\n <div class=\"phone-header\">\n <div class=\"phone-header-top\">\n <div class=\"phone-time\">\n <span>{{ time }}</span>\n <van-icon name=\"wechat\" color=\"#2ddd71\" />\n </div>\n <div />\n <div class=\"phone-battery\">\n <span class=\"m-r-4px\">100%</span>\n <dk-icon icon=\"gg:battery-full\" :size=\"18\" color=\"#555\" hover-color=\"#f00\"></dk-icon>\n </div>\n </div>\n <div class=\"phone-title\">\n <div class=\"phone-title-icon\">\n <el-dropdown trigger=\"click\" placement=\"bottom-start\">\n <dk-icon icon=\"Close\" hover-color=\"var(--el-color-primary)\" :size=\"20\" style=\"cursor: pointer\"></dk-icon>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"clear('rule')\">清除组件</el-dropdown-item>\n <el-dropdown-item @click=\"clear('page')\">清除页面</el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n </div>\n <div>页面标题</div>\n <div class=\"phone-title-icon\">\n <el-popover placement=\"bottom\" :width=\"200\" trigger=\"click\">\n <template #reference>\n <dk-icon icon=\"MoreFilled\" :size=\"20\" hover-color=\"var(--el-color-primary)\" style=\"cursor: pointer\" />\n </template>\n <el-form-item label=\"显示网格\">\n <el-switch v-model=\"form.showLine\" @change=\"changeForm()\" />\n </el-form-item>\n <el-form-item label=\"网格间距\">\n <el-slider v-model=\"form.margin\" :min=\"0\" :step=\"1\" show-stops :max=\"
|
1
|
+
{"version":3,"file":"PreviewPhone.vue2.mjs","sources":["../../../../src/page-diy/src/components/PreviewPhone.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'PreviewPhone',\n});\n</script>\n<template>\n <div class=\"preview-phone\">\n <div class=\"phone\">\n <div class=\"phone-header\">\n <div class=\"phone-header-top\">\n <div class=\"phone-time\">\n <span>{{ time }}</span>\n <van-icon name=\"wechat\" color=\"#2ddd71\" />\n </div>\n <div />\n <div class=\"phone-battery\">\n <span class=\"m-r-4px\">100%</span>\n <dk-icon icon=\"gg:battery-full\" :size=\"18\" color=\"#555\" hover-color=\"#f00\"></dk-icon>\n </div>\n </div>\n <div class=\"phone-title\">\n <div class=\"phone-title-icon\">\n <el-dropdown trigger=\"click\" placement=\"bottom-start\">\n <dk-icon icon=\"Close\" hover-color=\"var(--el-color-primary)\" :size=\"20\" style=\"cursor: pointer\"></dk-icon>\n <template #dropdown>\n <el-dropdown-menu>\n <el-dropdown-item @click=\"clear('rule')\">清除组件</el-dropdown-item>\n <el-dropdown-item @click=\"clear('page')\">清除页面</el-dropdown-item>\n </el-dropdown-menu>\n </template>\n </el-dropdown>\n </div>\n <div>页面标题</div>\n <div class=\"phone-title-icon\">\n <el-popover placement=\"bottom\" :width=\"200\" trigger=\"click\">\n <template #reference>\n <dk-icon icon=\"MoreFilled\" :size=\"20\" hover-color=\"var(--el-color-primary)\" style=\"cursor: pointer\" />\n </template>\n <el-form-item label=\"显示网格\">\n <el-switch v-model=\"form.showLine\" @change=\"changeForm()\" />\n </el-form-item>\n <el-form-item label=\"网格间距\">\n <el-slider v-model=\"form.margin\" :min=\"0\" :step=\"1\" show-stops :max=\"20\" @change=\"changeForm()\" />\n </el-form-item>\n <el-form-item label=\"效果预览\">\n <el-switch v-model=\"form.preview\" @change=\"changeForm()\" />\n </el-form-item>\n </el-popover>\n </div>\n </div>\n </div>\n <div class=\"phone-body _fc-m-drag\" :style=\"_style\">\n <slot />\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, inject } from 'vue'\nimport { storage } from '@vipl520/utils'\nimport { ElMessage, ElMessageBox } from 'element-plus'\n\nconst diy: any = inject('diy')\nconst props = defineProps({\n value: {\n default: '',\n type: String,\n },\n pageConfig: {\n default: () => {},\n type: [Object],\n },\n})\n\nconst key = 'preview-phone'\nconst cache: any = JSON.parse(storage.get(key) || '{}')\n\nconst form = ref({\n showLine: cache.showLine || false,\n margin: cache.margin || 0,\n preview: cache.preview || false,\n})\n\nconst changeForm = () => {\n storage.set(key, JSON.stringify(form.value))\n}\nconst clear = (type = '') => {\n const { proxy } = diy\n const typeName: any = {\n rule: '组件',\n config: '配置',\n }\n ElMessageBox.confirm('当前要清除' + typeName[type] + ',是否继续?', '警告', {\n confirmButtonText: '确定',\n cancelButtonText: '取消',\n type: 'warning',\n })\n .then(() => {\n proxy.clear(type)\n ElMessage.success('清除成功')\n })\n .catch(() => {})\n}\nconst _style = computed(() => {\n let line: any = {\n '--padding': '0',\n '--overflow': 'initial',\n }\n if (form.value.showLine && !form.value.preview) {\n line = {\n '--margin': form.value.margin + 'px',\n '--showDashed': '1px',\n }\n }\n if (form.value.preview) {\n line['--padding'] = '0'\n line['--overflow'] = 'hidden'\n } else {\n line['--padding'] = '2px 0'\n line['--overflow'] = 'initial'\n }\n return {\n ...props.pageConfig.style,\n ...line,\n }\n})\n\nconst time = computed(() => {\n const d = new Date()\n const hour = d.getHours() // 得到小时数\n const minute = d.getMinutes() // 得到分钟数\n return hour + ':' + minute\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,cAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;;;;;AA4DD,IAAM,MAAA,GAAA,GAAW,OAAO,KAAK,CAAA,CAAA;AAY7B,IAAA,MAAM,GAAM,GAAA,eAAA,CAAA;AACZ,IAAA,MAAM,QAAa,IAAK,CAAA,KAAA,CAAM,QAAQ,GAAI,CAAA,GAAG,KAAK,IAAI,CAAA,CAAA;AAEtD,IAAA,MAAM,OAAO,GAAI,CAAA;AAAA,MACf,QAAA,EAAU,MAAM,QAAY,IAAA,KAAA;AAAA,MAC5B,MAAA,EAAQ,MAAM,MAAU,IAAA,CAAA;AAAA,MACxB,OAAA,EAAS,MAAM,OAAW,IAAA,KAAA;AAAA,KAC3B,CAAA,CAAA;AAED,IAAA,MAAM,aAAa,MAAM;AACvB,MAAA,OAAA,CAAQ,IAAI,GAAK,EAAA,IAAA,CAAK,SAAU,CAAA,IAAA,CAAK,KAAK,CAAC,CAAA,CAAA;AAAA,KAC7C,CAAA;AACA,IAAM,MAAA,KAAA,GAAQ,CAAC,IAAA,GAAO,EAAO,KAAA;AAC3B,MAAM,MAAA,EAAE,OAAU,GAAA,GAAA,CAAA;AAClB,MAAA,MAAM,QAAgB,GAAA;AAAA,QACpB,IAAM,EAAA,cAAA;AAAA,QACN,MAAQ,EAAA,cAAA;AAAA,OACV,CAAA;AACA,MAAA,YAAA,CAAa,QAAQ,gCAAU,GAAA,QAAA,CAAS,IAAI,CAAA,GAAI,mCAAU,cAAM,EAAA;AAAA,QAC9D,iBAAmB,EAAA,cAAA;AAAA,QACnB,gBAAkB,EAAA,cAAA;AAAA,QAClB,IAAM,EAAA,SAAA;AA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