@vipl520/dk-ui 1.0.49 → 1.0.50
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +106 -18
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +4 -4
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +106 -18
- package/es/style-input/index.d.ts +35 -0
- package/es/style-input/src/props.d.ts +16 -0
- package/es/style-input/src/props.mjs +18 -0
- package/es/style-input/src/props.mjs.map +1 -1
- package/es/style-input/src/style-input.vue.d.ts +35 -0
- package/es/style-input/src/style-input.vue2.mjs +73 -3
- package/es/style-input/src/style-input.vue2.mjs.map +1 -1
- package/lib/style-input/index.d.ts +35 -0
- package/lib/style-input/src/props.d.ts +16 -0
- package/lib/style-input/src/props.js +18 -0
- package/lib/style-input/src/props.js.map +1 -1
- package/lib/style-input/src/style-input.vue.d.ts +35 -0
- package/lib/style-input/src/style-input.vue2.js +72 -2
- package/lib/style-input/src/style-input.vue2.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -955,7 +955,7 @@ const groupProps = {
|
|
955
955
|
|
956
956
|
const _hoisted_1$V = { key: 1 };
|
957
957
|
const _hoisted_2$I = { class: "collapse-title" };
|
958
|
-
const _hoisted_3$
|
958
|
+
const _hoisted_3$w = { class: "_dk-group-handle" };
|
959
959
|
const __default__$N = defineComponent({
|
960
960
|
name: "DkGroup"
|
961
961
|
});
|
@@ -1259,7 +1259,7 @@ var _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
1259
1259
|
onEmitEvent: (name, ...args) => emitEvent(name, args, index),
|
1260
1260
|
"onUpdate:api": ($f) => add$f(index, $f)
|
1261
1261
|
}, null, 8, ["model-value", "rule", "option", "onUpdate:modelValue", "onEmitEvent", "onUpdate:api"])),
|
1262
|
-
createElementVNode("div", _hoisted_3$
|
1262
|
+
createElementVNode("div", _hoisted_3$w, [
|
1263
1263
|
createVNode(
|
1264
1264
|
_component_el_button_group,
|
1265
1265
|
null,
|
@@ -1426,7 +1426,7 @@ const tinyEditorProps = {
|
|
1426
1426
|
|
1427
1427
|
const _hoisted_1$U = { key: 0 };
|
1428
1428
|
const _hoisted_2$H = { key: 1 };
|
1429
|
-
const _hoisted_3$
|
1429
|
+
const _hoisted_3$v = { class: "text-center" };
|
1430
1430
|
const __default__$M = defineComponent({
|
1431
1431
|
name: "DkTinyEditor"
|
1432
1432
|
});
|
@@ -1559,7 +1559,7 @@ var _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
1559
1559
|
"z-index": 1298
|
1560
1560
|
}, {
|
1561
1561
|
footer: withCtx(() => [
|
1562
|
-
createElementVNode("div", _hoisted_3$
|
1562
|
+
createElementVNode("div", _hoisted_3$v, [
|
1563
1563
|
createVNode(_component_el_button, {
|
1564
1564
|
type: "primary",
|
1565
1565
|
style: { "width": "200px" },
|
@@ -1788,7 +1788,7 @@ const hotAreaInputProps = {
|
|
1788
1788
|
|
1789
1789
|
const _hoisted_1$S = { class: "hot-area-content" };
|
1790
1790
|
const _hoisted_2$G = { class: "hot-area-draggable" };
|
1791
|
-
const _hoisted_3$
|
1791
|
+
const _hoisted_3$u = {
|
1792
1792
|
class: "hot-item-content",
|
1793
1793
|
style: { "position": "relative", "width": "100%", "height": "100%", "background": "#0003" }
|
1794
1794
|
};
|
@@ -1946,7 +1946,7 @@ var _sfc_main$18 = /* @__PURE__ */ defineComponent({
|
|
1946
1946
|
default: withCtx(() => [
|
1947
1947
|
createElementVNode(
|
1948
1948
|
"div",
|
1949
|
-
_hoisted_3$
|
1949
|
+
_hoisted_3$u,
|
1950
1950
|
toDisplayString(key + 1),
|
1951
1951
|
1
|
1952
1952
|
/* TEXT */
|
@@ -2676,7 +2676,7 @@ const _hoisted_2$D = /* @__PURE__ */ createElementVNode(
|
|
2676
2676
|
-1
|
2677
2677
|
/* HOISTED */
|
2678
2678
|
);
|
2679
|
-
const _hoisted_3$
|
2679
|
+
const _hoisted_3$t = /* @__PURE__ */ createElementVNode(
|
2680
2680
|
"path",
|
2681
2681
|
{
|
2682
2682
|
fill: "#B0B7BD",
|
@@ -2813,7 +2813,7 @@ var _sfc_main$14 = /* @__PURE__ */ defineComponent({
|
|
2813
2813
|
return openBlock(), createElementBlock("svg", _hoisted_1$O, [
|
2814
2814
|
createElementVNode("g", null, [
|
2815
2815
|
_hoisted_2$D,
|
2816
|
-
_hoisted_3$
|
2816
|
+
_hoisted_3$t,
|
2817
2817
|
_hoisted_4$l,
|
2818
2818
|
createElementVNode(
|
2819
2819
|
"path",
|
@@ -2861,7 +2861,7 @@ const attachmentProps = {
|
|
2861
2861
|
|
2862
2862
|
const _hoisted_1$N = { class: "dk-attachment attachment" };
|
2863
2863
|
const _hoisted_2$C = { class: "attachment-header flex justify-between pt-5px pb-5px" };
|
2864
|
-
const _hoisted_3$
|
2864
|
+
const _hoisted_3$s = { class: "header-form z" };
|
2865
2865
|
const _hoisted_4$k = { class: "header-button y" };
|
2866
2866
|
const _hoisted_5$e = /* @__PURE__ */ createElementVNode(
|
2867
2867
|
"i",
|
@@ -3117,7 +3117,7 @@ var _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
3117
3117
|
return openBlock(), createElementBlock("div", _hoisted_1$N, [
|
3118
3118
|
createCommentVNode(" \u9876\u90E8"),
|
3119
3119
|
createElementVNode("div", _hoisted_2$C, [
|
3120
|
-
createElementVNode("div", _hoisted_3$
|
3120
|
+
createElementVNode("div", _hoisted_3$s, [
|
3121
3121
|
createVNode(_component_el_input, {
|
3122
3122
|
modelValue: searchFileName.value,
|
3123
3123
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchFileName.value = $event),
|
@@ -3544,7 +3544,7 @@ const fileInputProps = {
|
|
3544
3544
|
|
3545
3545
|
const _hoisted_1$L = { class: "show m-t-5px" };
|
3546
3546
|
const _hoisted_2$B = { class: "image-error" };
|
3547
|
-
const _hoisted_3$
|
3547
|
+
const _hoisted_3$r = { class: "image-slot" };
|
3548
3548
|
const _hoisted_4$j = { class: "no-image" };
|
3549
3549
|
const __default__$C = defineComponent({
|
3550
3550
|
name: "DkFileInput"
|
@@ -3681,7 +3681,7 @@ var _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
3681
3681
|
style: { "width": "100%", "height": "100%" }
|
3682
3682
|
}, {
|
3683
3683
|
error: withCtx(() => [
|
3684
|
-
createElementVNode("div", _hoisted_3$
|
3684
|
+
createElementVNode("div", _hoisted_3$r, [
|
3685
3685
|
createElementVNode("div", _hoisted_4$j, [
|
3686
3686
|
createVNode(_component_el_icon, null, {
|
3687
3687
|
default: withCtx(() => [
|
@@ -3941,7 +3941,7 @@ const fileListInputProps = {
|
|
3941
3941
|
|
3942
3942
|
const _hoisted_1$K = { class: "dk-image-list" };
|
3943
3943
|
const _hoisted_2$A = ["onClick"];
|
3944
|
-
const _hoisted_3$
|
3944
|
+
const _hoisted_3$q = { key: 0 };
|
3945
3945
|
const __default__$y = defineComponent({
|
3946
3946
|
name: "DkFileListInput"
|
3947
3947
|
});
|
@@ -4051,7 +4051,7 @@ var _sfc_main$Z = /* @__PURE__ */ defineComponent({
|
|
4051
4051
|
128
|
4052
4052
|
/* KEYED_FRAGMENT */
|
4053
4053
|
)),
|
4054
|
-
_ctx.limit > input.value.length && !_ctx.disabled ? (openBlock(), createElementBlock("li", _hoisted_3$
|
4054
|
+
_ctx.limit > input.value.length && !_ctx.disabled ? (openBlock(), createElementBlock("li", _hoisted_3$q, [
|
4055
4055
|
createElementVNode(
|
4056
4056
|
"div",
|
4057
4057
|
{
|
@@ -4313,7 +4313,7 @@ const _hoisted_2$z = {
|
|
4313
4313
|
class: "text-center",
|
4314
4314
|
style: { "font-size": "12px", "color": "#999" }
|
4315
4315
|
};
|
4316
|
-
const _hoisted_3$
|
4316
|
+
const _hoisted_3$p = { class: "search-icon" };
|
4317
4317
|
const __default__$u = defineComponent({
|
4318
4318
|
name: "DkIconContent"
|
4319
4319
|
});
|
@@ -4527,7 +4527,7 @@ var _sfc_main$V = /* @__PURE__ */ defineComponent({
|
|
4527
4527
|
_: 1
|
4528
4528
|
/* STABLE */
|
4529
4529
|
}, 8, ["modelValue"]),
|
4530
|
-
createElementVNode("div", _hoisted_3$
|
4530
|
+
createElementVNode("div", _hoisted_3$p, [
|
4531
4531
|
createVNode(_component_el_input, {
|
4532
4532
|
modelValue: searchIcon.value,
|
4533
4533
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => searchIcon.value = $event),
|
@@ -4850,6 +4850,24 @@ const styleInputProps = {
|
|
4850
4850
|
return {};
|
4851
4851
|
},
|
4852
4852
|
type: Object
|
4853
|
+
},
|
4854
|
+
isDrawer: {
|
4855
|
+
default: false,
|
4856
|
+
type: Boolean
|
4857
|
+
},
|
4858
|
+
drawerProps: {
|
4859
|
+
default: () => {
|
4860
|
+
return {
|
4861
|
+
title: "\u7F16\u8F91\u6837\u5F0F",
|
4862
|
+
direction: "rtl",
|
4863
|
+
size: "400px"
|
4864
|
+
};
|
4865
|
+
},
|
4866
|
+
type: Object
|
4867
|
+
},
|
4868
|
+
drawerText: {
|
4869
|
+
default: "\u7F16\u8F91\u6837\u5F0F",
|
4870
|
+
type: String
|
4853
4871
|
}
|
4854
4872
|
};
|
4855
4873
|
|
@@ -4858,6 +4876,7 @@ const _hoisted_2$y = {
|
|
4858
4876
|
key: 0,
|
4859
4877
|
class: "p-5px"
|
4860
4878
|
};
|
4879
|
+
const _hoisted_3$o = { key: 1 };
|
4861
4880
|
const __default__$r = defineComponent({
|
4862
4881
|
name: "DkStyleInput"
|
4863
4882
|
});
|
@@ -4867,6 +4886,7 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
4867
4886
|
emits: ["update:modelValue"],
|
4868
4887
|
setup(__props, { emit }) {
|
4869
4888
|
const props = __props;
|
4889
|
+
const drawer = ref(false);
|
4870
4890
|
const activeNames = ref([0]);
|
4871
4891
|
const values = ref({});
|
4872
4892
|
const loading = ref(true);
|
@@ -4915,9 +4935,12 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
4915
4935
|
return (_ctx, _cache) => {
|
4916
4936
|
const _component_el_collapse_item = resolveComponent("el-collapse-item");
|
4917
4937
|
const _component_el_collapse = resolveComponent("el-collapse");
|
4938
|
+
const _component_el_button = resolveComponent("el-button");
|
4939
|
+
const _component_el_drawer = resolveComponent("el-drawer");
|
4918
4940
|
return openBlock(), createElementBlock("div", _hoisted_1$G, [
|
4919
4941
|
!loading.value ? (openBlock(), createElementBlock("div", _hoisted_2$y, [
|
4920
|
-
|
4942
|
+
!props.isDrawer ? (openBlock(), createBlock(_component_el_collapse, {
|
4943
|
+
key: 0,
|
4921
4944
|
modelValue: activeNames.value,
|
4922
4945
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeNames.value = $event)
|
4923
4946
|
}, {
|
@@ -4955,7 +4978,72 @@ var _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
4955
4978
|
]),
|
4956
4979
|
_: 1
|
4957
4980
|
/* STABLE */
|
4958
|
-
}, 8, ["modelValue"])
|
4981
|
+
}, 8, ["modelValue"])) : (openBlock(), createElementBlock("div", _hoisted_3$o, [
|
4982
|
+
createVNode(_component_el_button, {
|
4983
|
+
type: "primary",
|
4984
|
+
plain: "",
|
4985
|
+
style: { "width": "100%" },
|
4986
|
+
onClick: _cache[1] || (_cache[1] = ($event) => drawer.value = true)
|
4987
|
+
}, {
|
4988
|
+
default: withCtx(() => [
|
4989
|
+
createTextVNode(
|
4990
|
+
toDisplayString(props.drawerText),
|
4991
|
+
1
|
4992
|
+
/* TEXT */
|
4993
|
+
)
|
4994
|
+
]),
|
4995
|
+
_: 1
|
4996
|
+
/* STABLE */
|
4997
|
+
}),
|
4998
|
+
createVNode(_component_el_drawer, mergeProps({
|
4999
|
+
modelValue: drawer.value,
|
5000
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => drawer.value = $event)
|
5001
|
+
}, props.drawerProps), {
|
5002
|
+
default: withCtx(() => [
|
5003
|
+
createVNode(_component_el_collapse, {
|
5004
|
+
modelValue: activeNames.value,
|
5005
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => activeNames.value = $event)
|
5006
|
+
}, {
|
5007
|
+
default: withCtx(() => [
|
5008
|
+
(openBlock(true), createElementBlock(
|
5009
|
+
Fragment,
|
5010
|
+
null,
|
5011
|
+
renderList(_components.value, (item, key) => {
|
5012
|
+
return openBlock(), createBlock(_component_el_collapse_item, {
|
5013
|
+
key,
|
5014
|
+
title: "",
|
5015
|
+
name: key
|
5016
|
+
}, {
|
5017
|
+
title: withCtx(() => [
|
5018
|
+
createTextVNode(
|
5019
|
+
toDisplayString(item.title),
|
5020
|
+
1
|
5021
|
+
/* TEXT */
|
5022
|
+
)
|
5023
|
+
]),
|
5024
|
+
default: withCtx(() => [
|
5025
|
+
activeNames.value.includes(key) ? (openBlock(), createBlock(resolveDynamicComponent(item.name), mergeProps({
|
5026
|
+
key: 0,
|
5027
|
+
modelValue: values.value[item.name],
|
5028
|
+
"onUpdate:modelValue": ($event) => values.value[item.name] = $event
|
5029
|
+
}, item.props, { onChange }), null, 16, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("v-if", true)
|
5030
|
+
]),
|
5031
|
+
_: 2
|
5032
|
+
/* DYNAMIC */
|
5033
|
+
}, 1032, ["name"]);
|
5034
|
+
}),
|
5035
|
+
128
|
5036
|
+
/* KEYED_FRAGMENT */
|
5037
|
+
))
|
5038
|
+
]),
|
5039
|
+
_: 1
|
5040
|
+
/* STABLE */
|
5041
|
+
}, 8, ["modelValue"])
|
5042
|
+
]),
|
5043
|
+
_: 1
|
5044
|
+
/* STABLE */
|
5045
|
+
}, 16, ["modelValue"])
|
5046
|
+
]))
|
4959
5047
|
])) : createCommentVNode("v-if", true)
|
4960
5048
|
]);
|
4961
5049
|
};
|
@@ -11,6 +11,22 @@ export declare const StyleInput: import("@vipl520/utils").WithInstall<import("vu
|
|
11
11
|
default: () => {};
|
12
12
|
type: ObjectConstructor;
|
13
13
|
};
|
14
|
+
isDrawer: {
|
15
|
+
default: boolean;
|
16
|
+
type: BooleanConstructor;
|
17
|
+
};
|
18
|
+
drawerProps: {
|
19
|
+
default: () => {
|
20
|
+
title: string;
|
21
|
+
direction: string;
|
22
|
+
size: string;
|
23
|
+
};
|
24
|
+
type: ObjectConstructor;
|
25
|
+
};
|
26
|
+
drawerText: {
|
27
|
+
default: string;
|
28
|
+
type: StringConstructor;
|
29
|
+
};
|
14
30
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
15
31
|
components: {
|
16
32
|
default: () => import("./src/default").StyleInputConfig;
|
@@ -24,12 +40,31 @@ export declare const StyleInput: import("@vipl520/utils").WithInstall<import("vu
|
|
24
40
|
default: () => {};
|
25
41
|
type: ObjectConstructor;
|
26
42
|
};
|
43
|
+
isDrawer: {
|
44
|
+
default: boolean;
|
45
|
+
type: BooleanConstructor;
|
46
|
+
};
|
47
|
+
drawerProps: {
|
48
|
+
default: () => {
|
49
|
+
title: string;
|
50
|
+
direction: string;
|
51
|
+
size: string;
|
52
|
+
};
|
53
|
+
type: ObjectConstructor;
|
54
|
+
};
|
55
|
+
drawerText: {
|
56
|
+
default: string;
|
57
|
+
type: StringConstructor;
|
58
|
+
};
|
27
59
|
}>> & {
|
28
60
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
29
61
|
}, {
|
30
62
|
modelValue: Record<string, any>;
|
31
63
|
components: import("./src/default").StyleInputConfig;
|
32
64
|
hideComponents: string[];
|
65
|
+
isDrawer: boolean;
|
66
|
+
drawerProps: Record<string, any>;
|
67
|
+
drawerText: string;
|
33
68
|
}, {}>>;
|
34
69
|
export default StyleInput;
|
35
70
|
export * from './src/props';
|
@@ -19,5 +19,21 @@ export declare const styleInputProps: {
|
|
19
19
|
default: () => {};
|
20
20
|
type: ObjectConstructor;
|
21
21
|
};
|
22
|
+
isDrawer: {
|
23
|
+
default: boolean;
|
24
|
+
type: BooleanConstructor;
|
25
|
+
};
|
26
|
+
drawerProps: {
|
27
|
+
default: () => {
|
28
|
+
title: string;
|
29
|
+
direction: string;
|
30
|
+
size: string;
|
31
|
+
};
|
32
|
+
type: ObjectConstructor;
|
33
|
+
};
|
34
|
+
drawerText: {
|
35
|
+
default: string;
|
36
|
+
type: StringConstructor;
|
37
|
+
};
|
22
38
|
};
|
23
39
|
export type StyleInputProps = ExtractPropTypes<typeof styleInputProps>;
|
@@ -24,6 +24,24 @@ const styleInputProps = {
|
|
24
24
|
return {};
|
25
25
|
},
|
26
26
|
type: Object
|
27
|
+
},
|
28
|
+
isDrawer: {
|
29
|
+
default: false,
|
30
|
+
type: Boolean
|
31
|
+
},
|
32
|
+
drawerProps: {
|
33
|
+
default: () => {
|
34
|
+
return {
|
35
|
+
title: "\u7F16\u8F91\u6837\u5F0F",
|
36
|
+
direction: "rtl",
|
37
|
+
size: "400px"
|
38
|
+
};
|
39
|
+
},
|
40
|
+
type: Object
|
41
|
+
},
|
42
|
+
drawerText: {
|
43
|
+
default: "\u7F16\u8F91\u6837\u5F0F",
|
44
|
+
type: String
|
27
45
|
}
|
28
46
|
};
|
29
47
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"props.mjs","sources":["../../../src/style-input/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { defaultConfig, type StyleInputConfig } from './default'\n\nexport const styleInputProps = {\n /**\n * 引入组件\n */\n components: {\n default: () => {\n return defaultConfig\n },\n type: Array as () => StyleInputConfig,\n },\n /**\n * 需要隐藏组件\n */\n hideComponents: {\n default: () => {\n return []\n },\n type: Array as () => string[],\n },\n modelValue: {\n default: () => {\n return {}\n },\n type: Object,\n },\n}\n\nexport type StyleInputProps = ExtractPropTypes<typeof styleInputProps>\n"],"names":[],"mappings":";;AAGO,MAAM,eAAkB,GAAA;AAAA;AAAA;AAAA;AAAA,EAI7B,UAAY,EAAA;AAAA,IACV,SAAS,MAAM;AACb,MAAO,OAAA,aAAA,CAAA;AAAA,KACT;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,cAAgB,EAAA;AAAA,IACd,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACR;AAAA,EACA,UAAY,EAAA;AAAA,IACV,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AACF;;;;"}
|
1
|
+
{"version":3,"file":"props.mjs","sources":["../../../src/style-input/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\nimport { defaultConfig, type StyleInputConfig } from './default'\n\nexport const styleInputProps = {\n /**\n * 引入组件\n */\n components: {\n default: () => {\n return defaultConfig\n },\n type: Array as () => StyleInputConfig,\n },\n /**\n * 需要隐藏组件\n */\n hideComponents: {\n default: () => {\n return []\n },\n type: Array as () => string[],\n },\n modelValue: {\n default: () => {\n return {}\n },\n type: Object,\n },\n isDrawer: {\n default: false,\n type: Boolean,\n },\n drawerProps: {\n default: () => {\n return {\n title: '编辑样式',\n direction: 'rtl',\n size: '400px',\n }\n },\n type: Object,\n },\n drawerText: {\n default: '编辑样式',\n type: String,\n },\n}\n\nexport type StyleInputProps = ExtractPropTypes<typeof styleInputProps>\n"],"names":[],"mappings":";;AAGO,MAAM,eAAkB,GAAA;AAAA;AAAA;AAAA;AAAA,EAI7B,UAAY,EAAA;AAAA,IACV,SAAS,MAAM;AACb,MAAO,OAAA,aAAA,CAAA;AAAA,KACT;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,cAAgB,EAAA;AAAA,IACd,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,KAAA;AAAA,GACR;AAAA,EACA,UAAY,EAAA;AAAA,IACV,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,QAAU,EAAA;AAAA,IACR,OAAS,EAAA,KAAA;AAAA,IACT,IAAM,EAAA,OAAA;AAAA,GACR;AAAA,EACA,WAAa,EAAA;AAAA,IACX,SAAS,MAAM;AACb,MAAO,OAAA;AAAA,QACL,KAAO,EAAA,0BAAA;AAAA,QACP,SAAW,EAAA,KAAA;AAAA,QACX,IAAM,EAAA,OAAA;AAAA,OACR,CAAA;AAAA,KACF;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AAAA,EACA,UAAY,EAAA;AAAA,IACV,OAAS,EAAA,0BAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,GACR;AACF;;;;"}
|
@@ -11,6 +11,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
11
11
|
default: () => {};
|
12
12
|
type: ObjectConstructor;
|
13
13
|
};
|
14
|
+
isDrawer: {
|
15
|
+
default: boolean;
|
16
|
+
type: BooleanConstructor;
|
17
|
+
};
|
18
|
+
drawerProps: {
|
19
|
+
default: () => {
|
20
|
+
title: string;
|
21
|
+
direction: string;
|
22
|
+
size: string;
|
23
|
+
};
|
24
|
+
type: ObjectConstructor;
|
25
|
+
};
|
26
|
+
drawerText: {
|
27
|
+
default: string;
|
28
|
+
type: StringConstructor;
|
29
|
+
};
|
14
30
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
15
31
|
components: {
|
16
32
|
default: () => import("./default").StyleInputConfig;
|
@@ -24,11 +40,30 @@ declare const _default: import("vue").DefineComponent<{
|
|
24
40
|
default: () => {};
|
25
41
|
type: ObjectConstructor;
|
26
42
|
};
|
43
|
+
isDrawer: {
|
44
|
+
default: boolean;
|
45
|
+
type: BooleanConstructor;
|
46
|
+
};
|
47
|
+
drawerProps: {
|
48
|
+
default: () => {
|
49
|
+
title: string;
|
50
|
+
direction: string;
|
51
|
+
size: string;
|
52
|
+
};
|
53
|
+
type: ObjectConstructor;
|
54
|
+
};
|
55
|
+
drawerText: {
|
56
|
+
default: string;
|
57
|
+
type: StringConstructor;
|
58
|
+
};
|
27
59
|
}>> & {
|
28
60
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
29
61
|
}, {
|
30
62
|
modelValue: Record<string, any>;
|
31
63
|
components: import("./default").StyleInputConfig;
|
32
64
|
hideComponents: string[];
|
65
|
+
isDrawer: boolean;
|
66
|
+
drawerProps: Record<string, any>;
|
67
|
+
drawerText: string;
|
33
68
|
}, {}>;
|
34
69
|
export default _default;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, ref, watch, onMounted, resolveComponent, openBlock, createElementBlock,
|
1
|
+
import { defineComponent, ref, watch, onMounted, resolveComponent, openBlock, createElementBlock, createBlock, withCtx, Fragment, renderList, createTextVNode, toDisplayString, resolveDynamicComponent, mergeProps, createCommentVNode, createVNode } from 'vue';
|
2
2
|
import { styleInputProps } from './props.mjs';
|
3
3
|
|
4
4
|
const _hoisted_1 = { class: "dk-style-input" };
|
@@ -6,6 +6,7 @@ const _hoisted_2 = {
|
|
6
6
|
key: 0,
|
7
7
|
class: "p-5px"
|
8
8
|
};
|
9
|
+
const _hoisted_3 = { key: 1 };
|
9
10
|
const __default__ = defineComponent({
|
10
11
|
name: "DkStyleInput"
|
11
12
|
});
|
@@ -15,6 +16,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
16
|
emits: ["update:modelValue"],
|
16
17
|
setup(__props, { emit }) {
|
17
18
|
const props = __props;
|
19
|
+
const drawer = ref(false);
|
18
20
|
const activeNames = ref([0]);
|
19
21
|
const values = ref({});
|
20
22
|
const loading = ref(true);
|
@@ -63,9 +65,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
63
65
|
return (_ctx, _cache) => {
|
64
66
|
const _component_el_collapse_item = resolveComponent("el-collapse-item");
|
65
67
|
const _component_el_collapse = resolveComponent("el-collapse");
|
68
|
+
const _component_el_button = resolveComponent("el-button");
|
69
|
+
const _component_el_drawer = resolveComponent("el-drawer");
|
66
70
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
67
71
|
!loading.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
68
|
-
|
72
|
+
!props.isDrawer ? (openBlock(), createBlock(_component_el_collapse, {
|
73
|
+
key: 0,
|
69
74
|
modelValue: activeNames.value,
|
70
75
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeNames.value = $event)
|
71
76
|
}, {
|
@@ -103,7 +108,72 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
103
108
|
]),
|
104
109
|
_: 1
|
105
110
|
/* STABLE */
|
106
|
-
}, 8, ["modelValue"])
|
111
|
+
}, 8, ["modelValue"])) : (openBlock(), createElementBlock("div", _hoisted_3, [
|
112
|
+
createVNode(_component_el_button, {
|
113
|
+
type: "primary",
|
114
|
+
plain: "",
|
115
|
+
style: { "width": "100%" },
|
116
|
+
onClick: _cache[1] || (_cache[1] = ($event) => drawer.value = true)
|
117
|
+
}, {
|
118
|
+
default: withCtx(() => [
|
119
|
+
createTextVNode(
|
120
|
+
toDisplayString(props.drawerText),
|
121
|
+
1
|
122
|
+
/* TEXT */
|
123
|
+
)
|
124
|
+
]),
|
125
|
+
_: 1
|
126
|
+
/* STABLE */
|
127
|
+
}),
|
128
|
+
createVNode(_component_el_drawer, mergeProps({
|
129
|
+
modelValue: drawer.value,
|
130
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => drawer.value = $event)
|
131
|
+
}, props.drawerProps), {
|
132
|
+
default: withCtx(() => [
|
133
|
+
createVNode(_component_el_collapse, {
|
134
|
+
modelValue: activeNames.value,
|
135
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => activeNames.value = $event)
|
136
|
+
}, {
|
137
|
+
default: withCtx(() => [
|
138
|
+
(openBlock(true), createElementBlock(
|
139
|
+
Fragment,
|
140
|
+
null,
|
141
|
+
renderList(_components.value, (item, key) => {
|
142
|
+
return openBlock(), createBlock(_component_el_collapse_item, {
|
143
|
+
key,
|
144
|
+
title: "",
|
145
|
+
name: key
|
146
|
+
}, {
|
147
|
+
title: withCtx(() => [
|
148
|
+
createTextVNode(
|
149
|
+
toDisplayString(item.title),
|
150
|
+
1
|
151
|
+
/* TEXT */
|
152
|
+
)
|
153
|
+
]),
|
154
|
+
default: withCtx(() => [
|
155
|
+
activeNames.value.includes(key) ? (openBlock(), createBlock(resolveDynamicComponent(item.name), mergeProps({
|
156
|
+
key: 0,
|
157
|
+
modelValue: values.value[item.name],
|
158
|
+
"onUpdate:modelValue": ($event) => values.value[item.name] = $event
|
159
|
+
}, item.props, { onChange }), null, 16, ["modelValue", "onUpdate:modelValue"])) : createCommentVNode("v-if", true)
|
160
|
+
]),
|
161
|
+
_: 2
|
162
|
+
/* DYNAMIC */
|
163
|
+
}, 1032, ["name"]);
|
164
|
+
}),
|
165
|
+
128
|
166
|
+
/* KEYED_FRAGMENT */
|
167
|
+
))
|
168
|
+
]),
|
169
|
+
_: 1
|
170
|
+
/* STABLE */
|
171
|
+
}, 8, ["modelValue"])
|
172
|
+
]),
|
173
|
+
_: 1
|
174
|
+
/* STABLE */
|
175
|
+
}, 16, ["modelValue"])
|
176
|
+
]))
|
107
177
|
])) : createCommentVNode("v-if", true)
|
108
178
|
]);
|
109
179
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"style-input.vue2.mjs","sources":["../../../src/style-input/src/style-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleInput',\n});\n</script>\n<template>\n <div class=\"dk-style-input\">\n <div v-if=\"!loading\" class=\"p-5px\">\n <el-collapse v-model=\"activeNames\">\n <el-collapse-item v-for=\"(item, key) in _components\" :key=\"key\" title=\"\" :name=\"key\">\n <template #title>\n {{ item.title }}\n </template>\n <component\n :is=\"item.name\"\n v-if=\"activeNames.includes(key)\"\n v-model=\"values[item.name]\"\n v-bind=\"item.props\"\n @change=\"onChange\"\n />\n </el-collapse-item>\n </el-collapse>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleInputProps } from './props'\nimport { onMounted, ref, watch } from 'vue'\n\n\nconst props = defineProps(styleInputProps)\nconst activeNames = ref([0])\nconst values: any = ref({})\nconst loading = ref(true)\n\nconst emit = defineEmits(['update:modelValue'])\nconst onChange = () => {\n const obj: any = {}\n Object.keys(values.value).forEach((key) => {\n Object.keys(values.value[key]).forEach((k) => {\n obj[k] = values.value[key][k]\n })\n })\n emit('update:modelValue', obj)\n}\n\nconst _components: any = ref([])\nconst init = () => {\n _components.value = props.components.filter((item: any) => {\n console.log('item.name', item.name)\n return !props.hideComponents.includes(item.name)\n })\n const obj: any = {}\n _components.value.forEach((item: any) => {\n const params = item.params\n const paramsObj: any = {}\n Object.keys(params).forEach((key) => {\n const param = params[key]\n if (props.modelValue[param]) {\n paramsObj[param] = props.modelValue[param]\n }\n })\n obj[item.name] = paramsObj\n })\n values.value = obj\n loading.value = false\n}\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n },\n {\n deep: true,\n }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":"
|
1
|
+
{"version":3,"file":"style-input.vue2.mjs","sources":["../../../src/style-input/src/style-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkStyleInput',\n});\n</script>\n<template>\n <div class=\"dk-style-input\">\n <div v-if=\"!loading\" class=\"p-5px\">\n <el-collapse v-if=\"!props.isDrawer\" v-model=\"activeNames\">\n <el-collapse-item v-for=\"(item, key) in _components\" :key=\"key\" title=\"\" :name=\"key\">\n <template #title>\n {{ item.title }}\n </template>\n <component\n :is=\"item.name\"\n v-if=\"activeNames.includes(key)\"\n v-model=\"values[item.name]\"\n v-bind=\"item.props\"\n @change=\"onChange\"\n />\n </el-collapse-item>\n </el-collapse>\n <div v-else>\n <el-button type=\"primary\" plain style=\"width: 100%\" @click=\"drawer = true\">{{ props.drawerText }}</el-button>\n <el-drawer v-model=\"drawer\" v-bind=\"props.drawerProps\">\n <el-collapse v-model=\"activeNames\">\n <el-collapse-item v-for=\"(item, key) in _components\" :key=\"key\" title=\"\" :name=\"key\">\n <template #title>\n {{ item.title }}\n </template>\n <component\n :is=\"item.name\"\n v-if=\"activeNames.includes(key)\"\n v-model=\"values[item.name]\"\n v-bind=\"item.props\"\n @change=\"onChange\"\n />\n </el-collapse-item>\n </el-collapse>\n </el-drawer>\n </div>\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { styleInputProps } from './props'\nimport { onMounted, ref, watch } from 'vue'\n\n\nconst props = defineProps(styleInputProps)\nconst drawer = ref(false)\nconst activeNames = ref([0])\nconst values: any = ref({})\nconst loading = ref(true)\n\nconst emit = defineEmits(['update:modelValue'])\nconst onChange = () => {\n const obj: any = {}\n Object.keys(values.value).forEach((key) => {\n Object.keys(values.value[key]).forEach((k) => {\n obj[k] = values.value[key][k]\n })\n })\n emit('update:modelValue', obj)\n}\n\nconst _components: any = ref([])\nconst init = () => {\n _components.value = props.components.filter((item: any) => {\n console.log('item.name', item.name)\n return !props.hideComponents.includes(item.name)\n })\n const obj: any = {}\n _components.value.forEach((item: any) => {\n const params = item.params\n const paramsObj: any = {}\n Object.keys(params).forEach((key) => {\n const param = params[key]\n if (props.modelValue[param]) {\n paramsObj[param] = props.modelValue[param]\n }\n })\n obj[item.name] = paramsObj\n })\n values.value = obj\n loading.value = false\n}\n\nwatch(\n () => props.modelValue,\n () => {\n init()\n },\n {\n deep: true,\n }\n)\n\nonMounted(() => {\n init()\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,cAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAgDD,IAAM,MAAA,MAAA,GAAS,IAAI,KAAK,CAAA,CAAA;AACxB,IAAA,MAAM,WAAc,GAAA,GAAA,CAAI,CAAC,CAAC,CAAC,CAAA,CAAA;AAC3B,IAAM,MAAA,MAAA,GAAc,GAAI,CAAA,EAAE,CAAA,CAAA;AAC1B,IAAM,MAAA,OAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AAGxB,IAAA,MAAM,WAAW,MAAM;AACrB,MAAA,MAAM,MAAW,EAAC,CAAA;AAClB,MAAA,MAAA,CAAO,KAAK,MAAO,CAAA,KAAK,CAAE,CAAA,OAAA,CAAQ,CAAC,GAAQ,KAAA;AACzC,QAAO,MAAA,CAAA,IAAA,CAAK,OAAO,KAAM,CAAA,GAAG,CAAC,CAAE,CAAA,OAAA,CAAQ,CAAC,CAAM,KAAA;AAC5C,UAAA,GAAA,CAAI,CAAC,CAAI,GAAA,MAAA,CAAO,KAAM,CAAA,GAAG,EAAE,CAAC,CAAA,CAAA;AAAA,SAC7B,CAAA,CAAA;AAAA,OACF,CAAA,CAAA;AACD,MAAA,IAAA,CAAK,qBAAqB,GAAG,CAAA,CAAA;AAAA,KAC/B,CAAA;AAEA,IAAM,MAAA,WAAA,GAAmB,GAAI,CAAA,EAAE,CAAA,CAAA;AAC/B,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,WAAA,CAAY,KAAQ,GAAA,KAAA,CAAM,UAAW,CAAA,MAAA,CAAO,CAAC,IAAc,KAAA;AACzD,QAAQ,OAAA,CAAA,GAAA,CAAI,WAAa,EAAA,IAAA,CAAK,IAAI,CAAA,CAAA;AAClC,QAAA,OAAO,CAAC,KAAA,CAAM,cAAe,CAAA,QAAA,CAAS,KAAK,IAAI,CAAA,CAAA;AAAA,OAChD,CAAA,CAAA;AACD,MAAA,MAAM,MAAW,EAAC,CAAA;AAClB,MAAY,WAAA,CAAA,KAAA,CAAM,OAAQ,CAAA,CAAC,IAAc,KAAA;AACvC,QAAA,MAAM,SAAS,IAAK,CAAA,MAAA,CAAA;AACpB,QAAA,MAAM,YAAiB,EAAC,CAAA;AACxB,QAAA,MAAA,CAAO,IAAK,CAAA,MAAM,CAAE,CAAA,OAAA,CAAQ,CAAC,GAAQ,KAAA;AACnC,UAAM,MAAA,KAAA,GAAQ,OAAO,GAAG,CAAA,CAAA;AACxB,UAAI,IAAA,KAAA,CAAM,UAAW,CAAA,KAAK,CAAG,EAAA;AAC3B,YAAA,SAAA,CAAU,KAAK,CAAA,GAAI,KAAM,CAAA,UAAA,CAAW,KAAK,CAAA,CAAA;AAAA,WAC3C;AAAA,SACD,CAAA,CAAA;AACD,QAAI,GAAA,CAAA,IAAA,CAAK,IAAI,CAAI,GAAA,SAAA,CAAA;AAAA,OAClB,CAAA,CAAA;AACD,MAAA,MAAA,CAAO,KAAQ,GAAA,GAAA,CAAA;AACf,MAAA,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAAA,KAClB,CAAA;AAEA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,UAAA;AAAA,MACZ,MAAM;AACJ,QAAK,IAAA,EAAA,CAAA;AAAA,OACP;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;AAEA,IAAA,SAAA,CAAU,MAAM;AACd,MAAK,IAAA,EAAA,CAAA;AAAA,KACN,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -11,6 +11,22 @@ export declare const StyleInput: import("@vipl520/utils").WithInstall<import("vu
|
|
11
11
|
default: () => {};
|
12
12
|
type: ObjectConstructor;
|
13
13
|
};
|
14
|
+
isDrawer: {
|
15
|
+
default: boolean;
|
16
|
+
type: BooleanConstructor;
|
17
|
+
};
|
18
|
+
drawerProps: {
|
19
|
+
default: () => {
|
20
|
+
title: string;
|
21
|
+
direction: string;
|
22
|
+
size: string;
|
23
|
+
};
|
24
|
+
type: ObjectConstructor;
|
25
|
+
};
|
26
|
+
drawerText: {
|
27
|
+
default: string;
|
28
|
+
type: StringConstructor;
|
29
|
+
};
|
14
30
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
15
31
|
components: {
|
16
32
|
default: () => import("./src/default").StyleInputConfig;
|
@@ -24,12 +40,31 @@ export declare const StyleInput: import("@vipl520/utils").WithInstall<import("vu
|
|
24
40
|
default: () => {};
|
25
41
|
type: ObjectConstructor;
|
26
42
|
};
|
43
|
+
isDrawer: {
|
44
|
+
default: boolean;
|
45
|
+
type: BooleanConstructor;
|
46
|
+
};
|
47
|
+
drawerProps: {
|
48
|
+
default: () => {
|
49
|
+
title: string;
|
50
|
+
direction: string;
|
51
|
+
size: string;
|
52
|
+
};
|
53
|
+
type: ObjectConstructor;
|
54
|
+
};
|
55
|
+
drawerText: {
|
56
|
+
default: string;
|
57
|
+
type: StringConstructor;
|
58
|
+
};
|
27
59
|
}>> & {
|
28
60
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
29
61
|
}, {
|
30
62
|
modelValue: Record<string, any>;
|
31
63
|
components: import("./src/default").StyleInputConfig;
|
32
64
|
hideComponents: string[];
|
65
|
+
isDrawer: boolean;
|
66
|
+
drawerProps: Record<string, any>;
|
67
|
+
drawerText: string;
|
33
68
|
}, {}>>;
|
34
69
|
export default StyleInput;
|
35
70
|
export * from './src/props';
|
@@ -19,5 +19,21 @@ export declare const styleInputProps: {
|
|
19
19
|
default: () => {};
|
20
20
|
type: ObjectConstructor;
|
21
21
|
};
|
22
|
+
isDrawer: {
|
23
|
+
default: boolean;
|
24
|
+
type: BooleanConstructor;
|
25
|
+
};
|
26
|
+
drawerProps: {
|
27
|
+
default: () => {
|
28
|
+
title: string;
|
29
|
+
direction: string;
|
30
|
+
size: string;
|
31
|
+
};
|
32
|
+
type: ObjectConstructor;
|
33
|
+
};
|
34
|
+
drawerText: {
|
35
|
+
default: string;
|
36
|
+
type: StringConstructor;
|
37
|
+
};
|
22
38
|
};
|
23
39
|
export type StyleInputProps = ExtractPropTypes<typeof styleInputProps>;
|
@@ -26,6 +26,24 @@ const styleInputProps = {
|
|
26
26
|
return {};
|
27
27
|
},
|
28
28
|
type: Object
|
29
|
+
},
|
30
|
+
isDrawer: {
|
31
|
+
default: false,
|
32
|
+
type: Boolean
|
33
|
+
},
|
34
|
+
drawerProps: {
|
35
|
+
default: () => {
|
36
|
+
return {
|
37
|
+
title: "\u7F16\u8F91\u6837\u5F0F",
|
38
|
+
direction: "rtl",
|
39
|
+
size: "400px"
|
40
|
+
};
|
41
|
+
},
|
42
|
+
type: Object
|
43
|
+
},
|
44
|
+
drawerText: {
|
45
|
+
default: "\u7F16\u8F91\u6837\u5F0F",
|
46
|
+
type: String
|
29
47
|
}
|
30
48
|
};
|
31
49
|
|