@vipl520/dk-ui 1.0.45 → 1.0.47
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/attributes.json +16 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1368 -525
- 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 +1365 -526
- package/dist/tags.json +14 -0
- package/dist/web-types.json +69 -1
- package/es/dialog/src/dialog.vue2.mjs +1 -1
- package/es/dialog/src/dialog.vue2.mjs.map +1 -1
- package/es/form/index.d.ts +3 -15
- package/es/form/src/form.vue.d.ts +2 -10
- package/es/form/src/form.vue2.mjs +1 -0
- package/es/form/src/form.vue2.mjs.map +1 -1
- package/es/form/src/props.d.ts +1 -5
- package/es/form/src/props.mjs +1 -5
- package/es/form/src/props.mjs.map +1 -1
- package/es/index.d.ts +2 -0
- package/es/index.mjs +8 -2
- package/es/index.mjs.map +1 -1
- package/es/index.scss +2 -0
- package/es/page-diy/src/config/rule/min/common/DkMinTitle.d.ts +1 -0
- package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs +2 -1
- package/es/page-diy/src/config/rule/min/common/DkMinTitle.mjs.map +1 -1
- package/es/page-diy/src/config/rule/min/common/index.d.ts +2 -0
- package/es/page-diy/src/config/rule/min/index.d.ts +2 -0
- package/es/style-input/src/style-input.vue2.mjs +10 -1
- package/es/style-input/src/style-input.vue2.mjs.map +1 -1
- package/es/table/src/components/FieldRender.vue2.mjs +1 -1
- package/es/table/src/components/FieldRender.vue2.mjs.map +1 -1
- package/es/uni-icon/index.d.ts +174 -0
- package/es/uni-icon/index.mjs +8 -0
- package/es/uni-icon/index.mjs.map +1 -0
- package/es/uni-icon/src/props.d.ts +24 -0
- package/es/uni-icon/src/props.mjs +25 -0
- package/es/uni-icon/src/props.mjs.map +1 -0
- package/es/uni-icon/src/uni-icon.vue.d.ts +57 -0
- package/es/uni-icon/src/uni-icon.vue.mjs +7 -0
- package/es/uni-icon/src/uni-icon.vue.mjs.map +1 -0
- package/es/uni-icon/src/uni-icon.vue2.mjs +43 -0
- package/es/uni-icon/src/uni-icon.vue2.mjs.map +1 -0
- package/es/uni-icon/style/index.css +1 -0
- package/es/uni-icon/style/index.scss +18 -0
- package/es/uni-icon/style/uniicons.css +1 -0
- package/es/uni-icon/style/uniicons.scss +663 -0
- package/es/uni-icon/style/uniicons_file_vue.d.ts +4 -0
- package/es/uni-icon/style/uniicons_file_vue.mjs +649 -0
- package/es/uni-icon/style/uniicons_file_vue.mjs.map +1 -0
- package/es/uni-icon-input/index.d.ts +17 -0
- package/es/uni-icon-input/index.mjs +8 -0
- package/es/uni-icon-input/index.mjs.map +1 -0
- package/es/uni-icon-input/src/props.d.ts +11 -0
- package/es/uni-icon-input/src/props.mjs +11 -0
- package/es/uni-icon-input/src/props.mjs.map +1 -0
- package/es/uni-icon-input/src/uni-icon-input.vue.d.ts +16 -0
- package/es/uni-icon-input/src/uni-icon-input.vue.mjs +7 -0
- package/es/uni-icon-input/src/uni-icon-input.vue.mjs.map +1 -0
- package/es/uni-icon-input/src/uni-icon-input.vue2.mjs +112 -0
- package/es/uni-icon-input/src/uni-icon-input.vue2.mjs.map +1 -0
- package/es/uni-icon-input/style/index.css +1 -0
- package/es/uni-icon-input/style/index.scss +13 -0
- package/lib/dialog/src/dialog.vue2.js +1 -1
- package/lib/dialog/src/dialog.vue2.js.map +1 -1
- package/lib/form/index.d.ts +3 -15
- package/lib/form/src/form.vue.d.ts +2 -10
- package/lib/form/src/form.vue2.js +1 -0
- package/lib/form/src/form.vue2.js.map +1 -1
- package/lib/form/src/props.d.ts +1 -5
- package/lib/form/src/props.js +1 -5
- package/lib/form/src/props.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.js +13 -3
- package/lib/index.js.map +1 -1
- package/lib/index.scss +2 -0
- package/lib/page-diy/src/config/rule/min/common/DkMinTitle.d.ts +1 -0
- package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js +2 -1
- package/lib/page-diy/src/config/rule/min/common/DkMinTitle.js.map +1 -1
- package/lib/page-diy/src/config/rule/min/common/index.d.ts +2 -0
- package/lib/page-diy/src/config/rule/min/index.d.ts +2 -0
- package/lib/style-input/src/style-input.vue2.js +9 -0
- package/lib/style-input/src/style-input.vue2.js.map +1 -1
- package/lib/table/src/components/FieldRender.vue2.js +1 -1
- package/lib/table/src/components/FieldRender.vue2.js.map +1 -1
- package/lib/uni-icon/index.d.ts +174 -0
- package/lib/uni-icon/index.js +14 -0
- package/lib/uni-icon/index.js.map +1 -0
- package/lib/uni-icon/src/props.d.ts +24 -0
- package/lib/uni-icon/src/props.js +27 -0
- package/lib/uni-icon/src/props.js.map +1 -0
- package/lib/uni-icon/src/uni-icon.vue.d.ts +57 -0
- package/lib/uni-icon/src/uni-icon.vue.js +11 -0
- package/lib/uni-icon/src/uni-icon.vue.js.map +1 -0
- package/lib/uni-icon/src/uni-icon.vue2.js +47 -0
- package/lib/uni-icon/src/uni-icon.vue2.js.map +1 -0
- package/lib/uni-icon/style/index.css +1 -0
- package/lib/uni-icon/style/index.scss +18 -0
- package/lib/uni-icon/style/uniicons.css +1 -0
- package/lib/uni-icon/style/uniicons.scss +663 -0
- package/lib/uni-icon/style/uniicons_file_vue.d.ts +4 -0
- package/lib/uni-icon/style/uniicons_file_vue.js +651 -0
- package/lib/uni-icon/style/uniicons_file_vue.js.map +1 -0
- package/lib/uni-icon-input/index.d.ts +17 -0
- package/lib/uni-icon-input/index.js +14 -0
- package/lib/uni-icon-input/index.js.map +1 -0
- package/lib/uni-icon-input/src/props.d.ts +11 -0
- package/lib/uni-icon-input/src/props.js +13 -0
- package/lib/uni-icon-input/src/props.js.map +1 -0
- package/lib/uni-icon-input/src/uni-icon-input.vue.d.ts +16 -0
- package/lib/uni-icon-input/src/uni-icon-input.vue.js +11 -0
- package/lib/uni-icon-input/src/uni-icon-input.vue.js.map +1 -0
- package/lib/uni-icon-input/src/uni-icon-input.vue2.js +116 -0
- package/lib/uni-icon-input/src/uni-icon-input.vue2.js.map +1 -0
- package/lib/uni-icon-input/style/index.css +1 -0
- package/lib/uni-icon-input/style/index.scss +13 -0
- package/package.json +2 -1
@@ -0,0 +1,8 @@
|
|
1
|
+
import { withInstall } from '@vipl520/utils';
|
2
|
+
import _UniIconInput from './src/uni-icon-input.vue.mjs';
|
3
|
+
export { uniIconInputProps } from './src/props.mjs';
|
4
|
+
|
5
|
+
const UniIconInput = withInstall(_UniIconInput);
|
6
|
+
|
7
|
+
export { UniIconInput, UniIconInput as default };
|
8
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/uni-icon-input/index.ts"],"sourcesContent":["import { withInstall } from '@vipl520/utils'\nimport _UniIconInput from './src/uni-icon-input.vue'\n\nexport const UniIconInput = withInstall(_UniIconInput)\nexport default UniIconInput\n\nexport * from './src/props'\n"],"names":[],"mappings":";;;;AAGa,MAAA,YAAA,GAAe,YAAY,aAAa;;;;"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { ExtractPropTypes } from 'vue';
|
2
|
+
export declare const uniIconInputProps: {
|
3
|
+
/**
|
4
|
+
* 类型定义
|
5
|
+
*/
|
6
|
+
type: {
|
7
|
+
type: import("vue").PropType<string>;
|
8
|
+
default: string;
|
9
|
+
};
|
10
|
+
};
|
11
|
+
export type UniIconInputProps = ExtractPropTypes<typeof uniIconInputProps>;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"props.mjs","sources":["../../../src/uni-icon-input/src/props.ts"],"sourcesContent":["import { makeStringProp } from 'vant/es/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport const uniIconInputProps = {\n /**\n * 类型定义\n */\n type: makeStringProp(''),\n}\n\nexport type UniIconInputProps = ExtractPropTypes<typeof uniIconInputProps>\n"],"names":[],"mappings":";;AAGO,MAAM,iBAAoB,GAAA;AAAA;AAAA;AAAA;AAAA,EAI/B,IAAA,EAAM,eAAe,EAAE,CAAA;AACzB;;;;"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
2
|
+
modelValue: {
|
3
|
+
default: string;
|
4
|
+
type: StringConstructor;
|
5
|
+
};
|
6
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
7
|
+
modelValue: {
|
8
|
+
default: string;
|
9
|
+
type: StringConstructor;
|
10
|
+
};
|
11
|
+
}>> & {
|
12
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
13
|
+
}, {
|
14
|
+
modelValue: string;
|
15
|
+
}, {}>;
|
16
|
+
export default _default;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import _sfc_main from './uni-icon-input.vue2.mjs';
|
2
|
+
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
|
3
|
+
|
4
|
+
var _UniIconInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\uni-icon-input\\src\\uni-icon-input.vue"]]);
|
5
|
+
|
6
|
+
export { _UniIconInput as default };
|
7
|
+
//# sourceMappingURL=uni-icon-input.vue.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"uni-icon-input.vue.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
@@ -0,0 +1,112 @@
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createTextVNode, createCommentVNode, Fragment, renderList, unref, createBlock, createElementVNode } from 'vue';
|
2
|
+
import { fontData } from '../../uni-icon/style/uniicons_file_vue.mjs';
|
3
|
+
|
4
|
+
const _hoisted_1 = { class: "dk-uni-icon-input" };
|
5
|
+
const _hoisted_2 = {
|
6
|
+
key: 0,
|
7
|
+
class: "uni-icon-content"
|
8
|
+
};
|
9
|
+
const _hoisted_3 = { class: "hover:border-blue border-1px border-solid border-white cursor-pointer hover:color-blue" };
|
10
|
+
const __default__ = defineComponent({
|
11
|
+
name: "DkUniIconInput"
|
12
|
+
});
|
13
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
14
|
+
...__default__,
|
15
|
+
props: {
|
16
|
+
modelValue: {
|
17
|
+
default: "",
|
18
|
+
type: String
|
19
|
+
}
|
20
|
+
},
|
21
|
+
emits: ["update:modelValue"],
|
22
|
+
setup(__props, { emit }) {
|
23
|
+
const props = __props;
|
24
|
+
const show = ref(false);
|
25
|
+
const icon = ref(props.modelValue);
|
26
|
+
const updateIcon = (value) => {
|
27
|
+
icon.value = value;
|
28
|
+
emit("update:modelValue", value);
|
29
|
+
show.value = false;
|
30
|
+
};
|
31
|
+
return (_ctx, _cache) => {
|
32
|
+
const _component_el_button = resolveComponent("el-button");
|
33
|
+
const _component_el_input = resolveComponent("el-input");
|
34
|
+
const _component_DkUniIcon = resolveComponent("DkUniIcon");
|
35
|
+
const _component_el_col = resolveComponent("el-col");
|
36
|
+
const _component_el_row = resolveComponent("el-row");
|
37
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
38
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
39
|
+
createVNode(_component_el_input, {
|
40
|
+
modelValue: icon.value,
|
41
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => icon.value = $event)
|
42
|
+
}, {
|
43
|
+
append: withCtx(() => [
|
44
|
+
createVNode(_component_el_button, {
|
45
|
+
onClick: _cache[0] || (_cache[0] = ($event) => show.value = true)
|
46
|
+
}, {
|
47
|
+
default: withCtx(() => [
|
48
|
+
createTextVNode("\u9009\u62E9")
|
49
|
+
]),
|
50
|
+
_: 1
|
51
|
+
/* STABLE */
|
52
|
+
})
|
53
|
+
]),
|
54
|
+
_: 1
|
55
|
+
/* STABLE */
|
56
|
+
}, 8, ["modelValue"]),
|
57
|
+
icon.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
58
|
+
createVNode(_component_DkUniIcon, {
|
59
|
+
type: icon.value,
|
60
|
+
size: 48
|
61
|
+
}, null, 8, ["type"])
|
62
|
+
])) : createCommentVNode("v-if", true),
|
63
|
+
createVNode(_component_el_dialog, {
|
64
|
+
modelValue: show.value,
|
65
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => show.value = $event),
|
66
|
+
title: "\u9009\u62E9\u56FE\u6807",
|
67
|
+
width: "1000px"
|
68
|
+
}, {
|
69
|
+
default: withCtx(() => [
|
70
|
+
createVNode(_component_el_row, { gutter: 20 }, {
|
71
|
+
default: withCtx(() => [
|
72
|
+
(openBlock(true), createElementBlock(
|
73
|
+
Fragment,
|
74
|
+
null,
|
75
|
+
renderList(unref(fontData).length, (key) => {
|
76
|
+
return openBlock(), createBlock(_component_el_col, {
|
77
|
+
key,
|
78
|
+
span: 2,
|
79
|
+
onClick: ($event) => updateIcon(unref(fontData)[key]?.font_class)
|
80
|
+
}, {
|
81
|
+
default: withCtx(() => [
|
82
|
+
createElementVNode("div", _hoisted_3, [
|
83
|
+
createVNode(_component_DkUniIcon, {
|
84
|
+
type: unref(fontData)[key]?.font_class,
|
85
|
+
size: 36,
|
86
|
+
color: "#666",
|
87
|
+
class: "p2"
|
88
|
+
}, null, 8, ["type"])
|
89
|
+
])
|
90
|
+
]),
|
91
|
+
_: 2
|
92
|
+
/* DYNAMIC */
|
93
|
+
}, 1032, ["onClick"]);
|
94
|
+
}),
|
95
|
+
128
|
96
|
+
/* KEYED_FRAGMENT */
|
97
|
+
))
|
98
|
+
]),
|
99
|
+
_: 1
|
100
|
+
/* STABLE */
|
101
|
+
})
|
102
|
+
]),
|
103
|
+
_: 1
|
104
|
+
/* STABLE */
|
105
|
+
}, 8, ["modelValue"])
|
106
|
+
]);
|
107
|
+
};
|
108
|
+
}
|
109
|
+
});
|
110
|
+
|
111
|
+
export { _sfc_main as default };
|
112
|
+
//# sourceMappingURL=uni-icon-input.vue2.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"uni-icon-input.vue2.mjs","sources":["../../../src/uni-icon-input/src/uni-icon-input.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkUniIconInput',\n});\n</script>\n<template>\n <div class=\"dk-uni-icon-input\">\n <el-input v-model=\"icon\">\n <template #append>\n <el-button @click=\"show = true\">选择</el-button>\n </template>\n </el-input>\n <div v-if=\"icon\" class=\"uni-icon-content\">\n <DkUniIcon :type=\"icon\" :size=\"48\"></DkUniIcon>\n </div>\n <el-dialog v-model=\"show\" title=\"选择图标\" width=\"1000px\">\n <el-row :gutter=\"20\">\n <el-col v-for=\"key in fontData.length\" :key=\"key\" :span=\"2\" @click=\"updateIcon(fontData[key]?.font_class)\">\n <div class=\"hover:border-blue border-1px border-solid border-white cursor-pointer hover:color-blue\">\n <DkUniIcon :type=\"fontData[key]?.font_class\" :size=\"36\" color=\"#666\" class=\"p2\"></DkUniIcon>\n </div>\n </el-col>\n </el-row>\n </el-dialog>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { fontData } from '../../uni-icon/style/uniicons_file_vue.js'\n\n\nconst show = ref(false)\nconst props = defineProps({\n modelValue: {\n default: '',\n type: String,\n },\n})\n\nconst emit = defineEmits(['update:modelValue'])\nconst icon = ref(props.modelValue)\n\nconst updateIcon = (value: string) => {\n icon.value = value\n emit('update:modelValue', value)\n show.value = false\n}\n</script>\n\n<style></style>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,gBAAA;AACR,CAAC,CAAA,CAAA;;;;;;;;;;;;AA6BD,IAAM,MAAA,IAAA,GAAO,IAAI,KAAK,CAAA,CAAA;AAStB,IAAM,MAAA,IAAA,GAAO,GAAI,CAAA,KAAA,CAAM,UAAU,CAAA,CAAA;AAEjC,IAAM,MAAA,UAAA,GAAa,CAAC,KAAkB,KAAA;AACpC,MAAA,IAAA,CAAK,KAAQ,GAAA,KAAA,CAAA;AACb,MAAA,IAAA,CAAK,qBAAqB,KAAK,CAAA,CAAA;AAC/B,MAAA,IAAA,CAAK,KAAQ,GAAA,KAAA,CAAA;AAAA,KACf,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.dk-uni-icon-input .uni-icon-content{margin-top:5px;border:1px solid #ccc;width:80px;height:80px;display:flex;align-items:center;justify-content:center}
|
@@ -69,7 +69,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
69
69
|
"destroy-on-close": "",
|
70
70
|
"append-to-body": "",
|
71
71
|
"lock-scroll": "",
|
72
|
-
draggable:
|
72
|
+
draggable: props.draggable,
|
73
73
|
"close-on-click-modal": false,
|
74
74
|
"show-close": false,
|
75
75
|
class: "dk-dialog",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dialog.vue2.js","sources":["../../../src/dialog/src/dialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkDialog',\n});\n</script>\n<template>\n <ElDialog\n v-bind=\"getBindValue\"\n :fullscreen=\"isFullscreen\"\n destroy-on-close\n append-to-body\n lock-scroll\n :draggable=\"draggable\"\n :close-on-click-modal=\"false\"\n :show-close=\"false\"\n class=\"dk-dialog\"\n :z-index=\"props.zIndex\"\n >\n <template #header=\"{ close }\">\n <slot name=\"header\">\n <div class=\"flex justify-between items-center relative\">\n <span>{{ props.title }}</span>\n <div class=\"flex justify-between items-center absolute top-[50%] right-0 translate-y-[-50%]\">\n <dk-icon\n v-if=\"fullscreen\"\n class=\"cursor-pointer is-hover mr-10px\"\n :icon=\"isFullscreen ? 'radix-icons:exit-full-screen' : 'radix-icons:enter-full-screen'\"\n color=\"var(--el-color-info)\"\n hover-color=\"var(--el-color-primary)\"\n @click=\"toggleFull\"\n />\n <dk-icon\n class=\"cursor-pointer is-hover\"\n icon=\"ep:close\"\n hover-color=\"var(--el-color-primary)\"\n color=\"var(--el-color-info)\"\n @click=\"close\"\n />\n </div>\n </div>\n </slot>\n </template>\n\n <ElScrollbar :style=\"dialogStyle\">\n <slot></slot>\n </ElScrollbar>\n\n <template v-if=\"slots.footer\" #footer>\n <slot name=\"footer\"></slot>\n </template>\n </ElDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isNumber } from '@vipl520/utils'\nimport { dialogProps } from './props'\nimport { computed, useAttrs, ref, unref, useSlots, watch, nextTick } from 'vue'\n\nconst [_, bem] = createNamespace('dialog')\n\n\nconst slots = useSlots()\n\nconst props = defineProps(dialogProps)\n\nconst getBindValue = computed(() => {\n const delArr: string[] = ['fullscreen', 'title', 'maxHeight']\n const attrs = useAttrs()\n const obj: { [key: string]: any } = { ...attrs, ...props }\n for (const key in obj) {\n if (delArr.indexOf(key) !== -1) {\n delete obj[key] as any\n }\n }\n return obj\n})\nconst isFullscreen = ref(props.defaultFullscreen)\n\nwatch(\n () => props.defaultFullscreen,\n () => {\n isFullscreen.value = props.defaultFullscreen\n }\n)\n\nconst toggleFull = () => {\n isFullscreen.value = !unref(isFullscreen)\n}\n\nconst dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight)\n\nwatch(\n () => isFullscreen.value,\n async (val: boolean) => {\n await nextTick()\n if (val) {\n const windowHeight = document.documentElement.offsetHeight\n dialogHeight.value = `${windowHeight - 55 - 60 - (slots.footer ? 63 : 0)}px`\n } else {\n dialogHeight.value = isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight\n }\n },\n {\n immediate: true,\n }\n)\n\nconst dialogStyle = computed(() => {\n return {\n maxHeight: unref(dialogHeight),\n }\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","useSlots","computed","useAttrs","ref","watch","unref","isNumber","nextTick"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AACR,CAAC,CAAA,CAAA;;;;;;AAuDD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,QAAQ,CAAA,CAAA;AAGzC,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAIvB,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,MAAM,MAAmB,GAAA,CAAC,YAAc,EAAA,OAAA,EAAS,WAAW,CAAA,CAAA;AAC5D,MAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AACvB,MAAA,MAAM,GAA8B,GAAA,EAAE,GAAG,KAAA,EAAO,GAAG,KAAM,EAAA,CAAA;AACzD,MAAA,KAAA,MAAW,OAAO,GAAK,EAAA;AACrB,QAAA,IAAI,MAAO,CAAA,OAAA,CAAQ,GAAG,CAAA,KAAM,CAAI,CAAA,EAAA;AAC9B,UAAA,OAAO,IAAI,GAAG,CAAA,CAAA;AAAA,SAChB;AAAA,OACF;AACA,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AACD,IAAM,MAAA,YAAA,GAAeC,OAAI,CAAA,KAAA,CAAM,iBAAiB,CAAA,CAAA;AAEhD,IAAAC,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,iBAAA;AAAA,MACZ,MAAM;AACJ,QAAA,YAAA,CAAa,QAAQ,KAAM,CAAA,iBAAA,CAAA;AAAA,OAC7B;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,aAAa,MAAM;AACvB,MAAa,YAAA,CAAA,KAAA,GAAQ,CAACC,SAAA,CAAM,YAAY,CAAA,CAAA;AAAA,KAC1C,CAAA;AAEA,IAAM,MAAA,YAAA,GAAeF,OAAI,CAAAG,cAAA,CAAS,KAAM,CAAA,SAAS,CAAI,GAAA,CAAA,EAAG,KAAM,CAAA,SAAS,CAAO,EAAA,CAAA,GAAA,KAAA,CAAM,SAAS,CAAA,CAAA;AAE7F,IAAAF,SAAA;AAAA,MACE,MAAM,YAAa,CAAA,KAAA;AAAA,MACnB,OAAO,GAAiB,KAAA;AACtB,QAAA,MAAMG,YAAS,EAAA,CAAA;AACf,QAAA,IAAI,GAAK,EAAA;AACP,UAAM,MAAA,YAAA,GAAe,SAAS,eAAgB,CAAA,YAAA,CAAA;AAC9C,UAAa,YAAA,CAAA,KAAA,GAAQ,GAAG,YAAe,GAAA,EAAA,GAAK,MAAM,KAAM,CAAA,MAAA,GAAS,KAAK,CAAE,CAAA,CAAA,EAAA,CAAA,CAAA;AAAA,SACnE,MAAA;AACL,UAAa,YAAA,CAAA,KAAA,GAAQD,eAAS,KAAM,CAAA,SAAS,IAAI,CAAG,EAAA,KAAA,CAAM,SAAS,CAAA,EAAA,CAAA,GAAO,KAAM,CAAA,SAAA,CAAA;AAAA,SAClF;AAAA,OACF;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAcL,aAAS,MAAM;AACjC,MAAO,OAAA;AAAA,QACL,SAAA,EAAWI,UAAM,YAAY,CAAA;AAAA,OAC/B,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"dialog.vue2.js","sources":["../../../src/dialog/src/dialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkDialog',\n});\n</script>\n<template>\n <ElDialog\n v-bind=\"getBindValue\"\n :fullscreen=\"isFullscreen\"\n destroy-on-close\n append-to-body\n lock-scroll\n :draggable=\"props.draggable\"\n :close-on-click-modal=\"false\"\n :show-close=\"false\"\n class=\"dk-dialog\"\n :z-index=\"props.zIndex\"\n >\n <template #header=\"{ close }\">\n <slot name=\"header\">\n <div class=\"flex justify-between items-center relative\">\n <span>{{ props.title }}</span>\n <div class=\"flex justify-between items-center absolute top-[50%] right-0 translate-y-[-50%]\">\n <dk-icon\n v-if=\"fullscreen\"\n class=\"cursor-pointer is-hover mr-10px\"\n :icon=\"isFullscreen ? 'radix-icons:exit-full-screen' : 'radix-icons:enter-full-screen'\"\n color=\"var(--el-color-info)\"\n hover-color=\"var(--el-color-primary)\"\n @click=\"toggleFull\"\n />\n <dk-icon\n class=\"cursor-pointer is-hover\"\n icon=\"ep:close\"\n hover-color=\"var(--el-color-primary)\"\n color=\"var(--el-color-info)\"\n @click=\"close\"\n />\n </div>\n </div>\n </slot>\n </template>\n\n <ElScrollbar :style=\"dialogStyle\">\n <slot></slot>\n </ElScrollbar>\n\n <template v-if=\"slots.footer\" #footer>\n <slot name=\"footer\"></slot>\n </template>\n </ElDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isNumber } from '@vipl520/utils'\nimport { dialogProps } from './props'\nimport { computed, useAttrs, ref, unref, useSlots, watch, nextTick } from 'vue'\n\nconst [_, bem] = createNamespace('dialog')\n\n\nconst slots = useSlots()\n\nconst props = defineProps(dialogProps)\n\nconst getBindValue = computed(() => {\n const delArr: string[] = ['fullscreen', 'title', 'maxHeight']\n const attrs = useAttrs()\n const obj: { [key: string]: any } = { ...attrs, ...props }\n for (const key in obj) {\n if (delArr.indexOf(key) !== -1) {\n delete obj[key] as any\n }\n }\n return obj\n})\nconst isFullscreen = ref(props.defaultFullscreen)\n\nwatch(\n () => props.defaultFullscreen,\n () => {\n isFullscreen.value = props.defaultFullscreen\n }\n)\n\nconst toggleFull = () => {\n isFullscreen.value = !unref(isFullscreen)\n}\n\nconst dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight)\n\nwatch(\n () => isFullscreen.value,\n async (val: boolean) => {\n await nextTick()\n if (val) {\n const windowHeight = document.documentElement.offsetHeight\n dialogHeight.value = `${windowHeight - 55 - 60 - (slots.footer ? 63 : 0)}px`\n } else {\n dialogHeight.value = isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight\n }\n },\n {\n immediate: true,\n }\n)\n\nconst dialogStyle = computed(() => {\n return {\n maxHeight: unref(dialogHeight),\n }\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","useSlots","computed","useAttrs","ref","watch","unref","isNumber","nextTick"],"mappings":";;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AACR,CAAC,CAAA,CAAA;;;;;;AAuDD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,QAAQ,CAAA,CAAA;AAGzC,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AAIvB,IAAM,MAAA,YAAA,GAAeC,aAAS,MAAM;AAClC,MAAA,MAAM,MAAmB,GAAA,CAAC,YAAc,EAAA,OAAA,EAAS,WAAW,CAAA,CAAA;AAC5D,MAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AACvB,MAAA,MAAM,GAA8B,GAAA,EAAE,GAAG,KAAA,EAAO,GAAG,KAAM,EAAA,CAAA;AACzD,MAAA,KAAA,MAAW,OAAO,GAAK,EAAA;AACrB,QAAA,IAAI,MAAO,CAAA,OAAA,CAAQ,GAAG,CAAA,KAAM,CAAI,CAAA,EAAA;AAC9B,UAAA,OAAO,IAAI,GAAG,CAAA,CAAA;AAAA,SAChB;AAAA,OACF;AACA,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AACD,IAAM,MAAA,YAAA,GAAeC,OAAI,CAAA,KAAA,CAAM,iBAAiB,CAAA,CAAA;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/form/index.d.ts
CHANGED
@@ -112,11 +112,7 @@ export declare const Form: import("@vipl520/utils").WithInstall<{
|
|
112
112
|
type: BooleanConstructor;
|
113
113
|
};
|
114
114
|
dialog: {
|
115
|
-
default: () => {
|
116
|
-
width: string;
|
117
|
-
fullscreen: boolean;
|
118
|
-
draggable: boolean;
|
119
|
-
};
|
115
|
+
default: () => {};
|
120
116
|
type: ObjectConstructor;
|
121
117
|
};
|
122
118
|
}>> & {
|
@@ -202,11 +198,7 @@ export declare const Form: import("@vipl520/utils").WithInstall<{
|
|
202
198
|
type: BooleanConstructor;
|
203
199
|
};
|
204
200
|
dialog: {
|
205
|
-
default: () => {
|
206
|
-
width: string;
|
207
|
-
fullscreen: boolean;
|
208
|
-
draggable: boolean;
|
209
|
-
};
|
201
|
+
default: () => {};
|
210
202
|
type: ObjectConstructor;
|
211
203
|
};
|
212
204
|
}>> & {
|
@@ -265,11 +257,7 @@ export declare const Form: import("@vipl520/utils").WithInstall<{
|
|
265
257
|
type: BooleanConstructor;
|
266
258
|
};
|
267
259
|
dialog: {
|
268
|
-
default: () => {
|
269
|
-
width: string;
|
270
|
-
fullscreen: boolean;
|
271
|
-
draggable: boolean;
|
272
|
-
};
|
260
|
+
default: () => {};
|
273
261
|
type: ObjectConstructor;
|
274
262
|
};
|
275
263
|
}>> & {
|
@@ -36,11 +36,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
36
36
|
type: BooleanConstructor;
|
37
37
|
};
|
38
38
|
dialog: {
|
39
|
-
default: () => {
|
40
|
-
width: string;
|
41
|
-
fullscreen: boolean;
|
42
|
-
draggable: boolean;
|
43
|
-
};
|
39
|
+
default: () => {};
|
44
40
|
type: ObjectConstructor;
|
45
41
|
};
|
46
42
|
}, {
|
@@ -91,11 +87,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
91
87
|
type: BooleanConstructor;
|
92
88
|
};
|
93
89
|
dialog: {
|
94
|
-
default: () => {
|
95
|
-
width: string;
|
96
|
-
fullscreen: boolean;
|
97
|
-
draggable: boolean;
|
98
|
-
};
|
90
|
+
default: () => {};
|
99
91
|
type: ObjectConstructor;
|
100
92
|
};
|
101
93
|
}>> & {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"form.vue2.js","sources":["../../../src/form/src/form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkForm',\n});\n</script>\n<template>\n <DkDialog\n v-if=\"props.isDialog\"\n v-model=\"showDialog\"\n :title=\"_formData?.title ? _formData?.title : '表单'\"\n :width=\"dialogWidth\"\n :default-fullscreen=\"isFullscreen\"\n min-height=\"200px\"\n v-bind=\"dialogProps\"\n append-to-body\n >\n <div :style=\"dialogStyle\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n </DkDialog>\n <div v-else>\n <div :style=\"{ minHeight }\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n <!-- <div v-else :style=\"{ minHeight }\"></div>-->\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isArray, isObject, request } from '@vipl520/utils'\nimport formCreate from '@form-create/element-ui'\nimport { formProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport _config from './config'\nimport { ElButton, ElMessage } from 'element-plus'\nimport { useWindowSize } from '@vueuse/core'\n\nconst [_, bem] = createNamespace('form')\n\nformCreate.register({\n name: 'help',\n init({ value }, rule) {\n // 判断value是字符串还是数组,如果是字符串则转换为数组,如果是数组则不变\n if (!isArray(value)) {\n value = [value]\n }\n rule.suffix = {\n type: 'p',\n children: value,\n class: 'form-help',\n }\n },\n})\n\n\nconst FormCreate = formCreate.$form()\n\nconst props = defineProps(formProps)\n\nconst config = reactive(_config)\nconst fApi = ref()\nconst loading = ref(true)\nconst buttonLoading = ref(false)\n\nconst showDialog = ref(false)\nconst formConfig = computed(() => ({ ...config, ...props.extraConfig }))\nconst { width } = useWindowSize()\nconst value = ref(null)\nconst _formData = ref(props.formData || {})\n\nconst emit = defineEmits(['submit', 'fail', 'update:modelValue'])\nwatch(\n () => props.formData,\n () => {\n _formData.value = props.formData\n },\n {\n deep: true,\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('update:modelValue', val || {})\n }\n)\n// 弹窗宽度\nconst dialogWidth = computed(() => {\n let defaultWidth = '800px'\n const config = _formData.value?.config || {}\n if (config?.width) {\n return config?.width\n }\n if (props.dialog?.width) {\n defaultWidth = props.dialog?.width\n }\n if (config?.defaultWidth) {\n defaultWidth = config?.defaultWidth\n }\n let minWidth = 768\n // 判断是否为百分比\n if (!defaultWidth.endsWith('%')) {\n minWidth = parseInt(defaultWidth)\n }\n return width.value < minWidth ? '100%' : defaultWidth\n})\n// 弹窗内样式\nconst dialogStyle = computed(() => {\n if (_formData.value?.config?.style) {\n return _formData.value?.config?.style\n }\n if (props.dialog?.style) {\n return props.dialog?.style\n }\n return {}\n})\n// const draggable = computed(() => {\n// let draggable = false\n// if (props.dialog?.draggable) {\n// draggable = props.dialog?.draggable\n// }\n// if (_formData.value?.config?.draggable !== undefined) {\n// draggable = _formData.value?.config?.draggable\n// }\n// return draggable\n// })\n// 是否全屏\nconst isFullscreen = computed(() => {\n let defaultFullscreen = false\n const autoFullscreen = _formData.value?.config?.autoFullscreen !== false\n if (props.dialog?.width) {\n defaultFullscreen = props.dialog?.fullscreen\n }\n if (_formData.value?.config?.fullscreen) {\n defaultFullscreen = _formData.value?.config?.fullscreen\n }\n\n if (width.value < 768 && autoFullscreen) {\n defaultFullscreen = true\n }\n\n return defaultFullscreen\n})\n\nconst dialogProps = computed(() => {\n return Object.assign(props.dialog, _formData.value?.config?.dialog)\n})\nconst setFormData = (formData: any) => {\n value.value = null\n _formData.value = formData\n}\n\nconst initFormData = (formUrl?: string | object) => {\n if (!formUrl) {\n formUrl = props.formUrl\n }\n\n if (props.formData) {\n loading.value = false\n } else if (formUrl) {\n let data: {}\n if (isObject(formUrl)) {\n data = formUrl\n } else {\n data = {\n url: formUrl,\n method: 'post',\n }\n }\n request(data)\n .then((res) => {\n _formData.value = res.data\n loading.value = false\n })\n .catch((res) => {\n loading.value = false\n })\n }\n}\n\nconst checkForm = () => {\n fApi.value\n .validate()\n .then(() => {\n fApi.value\n .submit((data: any) => {\n onSubmit(data)\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n}\n\nconst onSubmit = (data: any) => {\n if (props.isLoading) {\n buttonLoading.value = true\n }\n if (props.isSubmit) {\n request({\n url: props.path + _formData.value.action,\n method: _formData.value.method,\n data: { formData: data },\n })\n .then((res) => {\n ElMessage.success(res.msg)\n emit('submit', data, res)\n buttonLoading.value = false\n })\n .catch((res) => {\n ElMessage.error(res.msg)\n emit('fail', data, res)\n buttonLoading.value = false\n })\n } else {\n emit('submit', data)\n buttonLoading.value = false\n }\n showDialog.value = false\n}\n\nconst show = () => {\n showDialog.value = true\n}\nonMounted(() => {\n initFormData()\n})\n// 导出\ndefineExpose({\n showDialog,\n buttonLoading,\n fApi,\n value,\n show,\n checkForm,\n onSubmit,\n initFormData,\n setFormData,\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","value","isArray","config","reactive","_config","ref","computed","useWindowSize","watch","isObject","request","ElMessage","onMounted"],"mappings":";;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA4DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,MAAM,CAAA,CAAA;AAEvC,IAAA,UAAA,CAAW,QAAS,CAAA;AAAA,MAClB,IAAM,EAAA,MAAA;AAAA,MACN,IAAK,CAAA,EAAE,KAAAC,EAAAA,MAAAA,IAAS,IAAM,EAAA;AAEpB,QAAI,IAAA,CAACC,aAAQD,CAAAA,MAAK,CAAG,EAAA;AACnB,UAAAA,MAAAA,GAAQ,CAACA,MAAK,CAAA,CAAA;AAAA,SAChB;AACA,QAAA,IAAA,CAAK,MAAS,GAAA;AAAA,UACZ,IAAM,EAAA,GAAA;AAAA,UACN,QAAUA,EAAAA,MAAAA;AAAA,UACV,KAAO,EAAA,WAAA;AAAA,SACT,CAAA;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAGD,IAAM,MAAA,UAAA,GAAa,WAAW,KAAM,EAAA,CAAA;AAIpC,IAAM,MAAAE,QAAA,GAASC,aAASC,cAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,OAAOC,OAAI,EAAA,CAAA;AACjB,IAAM,MAAA,OAAA,GAAUA,QAAI,IAAI,CAAA,CAAA;AACxB,IAAM,MAAA,aAAA,GAAgBA,QAAI,KAAK,CAAA,CAAA;AAE/B,IAAM,MAAA,UAAA,GAAaA,QAAI,KAAK,CAAA,CAAA;AAC5B,IAAM,MAAA,UAAA,GAAaC,aAAS,OAAO,EAA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MAAA,EAAQ,MAAM,GAAG,CAAA,CAAA;AACtB,UAAA,aAAA,CAAc,KAAQ,GAAA,KAAA,CAAA;AAAA,SACvB,CAAA,CAAA;AAAA,OACE,MAAA;AACL,QAAA,IAAA,CAAK,UAAU,IAAI,CAAA,CAAA;AACnB,QAAA,aAAA,CAAc,KAAQ,GAAA,KAAA,CAAA;AAAA,OACxB;AACA,MAAA,UAAA,CAAW,KAAQ,GAAA,KAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,UAAA,CAAW,KAAQ,GAAA,IAAA,CAAA;AAAA,KACrB,CAAA;AACA,IAAAC,aAAA,CAAU,MAAM;AACd,MAAa,YAAA,EAAA,CAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAa,QAAA,CAAA;AAAA,MACX,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"form.vue2.js","sources":["../../../src/form/src/form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkForm',\n});\n</script>\n<template>\n <DkDialog\n v-if=\"props.isDialog\"\n v-model=\"showDialog\"\n :title=\"_formData?.title ? _formData?.title : '表单'\"\n :width=\"dialogWidth\"\n :default-fullscreen=\"isFullscreen\"\n min-height=\"200px\"\n v-bind=\"dialogProps\"\n append-to-body\n >\n <div :style=\"dialogStyle\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n </DkDialog>\n <div v-else>\n <div :style=\"{ minHeight }\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n <!-- <div v-else :style=\"{ minHeight }\"></div>-->\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isArray, isObject, request } from '@vipl520/utils'\nimport formCreate from '@form-create/element-ui'\nimport { formProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport _config from './config'\nimport { ElButton, ElMessage } from 'element-plus'\nimport { useWindowSize } from '@vueuse/core'\n\nconst [_, bem] = createNamespace('form')\n\nformCreate.register({\n name: 'help',\n init({ value }, rule) {\n // 判断value是字符串还是数组,如果是字符串则转换为数组,如果是数组则不变\n if (!isArray(value)) {\n value = [value]\n }\n rule.suffix = {\n type: 'p',\n children: value,\n class: 'form-help',\n }\n },\n})\n\n\nconst FormCreate = formCreate.$form()\n\nconst props = defineProps(formProps)\n\nconst config = reactive(_config)\nconst fApi = ref()\nconst loading = ref(true)\nconst buttonLoading = ref(false)\n\nconst showDialog = ref(false)\nconst formConfig = computed(() => ({ ...config, ...props.extraConfig }))\nconst { width } = useWindowSize()\nconst value = ref(null)\nconst _formData = ref(props.formData || {})\n\nconst emit = defineEmits(['submit', 'fail', 'update:modelValue'])\nwatch(\n () => props.formData,\n () => {\n _formData.value = props.formData\n },\n {\n deep: true,\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('update:modelValue', val || {})\n }\n)\n// 弹窗宽度\nconst dialogWidth = computed(() => {\n let defaultWidth = '800px'\n const config = _formData.value?.config || {}\n console.log(config)\n if (config?.width) {\n return config?.width\n }\n if (props.dialog?.width) {\n defaultWidth = props.dialog?.width\n }\n if (config?.defaultWidth) {\n defaultWidth = config?.defaultWidth\n }\n let minWidth = 768\n // 判断是否为百分比\n if (!defaultWidth.endsWith('%')) {\n minWidth = parseInt(defaultWidth)\n }\n return width.value < minWidth ? '100%' : defaultWidth\n})\n// 弹窗内样式\nconst dialogStyle = computed(() => {\n if (_formData.value?.config?.style) {\n return _formData.value?.config?.style\n }\n if (props.dialog?.style) {\n return props.dialog?.style\n }\n return {}\n})\n// const draggable = computed(() => {\n// let draggable = false\n// if (props.dialog?.draggable) {\n// draggable = props.dialog?.draggable\n// }\n// if (_formData.value?.config?.draggable !== undefined) {\n// draggable = _formData.value?.config?.draggable\n// }\n// return draggable\n// })\n// 是否全屏\nconst isFullscreen = computed(() => {\n let defaultFullscreen = false\n const autoFullscreen = _formData.value?.config?.autoFullscreen !== false\n if (props.dialog?.width) {\n defaultFullscreen = props.dialog?.fullscreen\n }\n if (_formData.value?.config?.fullscreen) {\n defaultFullscreen = _formData.value?.config?.fullscreen\n }\n\n if (width.value < 768 && autoFullscreen) {\n defaultFullscreen = true\n }\n\n return defaultFullscreen\n})\n\nconst dialogProps = computed(() => {\n return Object.assign(props.dialog, _formData.value?.config?.dialog)\n})\nconst setFormData = (formData: any) => {\n value.value = null\n _formData.value = formData\n}\n\nconst initFormData = (formUrl?: string | object) => {\n if (!formUrl) {\n formUrl = props.formUrl\n }\n\n if (props.formData) {\n loading.value = false\n } else if (formUrl) {\n let data: {}\n if (isObject(formUrl)) {\n data = formUrl\n } else {\n data = {\n url: formUrl,\n method: 'post',\n }\n }\n request(data)\n .then((res) => {\n _formData.value = res.data\n loading.value = false\n })\n .catch((res) => {\n loading.value = false\n })\n }\n}\n\nconst checkForm = () => {\n fApi.value\n .validate()\n .then(() => {\n fApi.value\n .submit((data: any) => {\n onSubmit(data)\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n}\n\nconst onSubmit = (data: any) => {\n if (props.isLoading) {\n buttonLoading.value = true\n }\n if (props.isSubmit) {\n request({\n url: props.path + _formData.value.action,\n method: _formData.value.method,\n data: { formData: data },\n })\n .then((res) => {\n ElMessage.success(res.msg)\n emit('submit', data, res)\n buttonLoading.value = false\n })\n .catch((res) => {\n ElMessage.error(res.msg)\n emit('fail', data, res)\n buttonLoading.value = false\n })\n } else {\n emit('submit', data)\n buttonLoading.value = false\n }\n showDialog.value = false\n}\n\nconst show = () => {\n showDialog.value = true\n}\nonMounted(() => {\n initFormData()\n})\n// 导出\ndefineExpose({\n showDialog,\n buttonLoading,\n fApi,\n value,\n show,\n checkForm,\n onSubmit,\n initFormData,\n setFormData,\n})\n</script>\n"],"names":["__MACROS_defineComponent","createNamespace","value","isArray","config","reactive","_config","ref","computed","useWindowSize","watch","isObject","request","ElMessage","onMounted"],"mappings":";;;;;;;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA4DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAIC,sBAAgB,MAAM,CAAA,CAAA;AAEvC,IAAA,UAAA,CAAW,QAAS,CAAA;AAAA,MAClB,IAAM,EAAA,MAAA;AAAA,MACN,IAAK,CAAA,EAAE,KAAAC,EAAAA,MAAAA,IAAS,IAAM,EAAA;AAEpB,QAAI,IAAA,CAACC,aAAQD,CAAAA,MAAK,CAAG,EAAA;AACnB,UAAAA,MA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AA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/form/src/props.d.ts
CHANGED
package/lib/form/src/props.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"props.js","sources":["../../../src/form/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const formProps = {\n // 表单数据\n formData: { type: Object, default: null },\n // 是否提交\n isSubmit: { type: Boolean, default: true },\n // 表单配置\n extraConfig: {\n default: () => {\n return {}\n },\n type: Object,\n },\n // 表单路径\n path: { default: '', type: String },\n // 表单接口\n formUrl: { default: '', type: [String, Object] },\n // 显示加载\n isLoading: { default: true, type: Boolean },\n // 默认高度\n minHeight: { default: '100px', type: String },\n // 是否为弹窗\n isDialog: { default: false, type: Boolean },\n // 弹窗显示后获取formData\n dialogWait: { default: true, type: Boolean },\n // 弹窗配置\n dialog: {\n default: () => {\n return {
|
1
|
+
{"version":3,"file":"props.js","sources":["../../../src/form/src/props.ts"],"sourcesContent":["import type { ExtractPropTypes } from 'vue'\n\nexport const formProps = {\n // 表单数据\n formData: { type: Object, default: null },\n // 是否提交\n isSubmit: { type: Boolean, default: true },\n // 表单配置\n extraConfig: {\n default: () => {\n return {}\n },\n type: Object,\n },\n // 表单路径\n path: { default: '', type: String },\n // 表单接口\n formUrl: { default: '', type: [String, Object] },\n // 显示加载\n isLoading: { default: true, type: Boolean },\n // 默认高度\n minHeight: { default: '100px', type: String },\n // 是否为弹窗\n isDialog: { default: false, type: Boolean },\n // 弹窗显示后获取formData\n dialogWait: { default: true, type: Boolean },\n // 弹窗配置\n dialog: {\n default: () => {\n return {}\n },\n type: Object,\n },\n}\n\nexport type FormProps = ExtractPropTypes<typeof formProps>\n"],"names":[],"mappings":";;AAEO,MAAM,SAAY,GAAA;AAAA;AAAA,EAEvB,QAAU,EAAA,EAAE,IAAM,EAAA,MAAA,EAAQ,SAAS,IAAK,EAAA;AAAA;AAAA,EAExC,QAAU,EAAA,EAAE,IAAM,EAAA,OAAA,EAAS,SAAS,IAAK,EAAA;AAAA;AAAA,EAEzC,WAAa,EAAA;AAAA,IACX,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AAAA;AAAA,EAEA,IAAM,EAAA,EAAE,OAAS,EAAA,EAAA,EAAI,MAAM,MAAO,EAAA;AAAA;AAAA,EAElC,OAAA,EAAS,EAAE,OAAS,EAAA,EAAA,EAAI,MAAM,CAAC,MAAA,EAAQ,MAAM,CAAE,EAAA;AAAA;AAAA,EAE/C,SAAW,EAAA,EAAE,OAAS,EAAA,IAAA,EAAM,MAAM,OAAQ,EAAA;AAAA;AAAA,EAE1C,SAAW,EAAA,EAAE,OAAS,EAAA,OAAA,EAAS,MAAM,MAAO,EAAA;AAAA;AAAA,EAE5C,QAAU,EAAA,EAAE,OAAS,EAAA,KAAA,EAAO,MAAM,OAAQ,EAAA;AAAA;AAAA,EAE1C,UAAY,EAAA,EAAE,OAAS,EAAA,IAAA,EAAM,MAAM,OAAQ,EAAA;AAAA;AAAA,EAE3C,MAAQ,EAAA;AAAA,IACN,SAAS,MAAM;AACb,MAAA,OAAO,EAAC,CAAA;AAAA,KACV;AAAA,IACA,IAAM,EAAA,MAAA;AAAA,GACR;AACF;;;;"}
|
package/lib/index.d.ts
CHANGED
@@ -32,6 +32,8 @@ export * from './select';
|
|
32
32
|
export * from './poster-input';
|
33
33
|
export * from './style-animation-input';
|
34
34
|
export * from './animate-select';
|
35
|
+
export * from './uni-icon';
|
36
|
+
export * from './uni-icon-input';
|
35
37
|
export declare const install: (app: App, option?: any) => void;
|
36
38
|
declare const _default: {
|
37
39
|
install: (app: App<any>, option?: any) => void;
|
package/lib/index.js
CHANGED
@@ -10,7 +10,7 @@ var index$1 = require('./tiny-editor/index.js');
|
|
10
10
|
var index$2 = require('./icon/index.js');
|
11
11
|
var index$4 = require('./color-input/index.js');
|
12
12
|
var index$5 = require('./hot-area-input/index.js');
|
13
|
-
var index$
|
13
|
+
var index$A = require('./dialog/index.js');
|
14
14
|
var index$6 = require('./form/index.js');
|
15
15
|
var index$7 = require('./attachment/index.js');
|
16
16
|
var index$8 = require('./attachment-dialog/index.js');
|
@@ -38,6 +38,8 @@ var index$u = require('./select/index.js');
|
|
38
38
|
var index$v = require('./poster-input/index.js');
|
39
39
|
var index$w = require('./style-animation-input/index.js');
|
40
40
|
var index$x = require('./animate-select/index.js');
|
41
|
+
var index$z = require('./uni-icon-input/index.js');
|
42
|
+
var index$y = require('./uni-icon/index.js');
|
41
43
|
var utils = require('@vipl520/utils');
|
42
44
|
var props = require('./tiny-editor/src/props.js');
|
43
45
|
var props$1 = require('./icon/src/props.js');
|
@@ -72,6 +74,8 @@ var props$t = require('./select/src/props.js');
|
|
72
74
|
var props$u = require('./poster-input/src/props.js');
|
73
75
|
var props$v = require('./style-animation-input/src/props.js');
|
74
76
|
var props$w = require('./animate-select/src/props.js');
|
77
|
+
var props$x = require('./uni-icon/src/props.js');
|
78
|
+
var props$y = require('./uni-icon-input/src/props.js');
|
75
79
|
|
76
80
|
const components = [
|
77
81
|
index$k.Test,
|
@@ -85,7 +89,7 @@ const components = [
|
|
85
89
|
// 热区选择器
|
86
90
|
index$5.HotAreaInput,
|
87
91
|
// 对话框
|
88
|
-
index$
|
92
|
+
index$A.Dialog,
|
89
93
|
// json表单
|
90
94
|
index$6.Form,
|
91
95
|
// 附件
|
@@ -150,7 +154,9 @@ const components = [
|
|
150
154
|
// 海报
|
151
155
|
index$v.Poster,
|
152
156
|
Vue3DraggableResizable,
|
153
|
-
draggable
|
157
|
+
draggable,
|
158
|
+
index$z.UniIconInput,
|
159
|
+
index$y.UniIcon
|
154
160
|
// TODO 普通上传 upload
|
155
161
|
// TODO tag选择器 tag-input
|
156
162
|
// TODO 链接选择器 link-input
|
@@ -208,6 +214,8 @@ exports.Poster = index$v.Poster;
|
|
208
214
|
exports.PosterInput = index$v.PosterInput;
|
209
215
|
exports.StyleAnimationInput = index$w.StyleAnimationInput;
|
210
216
|
exports.AnimateSelect = index$x.AnimateSelect;
|
217
|
+
exports.UniIconInput = index$z.UniIconInput;
|
218
|
+
exports.UniIcon = index$y.UniIcon;
|
211
219
|
exports.tinyEditorProps = props.tinyEditorProps;
|
212
220
|
exports.iconProps = props$1.iconProps;
|
213
221
|
exports.groupProps = props$2.groupProps;
|
@@ -243,6 +251,8 @@ exports.selectProps = props$t.selectProps;
|
|
243
251
|
exports.posterInputProps = props$u.posterInputProps;
|
244
252
|
exports.styleAnimationInputProps = props$v.styleAnimationInputProps;
|
245
253
|
exports.animateSelectProps = props$w.animateSelectProps;
|
254
|
+
exports.uniIconProps = props$x.uniIconProps;
|
255
|
+
exports.uniIconInputProps = props$y.uniIconInputProps;
|
246
256
|
exports.default = index;
|
247
257
|
exports.install = install;
|
248
258
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { Test } from './test'\nimport draggable from 'vuedraggable'\nimport Vue3DraggableResizable from 'vue3-draggable-resizable'\n\nimport { Group } from './group'\nimport { TinyEditor } from './tiny-editor'\nimport { Icon } from './icon'\nimport { ColorInput } from './color-input'\nimport { HotAreaInput } from './hot-area-input'\nimport { Dialog } from './dialog'\nimport { Form } from './form'\nimport { Attachment } from './attachment'\nimport { AttachmentDialog } from './attachment-dialog'\nimport { FileInput } from './file-input'\nimport { ImageInput } from './image-input'\nimport { AudioInput } from './audio-input'\nimport { VideoInput } from './video-input'\nimport { FileListInput } from './file-list-input'\nimport { ImageListInput } from './image-list-input'\nimport { AudioListInput } from './audio-list-input'\nimport { VideoListInput } from './video-list-input'\nimport { IconInput, IconContent, IconDialog } from './icon-input'\nimport { StyleInput } from './style-input'\nimport { BoxSizeInput } from './box-size-input'\nimport { StyleBoxInput } from './style-box-input'\nimport { StyleFontInput } from './style-font-input'\nimport { StyleBorderInput } from './style-border-input'\nimport { StyleBackgroundInput } from './style-background-input'\nimport { StyleShadowContent, StyleShadowInput } from './style-shadow-input'\nimport { StylePositionInput } from './style-position-input'\nimport { StyleNumberInput } from './style-number-input'\nimport { PageDiy } from './page-diy'\nimport { Table } from './table'\nimport { Select } from './select'\nimport { Poster, PosterInput } from './poster-input'\nimport { StyleAnimationInput } from './style-animation-input'\nimport { AnimateSelect } from './animate-select'\nimport { setGlobalConfig, directives } from '@vipl520/utils'\nexport * from './tiny-editor'\nexport * from './icon'\nexport * from './group'\nexport * from './color-input'\nexport * from './hot-area-input'\nexport * from './form'\nexport * from './attachment'\nexport * from './attachment-dialog'\nexport * from './file-input'\nexport * from './image-input'\nexport * from './audio-input'\nexport * from './video-input'\nexport * from './file-list-input'\nexport * from './image-list-input'\nexport * from './audio-list-input'\nexport * from './video-list-input'\nexport * from './icon-input'\nexport * from './page-diy'\nexport * from './box-size-input'\nexport * from './test'\nexport * from './style-input'\nexport * from './style-box-input'\nexport * from './style-font-input'\nexport * from './style-border-input'\nexport * from './style-shadow-input'\nexport * from './style-background-input'\nexport * from './style-position-input'\nexport * from './style-number-input'\nexport * from './table'\nexport * from './select'\nexport * from './poster-input'\nexport * from './style-animation-input'\nexport * from './animate-select'\n\nconst components = [\n Test,\n Group,\n // 富文本编辑器\n TinyEditor,\n // 图标\n Icon,\n // 颜色选择器\n ColorInput,\n // 热区选择器\n HotAreaInput,\n // 对话框\n Dialog,\n // json表单\n Form,\n // 附件\n Attachment,\n // 附件弹窗\n AttachmentDialog,\n // 文件选择器\n FileInput,\n // 图片选择器\n ImageInput,\n // 音频选择器\n AudioInput,\n // 视频选择器\n VideoInput,\n // 多文件选择器\n FileListInput,\n // 多图片选择器\n ImageListInput,\n // 多音频选择器\n AudioListInput,\n // 多视频选择器\n VideoListInput,\n // 图标选择器\n IconInput,\n // 图标展示框\n IconContent,\n // 图片弹出框\n IconDialog,\n // DIY编辑器\n PageDiy,\n // 尺寸输入框(带px/%/rem/等单位)\n BoxSizeInput,\n // DIV盒子编辑器(padding/margin/width/height)\n StyleBoxInput,\n // 文字样式编辑器\n StyleFontInput,\n // 边框样式编辑器\n StyleBorderInput,\n // 阴影编辑器\n StyleShadowInput,\n // 阴影编辑框\n StyleShadowContent,\n // 背景编辑器\n StyleBackgroundInput,\n // 合并样式编辑\n StyleInput,\n // 定位编辑器\n StylePositionInput,\n // 样式文字\n StyleNumberInput,\n // 动画配置\n StyleAnimationInput,\n // 动画class选择\n AnimateSelect,\n // 数据表格\n Table,\n // 选择\n Select,\n // 表单组/对象表单\n // 海报选择器\n PosterInput,\n // 海报\n Poster,\n Vue3DraggableResizable,\n draggable,\n // TODO 普通上传 upload\n // TODO tag选择器 tag-input\n // TODO 链接选择器 link-input\n // TODO 应用框架\n]\n\nexport const install = (app: App, option: any = {}) => {\n components.forEach((item) => {\n if (item.install!) {\n app.use(item)\n } else if (item.name) {\n app.component(item.name, item)\n }\n })\n directives(app)\n setGlobalConfig(option)\n}\n\nexport default {\n install,\n}\n"],"names":["Test","Group","TinyEditor","Icon","ColorInput","HotAreaInput","Dialog","Form","Attachment","AttachmentDialog","FileInput","ImageInput","AudioInput","VideoInput","FileListInput","ImageListInput","AudioListInput","VideoListInput","IconInput","IconContent","IconDialog","PageDiy","BoxSizeInput","StyleBoxInput","StyleFontInput","StyleBorderInput","StyleShadowInput","StyleShadowContent","StyleBackgroundInput","StyleInput","StylePositionInput","StyleNumberInput","StyleAnimationInput","AnimateSelect","Table","Select","PosterInput","Poster","directives","setGlobalConfig"],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import type { App } from 'vue'\nimport { Test } from './test'\nimport draggable from 'vuedraggable'\nimport Vue3DraggableResizable from 'vue3-draggable-resizable'\n\nimport { Group } from './group'\nimport { TinyEditor } from './tiny-editor'\nimport { Icon } from './icon'\nimport { ColorInput } from './color-input'\nimport { HotAreaInput } from './hot-area-input'\nimport { Dialog } from './dialog'\nimport { Form } from './form'\nimport { Attachment } from './attachment'\nimport { AttachmentDialog } from './attachment-dialog'\nimport { FileInput } from './file-input'\nimport { ImageInput } from './image-input'\nimport { AudioInput } from './audio-input'\nimport { VideoInput } from './video-input'\nimport { FileListInput } from './file-list-input'\nimport { ImageListInput } from './image-list-input'\nimport { AudioListInput } from './audio-list-input'\nimport { VideoListInput } from './video-list-input'\nimport { IconInput, IconContent, IconDialog } from './icon-input'\nimport { StyleInput } from './style-input'\nimport { BoxSizeInput } from './box-size-input'\nimport { StyleBoxInput } from './style-box-input'\nimport { StyleFontInput } from './style-font-input'\nimport { StyleBorderInput } from './style-border-input'\nimport { StyleBackgroundInput } from './style-background-input'\nimport { StyleShadowContent, StyleShadowInput } from './style-shadow-input'\nimport { StylePositionInput } from './style-position-input'\nimport { StyleNumberInput } from './style-number-input'\nimport { PageDiy } from './page-diy'\nimport { Table } from './table'\nimport { Select } from './select'\nimport { Poster, PosterInput } from './poster-input'\nimport { StyleAnimationInput } from './style-animation-input'\nimport { AnimateSelect } from './animate-select'\nimport { UniIconInput } from './uni-icon-input'\nimport { UniIcon } from './uni-icon'\n\nimport { setGlobalConfig, directives } from '@vipl520/utils'\nexport * from './tiny-editor'\nexport * from './icon'\nexport * from './group'\nexport * from './color-input'\nexport * from './hot-area-input'\nexport * from './form'\nexport * from './attachment'\nexport * from './attachment-dialog'\nexport * from './file-input'\nexport * from './image-input'\nexport * from './audio-input'\nexport * from './video-input'\nexport * from './file-list-input'\nexport * from './image-list-input'\nexport * from './audio-list-input'\nexport * from './video-list-input'\nexport * from './icon-input'\nexport * from './page-diy'\nexport * from './box-size-input'\nexport * from './test'\nexport * from './style-input'\nexport * from './style-box-input'\nexport * from './style-font-input'\nexport * from './style-border-input'\nexport * from './style-shadow-input'\nexport * from './style-background-input'\nexport * from './style-position-input'\nexport * from './style-number-input'\nexport * from './table'\nexport * from './select'\nexport * from './poster-input'\nexport * from './style-animation-input'\nexport * from './animate-select'\nexport * from './uni-icon'\nexport * from './uni-icon-input'\n\nconst components = [\n Test,\n Group,\n // 富文本编辑器\n TinyEditor,\n // 图标\n Icon,\n // 颜色选择器\n ColorInput,\n // 热区选择器\n HotAreaInput,\n // 对话框\n Dialog,\n // json表单\n Form,\n // 附件\n Attachment,\n // 附件弹窗\n AttachmentDialog,\n // 文件选择器\n FileInput,\n // 图片选择器\n ImageInput,\n // 音频选择器\n AudioInput,\n // 视频选择器\n VideoInput,\n // 多文件选择器\n FileListInput,\n // 多图片选择器\n ImageListInput,\n // 多音频选择器\n AudioListInput,\n // 多视频选择器\n VideoListInput,\n // 图标选择器\n IconInput,\n // 图标展示框\n IconContent,\n // 图片弹出框\n IconDialog,\n // DIY编辑器\n PageDiy,\n // 尺寸输入框(带px/%/rem/等单位)\n BoxSizeInput,\n // DIV盒子编辑器(padding/margin/width/height)\n StyleBoxInput,\n // 文字样式编辑器\n StyleFontInput,\n // 边框样式编辑器\n StyleBorderInput,\n // 阴影编辑器\n StyleShadowInput,\n // 阴影编辑框\n StyleShadowContent,\n // 背景编辑器\n StyleBackgroundInput,\n // 合并样式编辑\n StyleInput,\n // 定位编辑器\n StylePositionInput,\n // 样式文字\n StyleNumberInput,\n // 动画配置\n StyleAnimationInput,\n // 动画class选择\n AnimateSelect,\n // 数据表格\n Table,\n // 选择\n Select,\n // 表单组/对象表单\n // 海报选择器\n PosterInput,\n // 海报\n Poster,\n Vue3DraggableResizable,\n draggable,\n UniIconInput,\n UniIcon,\n // TODO 普通上传 upload\n // TODO tag选择器 tag-input\n // TODO 链接选择器 link-input\n // TODO 应用框架\n]\n\nexport const install = (app: App, option: any = {}) => {\n components.forEach((item) => {\n if (item.install!) {\n app.use(item)\n } else if (item.name) {\n app.component(item.name, item)\n }\n })\n directives(app)\n setGlobalConfig(option)\n}\n\nexport default {\n install,\n}\n"],"names":["Test","Group","TinyEditor","Icon","ColorInput","HotAreaInput","Dialog","Form","Attachment","AttachmentDialog","FileInput","ImageInput","AudioInput","VideoInput","FileListInput","ImageListInput","AudioListInput","VideoListInput","IconInput","IconContent","IconDialog","PageDiy","BoxSizeInput","StyleBoxInput","StyleFontInput","StyleBorderInput","StyleShadowInput","StyleShadowContent","StyleBackgroundInput","StyleInput","StylePositionInput","StyleNumberInput","StyleAnimationInput","AnimateSelect","Table","Select","PosterInput","Poster","UniIconInput","UniIcon","directives","setGlobalConfig"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA,MAAM,UAAa,GAAA;AAAA,EACjBA,YAAA;AAAA,EACAC,aAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,YAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,oBAAA;AAAA;AAAA,EAEAC,cAAA;AAAA;AAAA,EAEAC,YAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,iBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,qBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,iBAAA;AAAA;AAAA,EAEAC,mBAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,eAAA;AAAA;AAAA,EAEAC,oBAAA;AAAA;AAAA,EAEAC,qBAAA;AAAA;AAAA,EAEAC,sBAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,0BAAA;AAAA;AAAA,EAEAC,4BAAA;AAAA;AAAA,EAEAC,kBAAA;AAAA;AAAA,EAEAC,0BAAA;AAAA;AAAA,EAEAC,wBAAA;AAAA;AAAA,EAEAC,2BAAA;AAAA;AAAA,EAEAC,qBAAA;AAAA;AAAA,EAEAC,aAAA;AAAA;AAAA,EAEAC,cAAA;AAAA;AAAA;AAAA,EAGAC,mBAAA;AAAA;AAAA,EAEAC,cAAA;AAAA,EACA,sBAAA;AAAA,EACA,SAAA;AAAA,EACAC,oBAAA;AAAA,EACAC,eAAA;AAAA;AAAA;AAAA;AAAA;AAKF,CAAA,CAAA;AAEO,MAAM,OAAU,GAAA,CAAC,GAAU,EAAA,MAAA,GAAc,EAAO,KAAA;AACrD,EAAW,UAAA,CAAA,OAAA,CAAQ,CAAC,IAAS,KAAA;AAC3B,IAAA,IAAI,KAAK,OAAU,EAAA;AACjB,MAAA,GAAA,CAAI,IAAI,IAAI,CAAA,CAAA;AAAA,KACd,MAAA,IAAW,KAAK,IAAM,EAAA;AACpB,MAAI,GAAA,CAAA,SAAA,CAAU,IAAK,CAAA,IAAA,EAAM,IAAI,CAAA,CAAA;AAAA,KAC/B;AAAA,GACD,CAAA,CAAA;AACD,EAAAC,gBAAA,CAAW,GAAG,CAAA,CAAA;AACd,EAAAC,qBAAA,CAAgB,MAAM,CAAA,CAAA;AACxB,EAAA;AAEA,YAAe;AAAA,EACb,OAAA;AACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.scss
CHANGED
@@ -24,6 +24,8 @@
|
|
24
24
|
@import './hot-area-input/style/index.scss';
|
25
25
|
@import './animate-select/style/index.scss';
|
26
26
|
@import './style-animation-input/style/index.scss';
|
27
|
+
@import './uni-icon/style/index.scss';
|
28
|
+
@import './uni-icon-input/style/index.scss';
|
27
29
|
|
28
30
|
//
|
29
31
|
::-webkit-scrollbar {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DkMinTitle.js","sources":["../../../../../../../src/page-diy/src/config/rule/min/common/DkMinTitle.js"],"sourcesContent":["const label = '标题'\nconst name = 'DkMinTitle'\n\nexport default {\n icon: 'material-symbols:title',\n label,\n name,\n rule() {\n return {\n type: name,\n props: {\n title: '主标题',\n subtitle: '副标题',\n },\n showStyle: true,\n fixed: true,\n }\n },\n props() {\n return [\n {\n type: 'radio',\n field: 'type',\n title: '类型',\n value: '0',\n options: [\n { label: '默认', value: '0' },\n { label: '副标题', value: '1' },\n ],\n control: [\n {\n value: '0',\n rule: [\n { type: 'input', field: 'title', title: '标题', value: '主标题' },\n {\n type: 'radio',\n field: 'align',\n title: '位置',\n value: 'left',\n options: [\n { label: '居左', value: 'left' },\n { label: '居中', value: 'center' },\n ],\n },\n {\n type: 'DkColorInput',\n field: 'color',\n title: '标题色',\n value: '#000',\n },\n ],\n },\n {\n value: '1',\n rule: [\n { type: 'input', field: 'title', title: '标题', value: '主标题' },\n {\n type: 'DkColorInput',\n field: 'color',\n title: '标题色',\n value: '#000',\n },\n { type: 'input', field: 'subtitle', title: '副标题', value: '' },\n {\n type: 'DkColorInput',\n field: 'subColor',\n title: '副标题色',\n value: '#999',\n },\n {\n type: 'switch',\n field: 'isMore',\n title: '显示更多',\n value: true,\n control: [\n {\n value: true,\n rule: [\n {\n type: 'input',\n field: 'moreText',\n title: '文本内容',\n value: '查看更多',\n },\n {\n type: 'input',\n field: 'url',\n title: '链接地址',\n value: '',\n },\n {\n type: 'DkColorInput',\n field: 'moreColor',\n title: '颜色',\n value: '#999',\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n },\n ]\n },\n}\n"],"names":[],"mappings":";;;;AAAA,MAAM,KAAQ,GAAA,cAAA,CAAA;AACd,MAAM,IAAO,GAAA,YAAA,CAAA;AAEb,iBAAe;AAAA,EACb,IAAM,EAAA,wBAAA;AAAA,EACN,KAAA;AAAA,EACA,IAAA;AAAA,EACA,IAAO,GAAA;AACL,IAAO,OAAA;AAAA,MACL,IAAM,EAAA,IAAA;AAAA,MACN,KAAO,EAAA;AAAA,QACL,KAAO,EAAA,oBAAA;AAAA,QACP,QAAU,EAAA,oBAAA;AAAA,OACZ;AAAA,MACA,SAAW,EAAA,IAAA;AAAA,MACX,KAAO,EAAA,IAAA;AAAA,
|
1
|
+
{"version":3,"file":"DkMinTitle.js","sources":["../../../../../../../src/page-diy/src/config/rule/min/common/DkMinTitle.js"],"sourcesContent":["const label = '标题'\nconst name = 'DkMinTitle'\n\nexport default {\n icon: 'material-symbols:title',\n label,\n name,\n rule() {\n return {\n type: name,\n props: {\n title: '主标题',\n subtitle: '副标题',\n },\n showStyle: true,\n fixed: true,\n setting: {},\n }\n },\n props() {\n return [\n {\n type: 'radio',\n field: 'type',\n title: '类型',\n value: '0',\n options: [\n { label: '默认', value: '0' },\n { label: '副标题', value: '1' },\n ],\n control: [\n {\n value: '0',\n rule: [\n { type: 'input', field: 'title', title: '标题', value: '主标题' },\n {\n type: 'radio',\n field: 'align',\n title: '位置',\n value: 'left',\n options: [\n { label: '居左', value: 'left' },\n { label: '居中', value: 'center' },\n ],\n },\n {\n type: 'DkColorInput',\n field: 'color',\n title: '标题色',\n value: '#000',\n },\n ],\n },\n {\n value: '1',\n rule: [\n { type: 'input', field: 'title', title: '标题', value: '主标题' },\n {\n type: 'DkColorInput',\n field: 'color',\n title: '标题色',\n value: '#000',\n },\n { type: 'input', field: 'subtitle', title: '副标题', value: '' },\n {\n type: 'DkColorInput',\n field: 'subColor',\n title: '副标题色',\n value: '#999',\n },\n {\n type: 'switch',\n field: 'isMore',\n title: '显示更多',\n value: true,\n control: [\n {\n value: true,\n rule: [\n {\n type: 'input',\n field: 'moreText',\n title: '文本内容',\n value: '查看更多',\n },\n {\n type: 'input',\n field: 'url',\n title: '链接地址',\n value: '',\n },\n {\n type: 'DkColorInput',\n field: 'moreColor',\n title: '颜色',\n value: '#999',\n },\n ],\n },\n ],\n },\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