@dinert/element-plus 1.1.21 → 1.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/element-plus.umd.js +2 -2
- package/dist/element-plus.umd.js.map +1 -1
- package/es/packages/components/dialog/src/index.mjs +17 -17
- package/es/packages/components/dialog/src/index.mjs.map +1 -1
- package/es/packages/components/form/src/date.mjs +8 -8
- package/es/packages/components/form/src/date.mjs.map +1 -1
- package/es/packages/components/form/src/index.mjs +2 -2
- package/es/packages/components/form/src/index.mjs.map +1 -1
- package/es/packages/components/form/utils/index.mjs +26 -11
- package/es/packages/components/form/utils/index.mjs.map +1 -1
- package/es/src/components/form/types/components.d.ts +1 -1
- package/es/style.css +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/src/components/form/types/components.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as d, ref as o, watch as c, createVNode as i, resolveComponent as g, mergeProps as f, Fragment as m } from "vue";
|
|
2
2
|
import { getUuid as p } from "../../../utils/tools.mjs";
|
|
3
|
-
import
|
|
3
|
+
import s from "lodash";
|
|
4
4
|
import "../../../assets/scss/dinert-dialog.scss.mjs";
|
|
5
5
|
import "../../../assets/fonts/iconfont.mjs";
|
|
6
|
-
const
|
|
6
|
+
const u = (e) => {
|
|
7
7
|
const t = {
|
|
8
8
|
width: "65%",
|
|
9
9
|
height: "auto"
|
|
@@ -18,36 +18,36 @@ const h = (e) => {
|
|
|
18
18
|
},
|
|
19
19
|
emits: ["update:fullscreen"],
|
|
20
20
|
setup(e, t) {
|
|
21
|
-
const
|
|
21
|
+
const r = "dialog_" + p(), a = {
|
|
22
22
|
title: "弹窗标题",
|
|
23
23
|
closeOnClickModal: !1,
|
|
24
24
|
closeOnPressEscape: !0,
|
|
25
25
|
appendToBody: !0
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, l = o(!1), h = () => {
|
|
27
|
+
l.value = !l.value, t.emit("update:fullscreen", l.value);
|
|
28
28
|
};
|
|
29
29
|
return c(() => e.fullscreen, (n) => {
|
|
30
|
-
|
|
30
|
+
l.value = n;
|
|
31
31
|
}, {
|
|
32
32
|
deep: !0,
|
|
33
33
|
immediate: !0
|
|
34
34
|
}), {
|
|
35
|
-
uuid:
|
|
36
|
-
defaultAttrs:
|
|
37
|
-
fullToggle:
|
|
38
|
-
currentFullScreen:
|
|
35
|
+
uuid: r,
|
|
36
|
+
defaultAttrs: a,
|
|
37
|
+
fullToggle: h,
|
|
38
|
+
currentFullScreen: l
|
|
39
39
|
};
|
|
40
40
|
},
|
|
41
41
|
render() {
|
|
42
|
-
var
|
|
43
|
-
const e = this.$slots, t =
|
|
42
|
+
var r, a;
|
|
43
|
+
const e = this.$slots, t = s.defaultsDeep(s.cloneDeep({
|
|
44
44
|
...this.$attrs,
|
|
45
45
|
class: this.$attrs.modalClass ? "dialog_" + this.$attrs.modalClass : "",
|
|
46
46
|
modalClass: `${this.uuid} el-overlay dinert-dialog ${this.$attrs.modalClass || ""}`,
|
|
47
|
-
width:
|
|
47
|
+
width: u(this.$attrs).width,
|
|
48
48
|
style: {
|
|
49
|
-
...(
|
|
50
|
-
height: this.currentFullScreen ? void 0 :
|
|
49
|
+
...(r = this.$attrs) == null ? void 0 : r.style,
|
|
50
|
+
height: this.currentFullScreen ? void 0 : u(this.$attrs).height
|
|
51
51
|
}
|
|
52
52
|
}), this.defaultAttrs);
|
|
53
53
|
return i("div", null, [i(g("el-dialog"), f({
|
|
@@ -74,10 +74,10 @@ const h = (e) => {
|
|
|
74
74
|
"xlink:href": this.currentFullScreen ? "#icon-tuichuquanping" : "#icon-quanping"
|
|
75
75
|
}, null)])])]);
|
|
76
76
|
},
|
|
77
|
-
footer: () => {
|
|
77
|
+
footer: (a = e.footer) != null && a.call(e) ? () => {
|
|
78
78
|
var l;
|
|
79
79
|
return (l = e.footer) == null ? void 0 : l.call(e);
|
|
80
|
-
}
|
|
80
|
+
} : null
|
|
81
81
|
})]);
|
|
82
82
|
}
|
|
83
83
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/dialog/src/index.tsx"],"sourcesContent":["import {defineComponent, watch, ref} from 'vue'\nimport {getUuid} from '@packages/utils/tools'\nimport lodash from 'lodash'\nimport type {RewriteDialogProps, GETWH} from '../types'\nimport '@packages/assets/scss/dinert-dialog.scss'\nimport '@packages/assets/fonts/iconfont.js'\n\nconst getWH = (options: RewriteDialogProps): GETWH => {\n const result: GETWH = {\n width: '65%',\n height: 'auto'\n }\n if (options.size === 'large') {\n result.width = 940\n result.height = 706\n } else if (options.size === 'small') {\n result.width = 482\n result.height = 362\n } else if (options.size === 'medium') {\n result.width = 720\n result.height = 440\n }\n\n result.width = options.width ? options.width : result.width\n result.height = options.height ? options.height : result.height\n result.height = String(result.height).replace('px', '') + 'px'\n\n return result\n}\n\n\nexport default defineComponent({\n name: 'dinert-dialog',\n props: {\n fullscreen: {\n type: Boolean,\n }\n },\n emits: ['update:fullscreen'],\n setup(props, ctx) {\n\n const uuid = 'dialog_' + getUuid()\n const defaultAttrs = {\n title: '弹窗标题',\n closeOnClickModal: false,\n closeOnPressEscape: true,\n appendToBody: true,\n }\n const currentFullScreen = ref(false)\n\n const fullToggle = () => {\n currentFullScreen.value = !currentFullScreen.value\n ctx.emit('update:fullscreen', currentFullScreen.value)\n }\n\n watch(() => props.fullscreen, newVal => {\n currentFullScreen.value = newVal\n }, {\n deep: true,\n immediate: true\n })\n\n return {\n uuid,\n defaultAttrs,\n fullToggle,\n currentFullScreen\n }\n },\n render() {\n const slots = this.$slots\n\n const attrs = lodash.defaultsDeep(lodash.cloneDeep({\n ...this.$attrs,\n class: this.$attrs.modalClass ? 'dialog_' + this.$attrs.modalClass : '',\n modalClass: `${this.uuid} el-overlay dinert-dialog ${this.$attrs.modalClass || ''}`,\n width: getWH(this.$attrs).width,\n style: {\n ...(this.$attrs?.style as any),\n height: this.currentFullScreen ? undefined : getWH(this.$attrs).height,\n }\n }), this.defaultAttrs)\n\n return (\n <div>\n <el-dialog el-dialog {...attrs} fullscreen={this.currentFullScreen}>\n {{\n default: () => slots.default?.(),\n header: () => {\n return (\n <>\n <span role=\"heading\" class=\"el-dialog__title\">\n { slots.header?.() || attrs.title }\n </span>\n\n <span class=\"full\" onClick={this.fullToggle}>\n <svg class=\"icon\" aria-hidden=\"true\">\n <use xlink:href={this.currentFullScreen ? '#icon-tuichuquanping' : '#icon-quanping'}></use>\n </svg>\n </span>\n </>\n )\n },\n footer: () => slots.footer?.(),\n }}\n </el-dialog>\n </div>\n )\n }\n}) as RewriteDialogProps\n\n"],"names":["getWH","options","result","width","height","size","String","replace","defineComponent","name","props","fullscreen","type","Boolean","emits","setup","ctx","uuid","getUuid","defaultAttrs","title","closeOnClickModal","closeOnPressEscape","appendToBody","currentFullScreen","ref","fullToggle","value","emit","watch","newVal","deep","immediate","render","slots","$slots","attrs","lodash","defaultsDeep","cloneDeep","$attrs","class","modalClass","style","_a","undefined","_createVNode","_resolveComponent","_mergeProps","default","header","_Fragment","footer"],"mappings":";;;;;AAOA,MAAMA,IAASC,CAAAA,MAAuC;AAClD,QAAMC,IAAgB;AAAA,IAClBC,OAAO;AAAA,IACPC,QAAQ;AAAA;AAEZ,SAAIH,EAAQI,SAAS,WACjBH,EAAOC,QAAQ,KACfD,EAAOE,SAAS,OACTH,EAAQI,SAAS,WACxBH,EAAOC,QAAQ,KACfD,EAAOE,SAAS,OACTH,EAAQI,SAAS,aACxBH,EAAOC,QAAQ,KACfD,EAAOE,SAAS,MAGpBF,EAAOC,QAAQF,EAAQE,QAAQF,EAAQE,QAAQD,EAAOC,OACtDD,EAAOE,SAASH,EAAQG,SAASH,EAAQG,SAASF,EAAOE,QACzDF,EAAOE,SAASE,OAAOJ,EAAOE,MAAM,EAAEG,QAAQ,MAAM,EAAE,IAAI,MAEnDL;AACX,GAGeM,sBAAgB;AAAA,EAC3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MAAAA,CAAAA,EAAAC,gBAAAC,EAAA;AAAA,MAAA,aAAA;AAAA,IAAA,GAEiCZ,GAAK;AAAA,MAAA,YAAc,KAAKZ;AAAAA,IAAiB,CAAA,GAAA;AAAA,MAE1DyB,SAASA,MAAAA;;AAAMf,gBAAAA,IAAAA,EAAMe,YAANf,gBAAAA,EAAAA,KAAAA;AAAAA;AAAAA,MACfgB,QAAQA,MAAM;;AACV,eAAAJ,EAAAK,GAAA,MAAA,CAAAL,EAAA,QAAA;AAAA,UAAA,MAAA;AAAA,UAAA,OAAA;AAAA,WAGcZ,GAAAA,IAAAA,EAAMgB,WAANhB,gBAAAA,EAAAA,KAAAA,OAAoBE,EAAMhB,KAAK,CAAA,GAAA0B,EAAA,QAAA;AAAA,UAAA,OAAA;AAAA,UAAA,SAGT,KAAKpB;AAAAA,QAAU,GAAA,CAAAoB,EAAA,OAAA;AAAA,UAAA,OAAA;AAAA,UAAA,eAAA;AAAA,QAAA,GAAA,CAAAA,EAAA,OAAA;AAAA,UAAA,cAElB,KAAKtB,oBAAoB,yBAAyB;AAAA,QAAgB,GAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,MAKtG;AAAA,MACD4B,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/dialog/src/index.tsx"],"sourcesContent":["import {defineComponent, watch, ref} from 'vue'\nimport {getUuid} from '@packages/utils/tools'\nimport lodash from 'lodash'\nimport type {RewriteDialogProps, GETWH} from '../types'\nimport '@packages/assets/scss/dinert-dialog.scss'\nimport '@packages/assets/fonts/iconfont.js'\n\nconst getWH = (options: RewriteDialogProps): GETWH => {\n const result: GETWH = {\n width: '65%',\n height: 'auto'\n }\n if (options.size === 'large') {\n result.width = 940\n result.height = 706\n } else if (options.size === 'small') {\n result.width = 482\n result.height = 362\n } else if (options.size === 'medium') {\n result.width = 720\n result.height = 440\n }\n\n result.width = options.width ? options.width : result.width\n result.height = options.height ? options.height : result.height\n result.height = String(result.height).replace('px', '') + 'px'\n\n return result\n}\n\n\nexport default defineComponent({\n name: 'dinert-dialog',\n props: {\n fullscreen: {\n type: Boolean,\n }\n },\n emits: ['update:fullscreen'],\n setup(props, ctx) {\n\n const uuid = 'dialog_' + getUuid()\n const defaultAttrs = {\n title: '弹窗标题',\n closeOnClickModal: false,\n closeOnPressEscape: true,\n appendToBody: true,\n }\n const currentFullScreen = ref(false)\n\n const fullToggle = () => {\n currentFullScreen.value = !currentFullScreen.value\n ctx.emit('update:fullscreen', currentFullScreen.value)\n }\n\n watch(() => props.fullscreen, newVal => {\n currentFullScreen.value = newVal\n }, {\n deep: true,\n immediate: true\n })\n\n return {\n uuid,\n defaultAttrs,\n fullToggle,\n currentFullScreen\n }\n },\n render() {\n const slots = this.$slots\n\n const attrs = lodash.defaultsDeep(lodash.cloneDeep({\n ...this.$attrs,\n class: this.$attrs.modalClass ? 'dialog_' + this.$attrs.modalClass : '',\n modalClass: `${this.uuid} el-overlay dinert-dialog ${this.$attrs.modalClass || ''}`,\n width: getWH(this.$attrs).width,\n style: {\n ...(this.$attrs?.style as any),\n height: this.currentFullScreen ? undefined : getWH(this.$attrs).height,\n }\n }), this.defaultAttrs)\n\n return (\n <div>\n <el-dialog el-dialog {...attrs} fullscreen={this.currentFullScreen}>\n {{\n default: () => slots.default?.(),\n header: () => {\n return (\n <>\n <span role=\"heading\" class=\"el-dialog__title\">\n { slots.header?.() || attrs.title }\n </span>\n\n <span class=\"full\" onClick={this.fullToggle}>\n <svg class=\"icon\" aria-hidden=\"true\">\n <use xlink:href={this.currentFullScreen ? '#icon-tuichuquanping' : '#icon-quanping'}></use>\n </svg>\n </span>\n </>\n )\n },\n footer: slots.footer?.() ? () => slots.footer?.() : null,\n }}\n </el-dialog>\n </div>\n )\n }\n}) as RewriteDialogProps\n\n"],"names":["getWH","options","result","width","height","size","String","replace","defineComponent","name","props","fullscreen","type","Boolean","emits","setup","ctx","uuid","getUuid","defaultAttrs","title","closeOnClickModal","closeOnPressEscape","appendToBody","currentFullScreen","ref","fullToggle","value","emit","watch","newVal","deep","immediate","render","slots","$slots","attrs","lodash","defaultsDeep","cloneDeep","$attrs","class","modalClass","style","_a","undefined","_createVNode","_resolveComponent","_mergeProps","default","header","_Fragment","footer"],"mappings":";;;;;AAOA,MAAMA,IAASC,CAAAA,MAAuC;AAClD,QAAMC,IAAgB;AAAA,IAClBC,OAAO;AAAA,IACPC,QAAQ;AAAA;AAEZ,SAAIH,EAAQI,SAAS,WACjBH,EAAOC,QAAQ,KACfD,EAAOE,SAAS,OACTH,EAAQI,SAAS,WACxBH,EAAOC,QAAQ,KACfD,EAAOE,SAAS,OACTH,EAAQI,SAAS,aACxBH,EAAOC,QAAQ,KACfD,EAAOE,SAAS,MAGpBF,EAAOC,QAAQF,EAAQE,QAAQF,EAAQE,QAAQD,EAAOC,OACtDD,EAAOE,SAASH,EAAQG,SAASH,EAAQG,SAASF,EAAOE,QACzDF,EAAOE,SAASE,OAAOJ,EAAOE,MAAM,EAAEG,QAAQ,MAAM,EAAE,IAAI,MAEnDL;AACX,GAGeM,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,YAAY;AAAA,MACRC,MAAMC;AAAAA,IACV;AAAA,EACH;AAAA,EACDC,OAAO,CAAC,mBAAmB;AAAA,EAC3BC,MAAML,GAAOM,GAAK;AAEd,UAAMC,IAAO,YAAYC,KACnBC,IAAe;AAAA,MACjBC,OAAO;AAAA,MACPC,mBAAmB;AAAA,MACnBC,oBAAoB;AAAA,MACpBC,cAAc;AAAA,OAEZC,IAAoBC,EAAI,EAAK,GAE7BC,IAAaA,MAAM;AACrBF,MAAAA,EAAkBG,QAAQ,CAACH,EAAkBG,OAC7CX,EAAIY,KAAK,qBAAqBJ,EAAkBG,KAAK;AAAA;AAGzDE,WAAAA,EAAM,MAAMnB,EAAMC,YAAYmB,CAAAA,MAAU;AACpCN,MAAAA,EAAkBG,QAAQG;AAAAA,IAC9B,GAAG;AAAA,MACCC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;AAAA,UAAA,OAAA;AAAA,UAAA,eAAA;AAAA,QAAA,GAAA,CAAAA,EAAA,OAAA;AAAA,UAAA,cAElB,KAAKtB,oBAAoB,yBAAyB;AAAA,QAAgB,GAAA,IAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,MAKtG;AAAA,MACD4B,SAAQlB,IAAAA,EAAMkB,WAANlB,QAAAA,EAAAA,KAAAA,KAAmB,MAAA;;AAAMA,gBAAAA,IAAAA,EAAMkB,WAANlB,gBAAAA,EAAAA,KAAAA;AAAAA,UAAmB;AAAA,IAAI,CAAA,CAAA,CAAA;AAAA,EAK5E;AACJ,CAAC;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Calendar as
|
|
1
|
+
import { defineComponent as i, computed as s, createVNode as a, resolveComponent as l, mergeProps as m } from "vue";
|
|
2
|
+
import { Calendar as d } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
3
3
|
import { customPlaceholder as r } from "../utils/index.mjs";
|
|
4
4
|
const n = (e, o) => {
|
|
5
5
|
const t = o.type;
|
|
6
6
|
return ["week"].includes(t) ? "周" : ["month", "monthrange"].includes(t) ? "月份" : ["year", "yearrange"].includes(t) ? "年份" : "时间";
|
|
7
|
-
},
|
|
7
|
+
}, p = (e) => ["datetime", "datetimerange"].includes(e.type) ? "YYYY-MM-DD HH:mm:ss" : e.type === "year" ? "YYYY" : ["month", "monthrange"].includes(e.type) ? "YYYY-MM" : ["date", "daterange", "dates"].includes(e.type) ? "YYYY-MM-DD" : "", h = /* @__PURE__ */ i({
|
|
8
8
|
name: "dinert-date",
|
|
9
9
|
props: {
|
|
10
10
|
form: {
|
|
@@ -18,22 +18,22 @@ const n = (e, o) => {
|
|
|
18
18
|
},
|
|
19
19
|
setup(e) {
|
|
20
20
|
return {
|
|
21
|
-
options:
|
|
21
|
+
options: s(() => {
|
|
22
22
|
const t = e.formItem.options || {};
|
|
23
|
-
return t.type = e.formItem.type, t;
|
|
23
|
+
return t.type = e.formItem.type, t.defaultTime = t.defaultTime || (["datetimerange"].includes(t.type) ? [new Date(2e3, 1, 1, 0, 0, 0), new Date(2e3, 1, 1, 23, 59, 59)] : t.defaultTime), t;
|
|
24
24
|
})
|
|
25
25
|
};
|
|
26
26
|
},
|
|
27
27
|
render() {
|
|
28
|
-
return l(
|
|
28
|
+
return a(l("el-date-picker"), m({
|
|
29
29
|
modelValue: this.form.model[this.formItem.key],
|
|
30
30
|
"onUpdate:modelValue": (e) => this.form.model[this.formItem.key] = e,
|
|
31
|
-
prefixIcon:
|
|
31
|
+
prefixIcon: d,
|
|
32
32
|
clearable: !0,
|
|
33
33
|
startPlaceholder: r(n(typeof this.options.label == "function" ? this.options.label(this.form.model) : this.options.label, this.options), "input", "开始"),
|
|
34
34
|
endPlaceholder: r(n(typeof this.options.label == "function" ? this.options.label(this.form.model) : this.options.label, this.options), "input", "结束"),
|
|
35
35
|
"unlink-panels": !0,
|
|
36
|
-
valueFormat:
|
|
36
|
+
valueFormat: p(this.options),
|
|
37
37
|
format: this.options.type === "week" ? "YYYY第ww周" : this.options.format
|
|
38
38
|
}, this.options), this.$slots);
|
|
39
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.mjs","sources":["../../../../../packages/components/form/src/date.tsx"],"sourcesContent":["import {computed, defineComponent} from 'vue'\nimport {Calendar} from '@element-plus/icons-vue'\nimport {customPlaceholder} from '../utils'\n\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\n\nconst datePickerPlaceholder = (_label: string, item: any) => {\n const type = item.type\n if (['week'].includes(type)) {\n return '周'\n } else if (['month', 'monthrange'].includes(type)) {\n return '月份'\n } else if (['year', 'yearrange'].includes(type)) {\n return '年份'\n }\n return '时间'\n}\n\nconst customValuFormat = (options: any): string => {\n if (['datetime', 'datetimerange'].includes(options.type)) {\n return 'YYYY-MM-DD HH:mm:ss'\n } else if (options.type === 'year') {\n return 'YYYY'\n } else if (['month', 'monthrange'].includes(options.type)) {\n return 'YYYY-MM'\n } else if (['date', 'daterange', 'dates'].includes(options.type)) {\n return 'YYYY-MM-DD'\n }\n return ''\n}\nexport default defineComponent({\n name: 'dinert-date',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['date']>(() => {\n const options = props.formItem.options || {}\n options.type = props.formItem.type\n\n return options\n })\n\n return {\n options\n }\n },\n render() {\n\n return (\n <el-date-picker\n v-model={this.form.model[this.formItem.key]}\n prefixIcon={Calendar}\n clearable\n startPlaceholder={customPlaceholder(datePickerPlaceholder(typeof this.options.label === 'function' ? this.options.label(this.form.model) : this.options.label, this.options), 'input', '开始')}\n endPlaceholder={customPlaceholder(datePickerPlaceholder(typeof this.options.label === 'function' ? this.options.label(this.form.model) : this.options.label, this.options), 'input', '结束')}\n unlink-panels={true}\n valueFormat={customValuFormat(this.options)}\n format={this.options.type === 'week' ? 'YYYY第ww周' : this.options.format}\n {...this.options}\n v-slots={this.$slots}\n >\n </el-date-picker>\n )\n }\n})\n\n"],"names":["datePickerPlaceholder","_label","item","type","includes","customValuFormat","options","defineComponent","name","props","form","Object","default","formItem","setup","computed","render","_createVNode","_resolveComponent","_mergeProps","model","key","$event","Calendar","customPlaceholder","label","format","$slots"],"mappings":";;;AASA,MAAMA,IAAwBA,CAACC,GAAgBC,MAAc;AACzD,QAAMC,IAAOD,EAAKC;AAClB,SAAI,CAAC,MAAM,EAAEC,SAASD,CAAI,IACf,MACA,CAAC,SAAS,YAAY,EAAEC,SAASD,CAAI,IACrC,OACA,CAAC,QAAQ,WAAW,EAAEC,SAASD,CAAI,IACnC,OAEJ;AACX,GAEME,IAAoBC,CAAAA,MAClB,CAAC,YAAY,eAAe,EAAEF,SAASE,EAAQH,IAAI,IAC5C,wBACAG,EAAQH,SAAS,SACjB,SACA,CAAC,SAAS,YAAY,EAAEC,SAASE,EAAQH,IAAI,IAC7C,YACA,CAAC,QAAQ,aAAa,OAAO,EAAEC,SAASE,EAAQH,IAAI,IACpD,eAEJ,IAEII,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFP,MAAMQ;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNV,MAAMQ;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAML,GAAO;AAST,WAAO;AAAA,MACHH,SARYS,EAAiE,MAAM;AACnF,cAAMT,IAAUG,EAAMI,SAASP,WAAW,CAAA;AAC1CA,eAAAA,EAAQH,OAAOM,EAAMI,SAASV,
|
|
1
|
+
{"version":3,"file":"date.mjs","sources":["../../../../../packages/components/form/src/date.tsx"],"sourcesContent":["import {computed, defineComponent} from 'vue'\nimport {Calendar} from '@element-plus/icons-vue'\nimport {customPlaceholder} from '../utils'\n\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\n\nconst datePickerPlaceholder = (_label: string, item: any) => {\n const type = item.type\n if (['week'].includes(type)) {\n return '周'\n } else if (['month', 'monthrange'].includes(type)) {\n return '月份'\n } else if (['year', 'yearrange'].includes(type)) {\n return '年份'\n }\n return '时间'\n}\n\nconst customValuFormat = (options: any): string => {\n if (['datetime', 'datetimerange'].includes(options.type)) {\n return 'YYYY-MM-DD HH:mm:ss'\n } else if (options.type === 'year') {\n return 'YYYY'\n } else if (['month', 'monthrange'].includes(options.type)) {\n return 'YYYY-MM'\n } else if (['date', 'daterange', 'dates'].includes(options.type)) {\n return 'YYYY-MM-DD'\n }\n return ''\n}\nexport default defineComponent({\n name: 'dinert-date',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n formItem: {\n type: Object as PropType<CustomFormItemProps>,\n default: () => ({})\n },\n },\n setup(props) {\n\n const options = computed<CustomFormItemProps[keyof CustomFormItemProps]['date']>(() => {\n const options = props.formItem.options || {}\n options.type = props.formItem.type\n options.defaultTime = options.defaultTime || (['datetimerange'].includes(options.type) ? [new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)] : options.defaultTime)\n return options\n })\n\n return {\n options\n }\n },\n render() {\n\n return (\n <el-date-picker\n v-model={this.form.model[this.formItem.key]}\n prefixIcon={Calendar}\n clearable\n startPlaceholder={customPlaceholder(datePickerPlaceholder(typeof this.options.label === 'function' ? this.options.label(this.form.model) : this.options.label, this.options), 'input', '开始')}\n endPlaceholder={customPlaceholder(datePickerPlaceholder(typeof this.options.label === 'function' ? this.options.label(this.form.model) : this.options.label, this.options), 'input', '结束')}\n unlink-panels={true}\n valueFormat={customValuFormat(this.options)}\n format={this.options.type === 'week' ? 'YYYY第ww周' : this.options.format}\n {...this.options}\n v-slots={this.$slots}\n >\n </el-date-picker>\n )\n }\n})\n\n"],"names":["datePickerPlaceholder","_label","item","type","includes","customValuFormat","options","defineComponent","name","props","form","Object","default","formItem","setup","computed","defaultTime","Date","render","_createVNode","_resolveComponent","_mergeProps","model","key","$event","Calendar","customPlaceholder","label","format","$slots"],"mappings":";;;AASA,MAAMA,IAAwBA,CAACC,GAAgBC,MAAc;AACzD,QAAMC,IAAOD,EAAKC;AAClB,SAAI,CAAC,MAAM,EAAEC,SAASD,CAAI,IACf,MACA,CAAC,SAAS,YAAY,EAAEC,SAASD,CAAI,IACrC,OACA,CAAC,QAAQ,WAAW,EAAEC,SAASD,CAAI,IACnC,OAEJ;AACX,GAEME,IAAoBC,CAAAA,MAClB,CAAC,YAAY,eAAe,EAAEF,SAASE,EAAQH,IAAI,IAC5C,wBACAG,EAAQH,SAAS,SACjB,SACA,CAAC,SAAS,YAAY,EAAEC,SAASE,EAAQH,IAAI,IAC7C,YACA,CAAC,Q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AAK,IAAI,KAAKhB,QAAQqB,OAAO,KAAKrB,OAAO,GAAG,SAAS,IAAI;AAAA,MAAC,iBAC3K;AAAA,MAAI,aACND,EAAiB,KAAKC,OAAO;AAAA,MAAC,QACnC,KAAKA,QAAQH,SAAS,SAAS,aAAa,KAAKG,QAAQsB;AAAAA,IAAM,GACnE,KAAKtB,OAAO,GACP,KAAKuB,MAAM;AAAA,EAIhC;AACJ,CAAC;"}
|
|
@@ -93,7 +93,7 @@ const we = /* @__PURE__ */ $({
|
|
|
93
93
|
let i = e.rules || [];
|
|
94
94
|
i = e.required ? [{
|
|
95
95
|
required: !0,
|
|
96
|
-
trigger: "blur",
|
|
96
|
+
trigger: ["blur", "change"],
|
|
97
97
|
message: S(typeof e.label == "function" ? e.label(this.form.model) : e.label, e.type)
|
|
98
98
|
}].concat(i) : i, i = e.showLabel ? [] : i;
|
|
99
99
|
const b = e.showLabel ? !0 : e.tempValueDisabled;
|
|
@@ -145,7 +145,7 @@ const we = /* @__PURE__ */ $({
|
|
|
145
145
|
if (e.showLabel || this.form.showLabel && [!0, void 0].includes(e.showLabel))
|
|
146
146
|
return l;
|
|
147
147
|
if (["input", "textarea"].includes(e.type)) {
|
|
148
|
-
const
|
|
148
|
+
const g = (p = (c = this.$slots)[m(e.key + "_append")]) == null ? void 0 : p.call(c), _ = g && g[0] && g[0].children, v = (I = (d = this.$slots)[m(e.key + "_prepend")]) == null ? void 0 : I.call(d), R = v && v[0] && v[0].children;
|
|
149
149
|
_ && (r.append = () => {
|
|
150
150
|
var h, y;
|
|
151
151
|
return (y = (h = this.$slots)[m(e.key + "_append")]) == null ? void 0 : y.call(h);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/form/src/index.tsx"],"sourcesContent":["import {defineComponent, ref, computed, nextTick, toRefs} from 'vue'\nimport CustomInput from './input'\nimport CustomInputNumber from './input-number'\nimport CustomInputAutocomplete from './input-autocomplete'\nimport CustomSelect from './select'\nimport CustomSelectV2 from './select-v2'\nimport CustomSwitch from './switch'\nimport CustomDate from './date'\nimport CustomRadio from './radio'\nimport CustomSelectTree from './tree-select'\nimport CustomRate from './rate'\nimport CustomCheckbox from './checkbox'\nimport CustomCascader from './cascader'\n\nimport useWindowResize from '@packages/hooks/useWindowResize'\nimport {labelMouseEnter, valueMouseEnter, getTooltipValue, formItemSlot, customPlaceholder} from '@packages/components/form/utils'\n\nimport {dataTransformRod, getUuid} from '@packages/utils/tools'\nimport {ElForm} from 'element-plus'\n\nimport {ArrowUp, ArrowDown} from '@element-plus/icons-vue'\n\n\nimport '@packages/assets/scss/dinert-form.scss'\n\nimport type {PropType} from 'vue'\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\n\n// 展开还是收起状态\nexport default defineComponent({\n name: 'dinert-form',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n search: {\n type: Boolean,\n default: true\n }\n },\n emits: ['UnFold', 'SearchFn', 'ResetFn'],\n setup(props, {emit}) {\n\n const {form} = toRefs(props)\n const packUp = ref(form.value.packUp === undefined)\n const isArrow = ref(false)\n const formRef = ref<InstanceType<typeof ElForm>>()\n const formClass = ref('form_' + getUuid())\n const formItemMap = computed(() => {\n let index = 0\n const result: any = []\n Object.keys(form.value.formItem).forEach(key => {\n const value = form.value.formItem[key] as Partial<CustomFormItemProps>\n result.push({\n ...value,\n key: key,\n sort: typeof value.sort === 'undefined' ? index : value.sort,\n })\n index += 10\n })\n\n result.sort((a: any, b: any) => {\n return a.sort - b.sort\n })\n\n return result\n })\n\n const resizeForm = () => {\n let elFormLeft = document.querySelectorAll(`.${formClass.value} .el-form-left > div`) as any\n if (elFormLeft[0]) {\n isArrow.value = false\n nextTick(() => {\n const firstTop = elFormLeft[0].getBoundingClientRect().top\n const lastTop = elFormLeft[elFormLeft.length - 1].getBoundingClientRect().top\n const isHeight = firstTop !== lastTop\n if (isHeight) {\n isArrow.value = true\n } else {\n if (!packUp.value) {\n packUp.value = true\n }\n isArrow.value = false\n }\n elFormLeft = null\n })\n\n }\n }\n\n useWindowResize(() => {\n resizeForm()\n }, 100, true)\n\n\n const unfold = () => {\n if (packUp.value) {\n packUp.value = false\n } else {\n packUp.value = true\n }\n\n emit('UnFold', packUp.value)\n }\n\n\n return {\n formItemMap,\n unfold,\n formClass,\n\n formRef,\n packUp,\n isArrow\n }\n },\n render() {\n return (\n <el-form inline={true}\n {...this.form}\n ref={el => {this.formRef = el}}\n class={[this.formClass, this.packUp ? '' : 'packUp', 'dinert-form']}>\n <el-row {...this.form.row} class=\"el-form-left\">\n {/* eslint-disable-next-line array-callback-return, consistent-return */}\n { this.formItemMap.map((item: CustomFormItemProps) => {\n const style: any = {}\n let vif = typeof item.vif === 'function' ? item.vif(this.form.model) : item.vif\n vif = vif === undefined ? true : vif\n\n let show = typeof item.show === 'function' ? item.show(this.form.model) : item.show\n show = show === undefined ? true : show\n item.options = {placeholder: customPlaceholder(typeof item.label === 'function' ? item.label(this.form.model) : item.label, item.type), ...item.options}\n\n\n if (!show) {\n style.display = 'none'\n }\n if (vif) {\n item.required = item.required === undefined ? item.required || this.form.required : item.required\n item.showLabel = item.showLabel === undefined ? item.showLabel || this.form.showLabel : item.showLabel\n\n let rules = item.rules || []\n rules = item.required ? [{required: true, trigger: 'blur', message: customPlaceholder(typeof item.label === 'function' ? item.label(this.form.model) : item.label, item.type)}].concat(rules as any) : rules\n rules = item.showLabel ? [] : rules\n const valDisabled = item.showLabel ? true : item.tempValueDisabled\n\n return (\n <el-col\n style= {style}\n class={[item.type, item.key]}\n key={item.key}\n {\n ...{\n // xl: 3, // ≥1920px\n // lg: 4, // ≥1200px\n // md: 8, // ≥992px\n // sm: 12, // ≥768px\n // xs: 24, // <768px\n ...this.form.colLayout,\n ...item.colLayout\n }\n }\n >\n <el-form-item\n key={item.key}\n prop={item.key}\n class={[item.labelWrap ? 'label-wrap' : '', item.showLabel || this.form.showLabel ? 'show-label' : '']}\n {...{\n ...item,\n label: typeof item.label === 'function' ? item.label(this.form.model) : item.label,\n rules: rules\n }}\n v-slots={{\n label: () => {\n return (\n <dinert-tooltip\n key={item.key}\n content={typeof item.label === 'function' ? item.label(this.form.model) : item.label}\n disabled={item.labelDisabled}\n onLabelMouseEnter={(e: MouseEvent) => labelMouseEnter(e, item, this)}\n >\n </dinert-tooltip>\n )\n },\n default: () => {\n return (\n <dinert-tooltip\n key={item.key}\n content={String(getTooltipValue(this.form.model[item.key], item))}\n disabled={valDisabled}\n item={item}\n onLabelMouseEnter={(e: MouseEvent) => valueMouseEnter(e, item, this.form.model[item.key], this)}\n v-slots={\n {\n default: () => {\n\n\n const slots: any = {}\n\n let componentResult = <span>{dataTransformRod(this.form.model[item.key])}</span>\n\n\n if (this.$slots[formItemSlot(item.key)]) {\n componentResult = (this.$slots[formItemSlot(item.key)]?.({...item, model: this.form.model}))\n } else if (item.showLabel || (this.form.showLabel && [true, undefined].includes(item.showLabel))) {\n return componentResult\n } else if (['input', 'textarea'].includes(item.type)) {\n const appendSlot = this.$slots[formItemSlot(item.key + '_append')]?.()\n const appendSlotValue = appendSlot && appendSlot[0] && appendSlot[0].children\n\n const prependSlot = this.$slots[formItemSlot(item.key + '_prepend')]?.()\n const prependSlotValue = prependSlot && prependSlot[0] && prependSlot[0].children\n if (appendSlotValue) {\n slots.append = () => this.$slots[formItemSlot(item.key + '_append')]?.()\n }\n if (prependSlotValue) {\n slots.prepend = () => this.$slots[formItemSlot(item.key + '_prepend')]?.()\n }\n componentResult = (<CustomInput form={this.form} formItem={item} v-slots={slots}></CustomInput>)\n } else if (['input-number'].includes(item.type)) {\n componentResult = (<CustomInputNumber form={this.form} formItem={item}></CustomInputNumber>)\n } else if (['input-autocomplete'].includes(item.type)) {\n componentResult = (<CustomInputAutocomplete form={this.form} formItem={item}></CustomInputAutocomplete>)\n } else if (['select'].includes(item.type)) {\n componentResult = (<CustomSelect form={this.form} formItem={item}></CustomSelect>)\n } else if (['select-v2'].includes(item.type)) {\n componentResult = (<CustomSelectV2 form={this.form} formItem={item}></CustomSelectV2>)\n } else if (['switch'].includes(item.type)) {\n componentResult = (<CustomSwitch form={this.form} formItem={item}></CustomSwitch>)\n } else if ([\n 'datetime',\n 'date',\n 'dates',\n 'week',\n 'month',\n 'year',\n 'years',\n 'datetimerange',\n 'daterange',\n 'monthrange',\n 'yearrange',\n ].includes(item.type)) {\n componentResult = (<CustomDate form={this.form} formItem={item}></CustomDate>)\n } else if (['radio', 'radio-button'].includes(item.type)) {\n componentResult = (<CustomRadio form={this.form} formItem={item}></CustomRadio>)\n } else if (['tree-select'].includes(item.type)) {\n componentResult = (<CustomSelectTree form={this.form} formItem={item}></CustomSelectTree>)\n } else if (['rate'].includes(item.type)) {\n componentResult = (<CustomRate form={this.form} formItem={item}></CustomRate>)\n } else if (['checkbox', 'checkbox-button'].includes(item.type)) {\n componentResult = (<CustomCheckbox form={this.form} formItem={item}></CustomCheckbox>)\n } else if (['cascader'].includes(item.type)) {\n componentResult = (<CustomCascader form={this.form} formItem={item}></CustomCascader>)\n }\n\n\n return componentResult\n },\n defaultAfter: () => this.$slots[formItemSlot('after_' + item.key)]?.({...item, model: this.form.model}),\n defaultBefore: () => this.$slots[formItemSlot('before_' + item.key)]?.({...item, model: this.form.model}),\n }\n }\n >\n </dinert-tooltip>\n )\n }\n }}\n >\n </el-form-item>\n </el-col>\n )\n }\n\n })\n }\n </el-row>\n {\n this.search\n && <el-row class={['el-form-right', this.isArrow ? 'isArrow' : '']}>\n {this.isArrow\n && <el-button class=\"el-form-right-operation\" text type=\"primary\"\n onClick={this.unfold}\n >\n <el-icon>\n {this.packUp ? <ArrowUp/> : <ArrowDown/>}\n </el-icon>\n {this.packUp ? '收起' : '展开'}\n </el-button>\n }\n {this.$slots.form_search?.()\n || (\n <>\n <el-button type=\"primary\" onClick={() => this.$emit('SearchFn')}>搜索</el-button>\n <el-button type=\"primary\" plain\n onClick={() => this.$emit('ResetFn')}\n >重置</el-button>\n </>\n )\n }\n </el-row>\n }\n </el-form>\n )\n }\n})\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","defineComponent","name","props","form","type","default","search","Boolean","emits","setup","emit","toRefs","packUp","ref","value","undefined","isArrow","formRef","formClass","getUuid","formItemMap","computed","index","result","keys","formItem","forEach","key","push","sort","a","b","resizeForm","elFormLeft","document","querySelectorAll","nextTick","firstTop","getBoundingClientRect","top","lastTop","length","useWindowResize","unfold","render","_slot","_createVNode","_resolveComponent","_mergeProps","el","row","map","item","style","vif","model","show","options","placeholder","customPlaceholder","label","display","required","showLabel","rules","trigger","message","concat","valDisabled","tempValueDisabled","colLayout","labelWrap","labelDisabled","e","labelMouseEnter","String","getTooltipValue","valueMouseEnter","slots","componentResult","dataTransformRod","$slots","formItemSlot","_b","_a","includes","appendSlot","_d","_c","appendSlotValue","children","prependSlot","_f","_e","prependSlotValue","append","prepend","CustomInput","CustomInputNumber","CustomInputAutocomplete","CustomSelect","CustomSelectV2","CustomSwitch","CustomDate","CustomRadio","CustomSelectTree","CustomRate","CustomCheckbox","CustomCascader","defaultAfter","defaultBefore","ArrowUp","ArrowDown","form_search","_Fragment","onClick","$emit","_createTextVNode"],"mappings":";;;;;;;;;;;;;;;;;;AAuB+C,SAAAA,GAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAM/C,MAAeM,uBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,QAAQ;AAAA,MACJF,MAAMG;AAAAA,MACNF,SAAS;AAAA,IACb;AAAA,EACH;AAAA,EACDG,OAAO,CAAC,UAAU,YAAY,SAAS;AAAA,EACvCC,MAAMP,GAAO;AAAA,IAACQ,MAAAA;AAAAA,EAAI,GAAG;AAEjB,UAAM;A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3C,KAAKpG,SAAS,OAAO,IAAI;AAAA,UAAA,CAAA,KAG7BuE,KAAAC,IAAA,KAAKH,QAAOgC,gBAAZ,gBAAA9B,EAAA,KAAAC,OAA2BtC,EAAAoE,GAAApE,MAAAA,CAAAA,EAAAC,EAAA,WAAA,GAAA;AAAA,YAAA,MAAA;AAAA,YAAA,SAGmBoE,MAAM,KAAKC,MAAM,UAAU;AAAA,UAAC,GAAA;AAAA,YAAA/G,SAAAA,MAAA,CAAAgH,EAAA,IAAA,CAAA;AAAA,UAAAvE,CAAAA,GAAAA,EAAAC,EAAA,WAAA,GAAA;AAAA,YAAA,MAAA;AAAA,YAAA,OAAA;AAAA,YAAA,SAElDoE,MAAM,KAAKC,MAAM,SAAS;AAAA,UAAC,GAAA;AAAA,YAAA/G,SAAAA,MAAA,CAAAgH,EAAA,IAAA,CAAA;AAAA,UAG/C,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA,OAEA,CAAA;AAAA,IAAA,CAAA;AAAA,EAIrB;AACJ,CAAC;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/form/src/index.tsx"],"sourcesContent":["import {defineComponent, ref, computed, nextTick, toRefs} from 'vue'\nimport CustomInput from './input'\nimport CustomInputNumber from './input-number'\nimport CustomInputAutocomplete from './input-autocomplete'\nimport CustomSelect from './select'\nimport CustomSelectV2 from './select-v2'\nimport CustomSwitch from './switch'\nimport CustomDate from './date'\nimport CustomRadio from './radio'\nimport CustomSelectTree from './tree-select'\nimport CustomRate from './rate'\nimport CustomCheckbox from './checkbox'\nimport CustomCascader from './cascader'\n\nimport useWindowResize from '@packages/hooks/useWindowResize'\nimport {labelMouseEnter, valueMouseEnter, getTooltipValue, formItemSlot, customPlaceholder} from '@packages/components/form/utils'\n\nimport {dataTransformRod, getUuid} from '@packages/utils/tools'\nimport {ElForm} from 'element-plus'\n\nimport {ArrowUp, ArrowDown} from '@element-plus/icons-vue'\n\n\nimport '@packages/assets/scss/dinert-form.scss'\n\nimport type {PropType} from 'vue'\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\n\n// 展开还是收起状态\nexport default defineComponent({\n name: 'dinert-form',\n props: {\n form: {\n type: Object as PropType<RewriteFormProps>,\n default: () => ({})\n },\n search: {\n type: Boolean,\n default: true\n }\n },\n emits: ['UnFold', 'SearchFn', 'ResetFn'],\n setup(props, {emit}) {\n\n const {form} = toRefs(props)\n const packUp = ref(form.value.packUp === undefined)\n const isArrow = ref(false)\n const formRef = ref<InstanceType<typeof ElForm>>()\n const formClass = ref('form_' + getUuid())\n const formItemMap = computed(() => {\n let index = 0\n const result: any = []\n Object.keys(form.value.formItem).forEach(key => {\n const value = form.value.formItem[key] as Partial<CustomFormItemProps>\n result.push({\n ...value,\n key: key,\n sort: typeof value.sort === 'undefined' ? index : value.sort,\n })\n index += 10\n })\n\n result.sort((a: any, b: any) => {\n return a.sort - b.sort\n })\n\n return result\n })\n\n const resizeForm = () => {\n let elFormLeft = document.querySelectorAll(`.${formClass.value} .el-form-left > div`) as any\n if (elFormLeft[0]) {\n isArrow.value = false\n nextTick(() => {\n const firstTop = elFormLeft[0].getBoundingClientRect().top\n const lastTop = elFormLeft[elFormLeft.length - 1].getBoundingClientRect().top\n const isHeight = firstTop !== lastTop\n if (isHeight) {\n isArrow.value = true\n } else {\n if (!packUp.value) {\n packUp.value = true\n }\n isArrow.value = false\n }\n elFormLeft = null\n })\n\n }\n }\n\n useWindowResize(() => {\n resizeForm()\n }, 100, true)\n\n\n const unfold = () => {\n if (packUp.value) {\n packUp.value = false\n } else {\n packUp.value = true\n }\n\n emit('UnFold', packUp.value)\n }\n\n\n return {\n formItemMap,\n unfold,\n formClass,\n\n formRef,\n packUp,\n isArrow\n }\n },\n render() {\n return (\n <el-form inline={true}\n {...this.form}\n ref={el => {this.formRef = el}}\n class={[this.formClass, this.packUp ? '' : 'packUp', 'dinert-form']}>\n <el-row {...this.form.row} class=\"el-form-left\">\n {/* eslint-disable-next-line array-callback-return, consistent-return */}\n { this.formItemMap.map((item: CustomFormItemProps) => {\n const style: any = {}\n let vif = typeof item.vif === 'function' ? item.vif(this.form.model) : item.vif\n vif = vif === undefined ? true : vif\n\n let show = typeof item.show === 'function' ? item.show(this.form.model) : item.show\n show = show === undefined ? true : show\n item.options = {placeholder: customPlaceholder(typeof item.label === 'function' ? item.label(this.form.model) : item.label, item.type), ...item.options}\n\n\n if (!show) {\n style.display = 'none'\n }\n if (vif) {\n item.required = item.required === undefined ? item.required || this.form.required : item.required\n item.showLabel = item.showLabel === undefined ? item.showLabel || this.form.showLabel : item.showLabel\n\n let rules = item.rules || []\n rules = item.required ? [{required: true, trigger: ['blur', 'change'], message: customPlaceholder(typeof item.label === 'function' ? item.label(this.form.model) : item.label, item.type)}].concat(rules as any) : rules\n rules = item.showLabel ? [] : rules\n const valDisabled = item.showLabel ? true : item.tempValueDisabled\n\n return (\n <el-col\n style= {style}\n class={[item.type, item.key]}\n key={item.key}\n {\n ...{\n // xl: 3, // ≥1920px\n // lg: 4, // ≥1200px\n // md: 8, // ≥992px\n // sm: 12, // ≥768px\n // xs: 24, // <768px\n ...this.form.colLayout,\n ...item.colLayout\n }\n }\n >\n <el-form-item\n key={item.key}\n prop={item.key}\n class={[item.labelWrap ? 'label-wrap' : '', item.showLabel || this.form.showLabel ? 'show-label' : '']}\n {...{\n ...item,\n label: typeof item.label === 'function' ? item.label(this.form.model) : item.label,\n rules: rules\n }}\n v-slots={{\n label: () => {\n return (\n <dinert-tooltip\n key={item.key}\n content={typeof item.label === 'function' ? item.label(this.form.model) : item.label}\n disabled={item.labelDisabled}\n onLabelMouseEnter={(e: MouseEvent) => labelMouseEnter(e, item, this)}\n >\n </dinert-tooltip>\n )\n },\n default: () => {\n return (\n <dinert-tooltip\n key={item.key}\n content={String(getTooltipValue(this.form.model[item.key], item))}\n disabled={valDisabled}\n item={item}\n onLabelMouseEnter={(e: MouseEvent) => valueMouseEnter(e, item, this.form.model[item.key], this)}\n v-slots={\n {\n default: () => {\n\n\n const slots: any = {}\n\n let componentResult = <span>{dataTransformRod(this.form.model[item.key])}</span>\n\n\n if (this.$slots[formItemSlot(item.key)]) {\n componentResult = (this.$slots[formItemSlot(item.key)]?.({...item, model: this.form.model}))\n } else if (item.showLabel || (this.form.showLabel && [true, undefined].includes(item.showLabel))) {\n return componentResult\n } else if (['input', 'textarea'].includes(item.type)) {\n const appendSlot = this.$slots[formItemSlot(item.key + '_append')]?.()\n const appendSlotValue = appendSlot && appendSlot[0] && appendSlot[0].children\n\n const prependSlot = this.$slots[formItemSlot(item.key + '_prepend')]?.()\n const prependSlotValue = prependSlot && prependSlot[0] && prependSlot[0].children\n if (appendSlotValue) {\n slots.append = () => this.$slots[formItemSlot(item.key + '_append')]?.()\n }\n if (prependSlotValue) {\n slots.prepend = () => this.$slots[formItemSlot(item.key + '_prepend')]?.()\n }\n componentResult = (<CustomInput form={this.form} formItem={item} v-slots={slots}></CustomInput>)\n } else if (['input-number'].includes(item.type)) {\n componentResult = (<CustomInputNumber form={this.form} formItem={item}></CustomInputNumber>)\n } else if (['input-autocomplete'].includes(item.type)) {\n componentResult = (<CustomInputAutocomplete form={this.form} formItem={item}></CustomInputAutocomplete>)\n } else if (['select'].includes(item.type)) {\n componentResult = (<CustomSelect form={this.form} formItem={item}></CustomSelect>)\n } else if (['select-v2'].includes(item.type)) {\n componentResult = (<CustomSelectV2 form={this.form} formItem={item}></CustomSelectV2>)\n } else if (['switch'].includes(item.type)) {\n componentResult = (<CustomSwitch form={this.form} formItem={item}></CustomSwitch>)\n } else if ([\n 'datetime',\n 'date',\n 'dates',\n 'week',\n 'month',\n 'year',\n 'years',\n 'datetimerange',\n 'daterange',\n 'monthrange',\n 'yearrange',\n ].includes(item.type)) {\n componentResult = (<CustomDate form={this.form} formItem={item}></CustomDate>)\n } else if (['radio', 'radio-button'].includes(item.type)) {\n componentResult = (<CustomRadio form={this.form} formItem={item}></CustomRadio>)\n } else if (['tree-select'].includes(item.type)) {\n componentResult = (<CustomSelectTree form={this.form} formItem={item}></CustomSelectTree>)\n } else if (['rate'].includes(item.type)) {\n componentResult = (<CustomRate form={this.form} formItem={item}></CustomRate>)\n } else if (['checkbox', 'checkbox-button'].includes(item.type)) {\n componentResult = (<CustomCheckbox form={this.form} formItem={item}></CustomCheckbox>)\n } else if (['cascader'].includes(item.type)) {\n componentResult = (<CustomCascader form={this.form} formItem={item}></CustomCascader>)\n }\n\n\n return componentResult\n },\n defaultAfter: () => this.$slots[formItemSlot('after_' + item.key)]?.({...item, model: this.form.model}),\n defaultBefore: () => this.$slots[formItemSlot('before_' + item.key)]?.({...item, model: this.form.model}),\n }\n }\n >\n </dinert-tooltip>\n )\n }\n }}\n >\n </el-form-item>\n </el-col>\n )\n }\n\n })\n }\n </el-row>\n {\n this.search\n && <el-row class={['el-form-right', this.isArrow ? 'isArrow' : '']}>\n {this.isArrow\n && <el-button class=\"el-form-right-operation\" text type=\"primary\"\n onClick={this.unfold}\n >\n <el-icon>\n {this.packUp ? <ArrowUp/> : <ArrowDown/>}\n </el-icon>\n {this.packUp ? '收起' : '展开'}\n </el-button>\n }\n {this.$slots.form_search?.()\n || (\n <>\n <el-button type=\"primary\" onClick={() => this.$emit('SearchFn')}>搜索</el-button>\n <el-button type=\"primary\" plain\n onClick={() => this.$emit('ResetFn')}\n >重置</el-button>\n </>\n )\n }\n </el-row>\n }\n </el-form>\n )\n }\n})\n"],"names":["_isSlot","s","Object","prototype","toString","call","_isVNode","defineComponent","name","props","form","type","default","search","Boolean","emits","setup","emit","toRefs","packUp","ref","value","undefined","isArrow","formRef","formClass","getUuid","formItemMap","computed","index","result","keys","formItem","forEach","key","push","sort","a","b","resizeForm","elFormLeft","document","querySelectorAll","nextTick","firstTop","getBoundingClientRect","top","lastTop","length","useWindowResize","unfold","render","_slot","_createVNode","_resolveComponent","_mergeProps","el","row","map","item","style","vif","model","show","options","placeholder","customPlaceholder","label","display","required","showLabel","rules","trigger","message","concat","valDisabled","tempValueDisabled","colLayout","labelWrap","labelDisabled","e","labelMouseEnter","String","getTooltipValue","valueMouseEnter","slots","componentResult","dataTransformRod","$slots","formItemSlot","_b","_a","includes","appendSlot","_d","_c","appendSlotValue","children","prependSlot","_f","_e","prependSlotValue","append","prepend","CustomInput","CustomInputNumber","CustomInputAutocomplete","CustomSelect","CustomSelectV2","CustomSwitch","CustomDate","CustomRadio","CustomSelectTree","CustomRate","CustomCheckbox","CustomCascader","defaultAfter","defaultBefore","ArrowUp","ArrowDown","form_search","_Fragment","onClick","$emit","_createTextVNode"],"mappings":";;;;;;;;;;;;;;;;;;AAuB+C,SAAAA,GAAAC,GAAA;AAAA,SAAA,OAAAA,KAAA,cAAAC,OAAAC,UAAAC,SAAAC,KAAAJ,CAAA,MAAAK,qBAAAA,CAAAA,EAAAL,CAAA;AAAA;AAM/C,MAAeM,uBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMT;AAAAA,MACNU,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,QAAQ;AAAA,MACJF,MAAMG;AAAAA,MACNF,SAAS;AAAA,IACb;AAAA,EACH;AAAA,EACDG,OAAO,CAAC,UAAU,YAAY,SAAS;AAAA,EACvCC,MAAMP,GAAO;AAAA,IAACQ,MAAAA;AAAAA,EAAI,GAAG;AAEjB,UAAM;AAAA,MAACP,MAAAA;AAAAA,IAAI,IAAIQ,EAAOT,CAAK,GACrBU,IAASC,EAAIV,EAAKW,MAAMF,WAAWG,MAAS,GAC5CC,IAAUH,EAAI,EAAK,GACnBI,IAAUJ,KACVK,IAAYL,EAAI,UAAUM,EAAS,CAAA,GACnCC,IAAcC,EAAS,MAAM;AAC/B,UAAIC,IAAQ;AACZ,YAAMC,IAAc,CAAA;AACpB5B,oBAAO6B,KAAKrB,EAAKW,MAAMW,QAAQ,EAAEC,QAAQC,CAAAA,MAAO;AAC5C,cAAMb,IAAQX,EAAKW,MAAMW,SAASE,CAAG;AACrCJ,QAAAA,E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AA,YAAA,MAAA;AAAA,YAAA,OAAA;AAAA,YAAA,SAElDoE,MAAM,KAAKC,MAAM,SAAS;AAAA,UAAC,GAAA;AAAA,YAAA/G,SAAAA,MAAA,CAAAgH,EAAA,IAAA,CAAA;AAAA,UAG/C,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA,OAEA,CAAA;AAAA,IAAA,CAAA;AAAA,EAIrB;AACJ,CAAC;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const f = (l, t, o) => {
|
|
2
2
|
const e = l.target.parentElement.parentElement, s = window.getComputedStyle(e, null), n = t.rules ? 12 : t.beforeWidth || 0, r = parseInt(s.getPropertyValue("max-width")) - n - parseInt(s.getPropertyValue("padding-right"));
|
|
3
3
|
l.target.previousElementSibling.offsetWidth >= r ? o.form.formItem[t.key].labelDisabled = !1 : o.form.formItem[t.key].labelDisabled = !0;
|
|
4
|
-
},
|
|
4
|
+
}, p = (l, t, o) => {
|
|
5
5
|
const e = [];
|
|
6
6
|
function s(n) {
|
|
7
7
|
n.forEach((r) => {
|
|
@@ -10,20 +10,20 @@ const f = (l, t, o) => {
|
|
|
10
10
|
}
|
|
11
11
|
return s(l), e;
|
|
12
12
|
}, m = (l, t) => {
|
|
13
|
-
var n, r,
|
|
13
|
+
var n, r, a, c;
|
|
14
14
|
const o = t.type, e = t.options || {}, s = [];
|
|
15
15
|
if (["input", "input-autocomplete", "input-number"].includes(o))
|
|
16
16
|
return l;
|
|
17
17
|
if (["select", "tree-select", "select-v2"].includes(o)) {
|
|
18
18
|
if (e && e.options && e.options.length) {
|
|
19
19
|
let i = null;
|
|
20
|
-
return e.valueKey && (i = l && l[e.valueKey]),
|
|
21
|
-
s.push(
|
|
20
|
+
return e.valueKey && (i = l && l[e.valueKey]), p(e.options, e.value === "object" ? e.valueKey : e.value || "value", i || l).forEach((u) => {
|
|
21
|
+
s.push(u[e.label || "label"]);
|
|
22
22
|
}), s.join(",");
|
|
23
23
|
}
|
|
24
24
|
} else if (["cascader"].includes(o) && e && e.options && e.options.length) {
|
|
25
25
|
(((n = e.props) == null ? void 0 : n.emitPath) === void 0 || ((r = e.props) == null ? void 0 : r.emitPath) === !0) && (l = l && l[0]);
|
|
26
|
-
const i =
|
|
26
|
+
const i = p(e.options, ((a = e.props) == null ? void 0 : a.value) || "value", l)[0];
|
|
27
27
|
return i && i[((c = e.props) == null ? void 0 : c.label) || "label"];
|
|
28
28
|
}
|
|
29
29
|
return null;
|
|
@@ -35,15 +35,30 @@ const f = (l, t, o) => {
|
|
|
35
35
|
}
|
|
36
36
|
let n = null;
|
|
37
37
|
if (["input", "input-autocomplete", "cascader", "input-number"].includes(t.type) ? n = l.target.parentElement.querySelector(".el-input__inner") : ["select", "tree-select", "select-v2"].includes(t.type) && (n = l.target.parentElement.querySelector(".el-select__selected-item.el-select__placeholder"), n = n || l.target.parentElement.querySelector(".el-select__selection")), n) {
|
|
38
|
-
const r = window.getComputedStyle(n, null),
|
|
39
|
-
l.target.previousElementSibling.offsetWidth >=
|
|
38
|
+
const r = window.getComputedStyle(n, null), a = n.offsetWidth - parseInt(r.getPropertyValue("padding-right")) - parseInt(r.getPropertyValue("padding-left"));
|
|
39
|
+
l.target.previousElementSibling.offsetWidth >= a ? e.form.formItem[t.key].tempValueDisabled = !1 : e.form.formItem[t.key].tempValueDisabled = !0;
|
|
40
40
|
} else
|
|
41
41
|
e.form.formItem[t.key].tempValueDisabled = !1;
|
|
42
|
-
},
|
|
42
|
+
}, g = (l, t = "input", o = "请输入") => (o = [
|
|
43
|
+
"select",
|
|
44
|
+
"tree-select",
|
|
45
|
+
"cascader",
|
|
46
|
+
"select-v2",
|
|
47
|
+
"datetime",
|
|
48
|
+
"datetimerange",
|
|
49
|
+
"date",
|
|
50
|
+
"daterange",
|
|
51
|
+
"dates",
|
|
52
|
+
"week",
|
|
53
|
+
"month",
|
|
54
|
+
"monthrange",
|
|
55
|
+
"year",
|
|
56
|
+
"years"
|
|
57
|
+
].includes(t) ? "请选择" : o, o + (l || "")), y = (l, t = "formItem_") => t + (l || "");
|
|
43
58
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
59
|
+
g as customPlaceholder,
|
|
60
|
+
p as findTreeNode,
|
|
61
|
+
y as formItemSlot,
|
|
47
62
|
m as getTooltipValue,
|
|
48
63
|
f as labelMouseEnter,
|
|
49
64
|
h as valueMouseEnter
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/form/utils/index.ts"],"sourcesContent":["\nexport const labelMouseEnter = (e: MouseEvent, item: any, _this: any) => {\n const el = (e.target as any).parentElement.parentElement\n const labelEl = window.getComputedStyle(el, null)\n const isRequried = item.rules ? 12 : item.beforeWidth || 0\n const labelWidth\n = parseInt(labelEl.getPropertyValue('max-width')) - isRequried\n - parseInt(labelEl.getPropertyValue('padding-right'))\n const tooltipWidth = (e.target as any).previousElementSibling.offsetWidth\n if (tooltipWidth >= labelWidth) {\n _this.form.formItem[item.key].labelDisabled = false\n\n } else {\n _this.form.formItem[item.key].labelDisabled = true\n }\n}\n\nexport const findTreeNode = (treeData: any, key: string, value: string) => {\n const result: any[] = []\n function filterResult(treeData: any) {\n treeData.forEach((item: any) => {\n if (item) {\n if ((Array.isArray(value) && value.includes(item[key])) || value === item[key]) {\n result.push(item)\n }\n if (item.children && item.children.length) {\n filterResult(item.children)\n }\n }\n\n })\n }\n filterResult(treeData)\n return result\n}\n\n\nexport const getTooltipValue = (value: any, item: any): any => {\n const type = item.type\n const options = item.options || {}\n const tempArr: string[] = []\n if (['input', 'input-autocomplete', 'input-number'].includes(type)) {\n return value\n } else if (['select', 'tree-select', 'select-v2'].includes(type)) {\n if (options && options.options && options.options.length) {\n let newVal = null\n if (options.valueKey) {\n newVal = value && value[options.valueKey]\n }\n const selectItem = findTreeNode(options.options, options.value === 'object' ? options.valueKey : options.value || 'value', newVal || value)\n selectItem.forEach(item => {\n tempArr.push(item[options.label || 'label'])\n })\n return tempArr.join(',')\n }\n } else if (['cascader'].includes(type)) {\n if (options && options.options && options.options.length) {\n if (options.props?.emitPath === undefined || options.props?.emitPath === true) {\n value = value && value[0]\n }\n\n const selectItem = findTreeNode(options.options, options.props?.value || 'value', value)[0]\n return selectItem && selectItem[options.props?.label || 'label']\n }\n }\n return null\n}\n\nexport const valueMouseEnter = (e: MouseEvent, item: any, value: any, _this) => {\n const showCom = ['input', 'input-autocomplete', 'cascader', 'input-number', 'select', 'tree-select', 'select-v2']\n\n if (!value || item.showLabel || !showCom.includes(item.type)) {\n _this.form.formItem[item.key].tempValueDisabled = true\n\n return\n }\n let el: HTMLElement | null = null\n if (['input', 'input-autocomplete', 'cascader', 'input-number'].includes(item.type)) {\n el = (e.target as any).parentElement.querySelector('.el-input__inner') as HTMLElement\n } else if (['select', 'tree-select', 'select-v2'].includes(item.type)) {\n el = (e.target as any).parentElement.querySelector('.el-select__selected-item.el-select__placeholder') as HTMLElement\n el = el || (e.target as any).parentElement.querySelector('.el-select__selection') as HTMLElement\n }\n\n if (el) {\n const inputEl = window.getComputedStyle(el, null)\n const textWidth\n = el.offsetWidth\n - parseInt(inputEl.getPropertyValue('padding-right'))\n - parseInt(inputEl.getPropertyValue('padding-left'))\n const tooltipEl = (e.target as any).previousElementSibling\n const tooltipWidth = tooltipEl.offsetWidth\n\n if (tooltipWidth >= textWidth) {\n _this.form.formItem[item.key].tempValueDisabled = false\n } else {\n _this.form.formItem[item.key].tempValueDisabled = true\n\n }\n } else {\n _this.form.formItem[item.key].tempValueDisabled = false\n }\n\n}\n\nexport const customPlaceholder = (customName: any, type: string = 'input', name: string = '请输入') => {\n name =
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/form/utils/index.ts"],"sourcesContent":["\nexport const labelMouseEnter = (e: MouseEvent, item: any, _this: any) => {\n const el = (e.target as any).parentElement.parentElement\n const labelEl = window.getComputedStyle(el, null)\n const isRequried = item.rules ? 12 : item.beforeWidth || 0\n const labelWidth\n = parseInt(labelEl.getPropertyValue('max-width')) - isRequried\n - parseInt(labelEl.getPropertyValue('padding-right'))\n const tooltipWidth = (e.target as any).previousElementSibling.offsetWidth\n if (tooltipWidth >= labelWidth) {\n _this.form.formItem[item.key].labelDisabled = false\n\n } else {\n _this.form.formItem[item.key].labelDisabled = true\n }\n}\n\nexport const findTreeNode = (treeData: any, key: string, value: string) => {\n const result: any[] = []\n function filterResult(treeData: any) {\n treeData.forEach((item: any) => {\n if (item) {\n if ((Array.isArray(value) && value.includes(item[key])) || value === item[key]) {\n result.push(item)\n }\n if (item.children && item.children.length) {\n filterResult(item.children)\n }\n }\n\n })\n }\n filterResult(treeData)\n return result\n}\n\n\nexport const getTooltipValue = (value: any, item: any): any => {\n const type = item.type\n const options = item.options || {}\n const tempArr: string[] = []\n if (['input', 'input-autocomplete', 'input-number'].includes(type)) {\n return value\n } else if (['select', 'tree-select', 'select-v2'].includes(type)) {\n if (options && options.options && options.options.length) {\n let newVal = null\n if (options.valueKey) {\n newVal = value && value[options.valueKey]\n }\n const selectItem = findTreeNode(options.options, options.value === 'object' ? options.valueKey : options.value || 'value', newVal || value)\n selectItem.forEach(item => {\n tempArr.push(item[options.label || 'label'])\n })\n return tempArr.join(',')\n }\n } else if (['cascader'].includes(type)) {\n if (options && options.options && options.options.length) {\n if (options.props?.emitPath === undefined || options.props?.emitPath === true) {\n value = value && value[0]\n }\n\n const selectItem = findTreeNode(options.options, options.props?.value || 'value', value)[0]\n return selectItem && selectItem[options.props?.label || 'label']\n }\n }\n return null\n}\n\nexport const valueMouseEnter = (e: MouseEvent, item: any, value: any, _this) => {\n const showCom = ['input', 'input-autocomplete', 'cascader', 'input-number', 'select', 'tree-select', 'select-v2']\n\n if (!value || item.showLabel || !showCom.includes(item.type)) {\n _this.form.formItem[item.key].tempValueDisabled = true\n\n return\n }\n let el: HTMLElement | null = null\n if (['input', 'input-autocomplete', 'cascader', 'input-number'].includes(item.type)) {\n el = (e.target as any).parentElement.querySelector('.el-input__inner') as HTMLElement\n } else if (['select', 'tree-select', 'select-v2'].includes(item.type)) {\n el = (e.target as any).parentElement.querySelector('.el-select__selected-item.el-select__placeholder') as HTMLElement\n el = el || (e.target as any).parentElement.querySelector('.el-select__selection') as HTMLElement\n }\n\n if (el) {\n const inputEl = window.getComputedStyle(el, null)\n const textWidth\n = el.offsetWidth\n - parseInt(inputEl.getPropertyValue('padding-right'))\n - parseInt(inputEl.getPropertyValue('padding-left'))\n const tooltipEl = (e.target as any).previousElementSibling\n const tooltipWidth = tooltipEl.offsetWidth\n\n if (tooltipWidth >= textWidth) {\n _this.form.formItem[item.key].tempValueDisabled = false\n } else {\n _this.form.formItem[item.key].tempValueDisabled = true\n\n }\n } else {\n _this.form.formItem[item.key].tempValueDisabled = false\n }\n\n}\n\nexport const customPlaceholder = (customName: any, type: string = 'input', name: string = '请输入') => {\n name = ['select', 'tree-select', 'cascader', 'select-v2', 'datetime',\n 'datetimerange', 'date', 'daterange', 'dates', 'week', 'month', 'monthrange', 'year', 'years'].includes(type) ? '请选择' : name\n return name + ((customName) || '')\n}\n\nexport const formItemSlot = (customName: any, name: string = 'formItem_') => {\n return name + (customName || '')\n}\n"],"names":["labelMouseEnter","e","item","_this","el","labelEl","isRequried","labelWidth","findTreeNode","treeData","key","value","result","filterResult","getTooltipValue","_a","_b","_c","_d","type","options","tempArr","newVal","selectItem","valueMouseEnter","showCom","inputEl","textWidth","customPlaceholder","customName","name","formItemSlot"],"mappings":"AACO,MAAMA,IAAkB,CAACC,GAAeC,GAAWC,MAAe;AAC/D,QAAAC,IAAMH,EAAE,OAAe,cAAc,eACrCI,IAAU,OAAO,iBAAiBD,GAAI,IAAI,GAC1CE,IAAaJ,EAAK,QAAQ,KAAKA,EAAK,eAAe,GACnDK,IACA,SAASF,EAAQ,iBAAiB,WAAW,CAAC,IAAIC,IAC9C,SAASD,EAAQ,iBAAiB,eAAe,CAAC;AAE5D,EADsBJ,EAAE,OAAe,uBAAuB,eAC1CM,IAChBJ,EAAM,KAAK,SAASD,EAAK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B;AAAA,EAEtD;AAEA,IAAAC,EAAM,KAAK,SAASD,EAAK,GAAG,EAAE,oBAAoB;AAG1D,GAEa0B,IAAoB,CAACC,GAAiBV,IAAe,SAASW,IAAe,WAC/EA,IAAA;AAAA,EAAC;AAAA,EAAU;AAAA,EAAe;AAAA,EAAY;AAAA,EAAa;AAAA,EACtD;AAAA,EAAiB;AAAA,EAAQ;AAAA,EAAa;AAAA,EAAS;AAAA,EAAQ;AAAA,EAAS;AAAA,EAAc;AAAA,EAAQ;AAAS,EAAA,SAASX,CAAI,IAAI,QAAQW,GACrHA,KAASD,KAAe,MAGtBE,IAAe,CAACF,GAAiBC,IAAe,gBAClDA,KAAQD,KAAc;"}
|
|
@@ -13,7 +13,7 @@ export type RewriteSelectProps<O = any[]> = Partial<Omit<ExtractPropTypes<typeof
|
|
|
13
13
|
value: string;
|
|
14
14
|
} & Pick<typeof ElSelect, CommonFn | 'onVisible-change' | 'onRemove-tag'>>;
|
|
15
15
|
export type RewriteCascaderProps<O = any[]> = Partial<Omit<ExtractPropTypes<typeof cascaderProps>, 'options' | 'props'> & {
|
|
16
|
-
|
|
16
|
+
options: O;
|
|
17
17
|
props: Partial<MergeProp<CascaderProps, TreeOptionProps>>;
|
|
18
18
|
} & Pick<typeof ElCascader, CommonFn | 'onVisible-change' | 'onRemove-tag'>>;
|
|
19
19
|
export type RewriteAutocompleteProps = Partial<AutocompleteProps & Pick<typeof ElAutocomplete, 'onSelect' | 'onChange'>>;
|
package/es/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.tree-item{width:100%}.tree-item .el-tooltip__trigger{display:block;overflow:hidden;width:100%;text-align:left;text-overflow:ellipsis;white-space:nowrap}.el-popover-classify{overflow-y:auto;margin:0;padding:0;list-style:none}.el-popover-classify li{margin:0;padding:0;list-style:none}.el-popover-classify li:first-child{border-bottom:1px solid var(--el-fill-color);line-height:32px}.el-popover-classify>.el-tree>.el-tree-node>.el-tree-node__content>.el-tree-node__expand-icon.is-leaf{display:none}.el-popover-classify .el-tree-node__children{overflow:unset}.dinert-table{display:flex;padding:20px;height:100%;border-radius:var(--el-bg-radius);background-color:var(--el-bg-color);flex-direction:column;box-sizing:border-box}.dinert-table .dinert-table-header{display:flex;justify-content:space-between;margin-bottom:12px;text-align:right}.dinert-table .dinert-table-header .el-popover-classify li .el-checkbox{width:100%;line-height:24px;height:24px}.dinert-table .dinert-table-header .dinert-table-header-left{text-align:left}.dinert-table .dinert-table-body{flex:1;height:0}.dinert-table .dinert-table-body .el-table .el-popper{max-width:50%}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell.setting .setting-icon{display:inline-block}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell .cell{color:var(--zp-color-secondary-text-title)}.dinert-table .dinert-table-body .el-table .el-table__header .el-table__cell .cell .setting-icon{vertical-align:-1px;margin-left:4px;cursor:pointer}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td{color:var(--zp-color-secondary-text-title)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td .cell.el-tooltip>.cell-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper td .cell.el-tooltip>.cell-item .cell-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .el-dropdown{vertical-align:-2px}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell{display:flex;justify-content:center;align-items:center}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-button{margin-right:8px;margin-left:0}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-button:focus-visible{outline:none}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-svg-icon{font-size:14px;color:var(--el-color-primary);cursor:pointer;flex:1}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .el-svg-icon.delete{color:var(--el-color-danger)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .svg-icon{width:16px;height:16px;vertical-align:-2px;flex:1;color:var(--el-color-primary);cursor:pointer;fill:var(--el-color-primary)}.dinert-table .dinert-table-body .el-table .el-table__body-wrapper .operations .cell .svg-icon.f-14{width:14px;height:14px}.dinert-table .dinert-table-footer{display:flex;margin-top:16px}.dinert-table .dinert-table-footer .el-pagination{display:flex;flex-wrap:wrap}.el-overlay.autoHeight .el-dialog{height:80%}.el-overlay.notPadding .el-dialog__body{padding:0}.el-overlay .el-dialog{top:10%;display:flex;min-width:310px;max-height:80%;border-radius:4px;flex-direction:column;--el-dialog-margin-top: 0;--el-dialog-padding-primary: 0}.el-overlay .el-dialog.is-fullscreen{top:unset;max-height:unset}.el-overlay .el-dialog__headerbtn{right:0;width:40px;height:100%;color:var(--el-color-info)}.el-overlay .el-dialog .full{position:absolute;top:-1.5px;right:34px;display:flex;justify-content:center;align-items:center;width:40px;height:100%;font-size:var(--el-message-close-size, 16px);border:none;color:var(--el-color-info);background:transparent;outline:none;cursor:pointer}.el-overlay .el-dialog .full:hover .icon{fill:var(--el-color-primary);color:var(--el-color-primary)}.el-overlay .el-dialog .full .icon{overflow:hidden;width:14px;height:14px;vertical-align:-.15em;fill:var(--el-color-info)}.el-overlay .el-dialog__header{position:relative;margin-right:0;padding:16px 24px;height:54px;box-sizing:border-box}.el-overlay .el-dialog__body{display:flex;overflow-y:auto;padding:24px;flex-direction:column;flex:1;word-wrap:break-word}.el-overlay .el-dialog__body>.el-form{overflow:unset}.el-overlay .el-dialog__footer{display:flex;justify-content:center;align-items:center;clear:both;padding:12px 24px 16px}.el-overlay .el-dialog__footer .el-button{margin:0}.el-overlay .el-dialog__footer .el-button+.el-button{margin-left:12px}.dinert-form.el-form{display:flex;overflow:hidden;padding:0;min-height:50px;border-radius:4px;background-color:var(--el-bg-color);transition:all .3s cubic-bezier(.645,.045,.355,1);box-sizing:content-box}.dinert-form.el-form.near.packUp{max-height:50px}.dinert-form.el-form.near .el-form-left .el-col{display:flex;align-items:center;margin-right:10px;width:auto;max-width:unset;flex:unset}.dinert-form.el-form.near .el-form-right.isArrow{width:230px;flex:0 0 230px}.dinert-form.el-form.dialog .el-form-left{flex:1}.dinert-form.el-form.dialog .el-form-left .el-col .label-text>div{width:100%}.dinert-form.el-form .el-form-left .el-col .label-text .el-radio.is-bordered,.dinert-form.el-form .el-form-left .el-col .label-text .el-checkbox.is-bordered{margin-right:16px}.dinert-form.el-form .el-form-left .el-col .label-text .el-date-editor{width:210px}.dinert-form.el-form .el-form-left .el-col .label-text .el-date-editor--daterange{width:260px}.dinert-form.el-form .el-form-left .el-col .label-text>.el-input{width:210px}.dinert-form.el-form .el-form-left .el-col .label-text>.el-select{width:210px}.dinert-form.el-form .el-form-left .el-col .label-text .el-date-editor--datetimerange{width:400px}.dinert-form.el-form .el-form-right{display:flex;margin-left:24px}.dinert-form.el-form .el-form-right .el-form-right-operation{padding:0}.dinert-form.el-form .el-form-right .el-form-right-operation.el-button.is-text{padding-right:0;background-color:unset}.dinert-form.el-form div.el-form-item{position:relative;display:flex;margin-right:0;margin-bottom:18px;width:100%}.dinert-form.el-form div.el-form-item.show-label .label-text{overflow:unset;text-overflow:unset;white-space:unset}.dinert-form.el-form div.el-form-item.label-wrap .el-form-item__label{height:auto}.dinert-form.el-form div.el-form-item.label-wrap .el-form-item__label .label-text{display:inline;text-align:left;white-space:normal}.dinert-form.el-form .el-form-item__content{flex:1;margin-left:0}.dinert-form.el-form .el-form-item__content .el-tooltip__trigger,.dinert-form.el-form .el-form-item__content .el-input-number{width:100%}.dinert-form.el-form .el-form-item__content .el-input-number .el-input__inner{text-align:center}.dinert-form.el-form .el-form-item__content .el-textarea .el-textarea__inner{height:80px}.dinert-form.el-form .el-form-item__content .el-date-editor,.dinert-form.el-form .el-form-item__content .el-date-editor .el-input__wrapper{width:100%;box-sizing:border-box}.dinert-form.el-form .el-form-item__content .el-input__inner{overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.dinert-form.el-form .el-form-item__content .el-form-item__label{overflow:hidden;width:80px;max-width:80px;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dinert-form.el-form .el-form-item__content .el-form-item__label .el-tooltip,.dinert-form.el-form .el-form-item__content .el-form-item__label .el-tooltip .label-text{display:inline}.dinert-table-page{display:flex;flex-direction:column;box-sizing:border-box}.dinert-table-page.text-wrap .el-table__header .cell{white-space:pre-wrap}.dinert-table-page.text-wrap .el-table__body .el-table__row td>.cell,.dinert-table-page.text-wrap .el-table__body .el-table__row td>.cell>.cell-item,.dinert-table-page.text-wrap .el-table__body .el-table__row td .cell.el-tooltip>.cell-item{white-space:pre-wrap}.dinert-table-page.text-wrap .el-table__body .el-table__row .el-button>span{text-align:left}.dinert-table-page.text-wrap .el-table__body .el-table__row span{white-space:pre-wrap;line-height:23px}.dinert-table-page.header-center .el-table__header .el-table__cell{text-align:center}.dinert-table-page.near .el-form-left{flex:unset}.dinert-table-page.near .el-form-left .el-col{margin-right:16px;width:auto;max-width:unset;flex:unset}.dinert-table-page.near .dinert-table-footer .el-pagination{margin-left:auto}.dinert-table-page.maxWidthAuto .el-form .el-form-item .el-form-item__label{max-width:unset}.dinert-table-page .el-form.dinert-form{padding:20px 20px 0;max-height:300px}.dinert-table-page .dinert-table{padding-top:0;height:0;flex:1}.dinert-tooltip.el-tooltip__trigger{display:block;height:100%}.dinert-tooltip.el-tooltip__trigger .text-tooltip{position:absolute;left:-999999999999px}.dinert-tooltip.el-tooltip__trigger .label-text{display:block;overflow:hidden;width:100%;height:100%;text-overflow:ellipsis;white-space:nowrap}
|