@dinert/element-plus 1.1.26 → 1.1.28
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/dist/style.css +1 -1
- package/es/packages/components/form/src/index.mjs +132 -108
- package/es/packages/components/form/src/index.mjs.map +1 -1
- package/es/packages/components/form/src/slider.mjs +35 -0
- package/es/packages/components/form/src/slider.mjs.map +1 -0
- package/es/packages/components/form/src/time-picker.mjs +37 -0
- package/es/packages/components/form/src/time-picker.mjs.map +1 -0
- package/es/packages/components/form/src/time-select.mjs +37 -0
- package/es/packages/components/form/src/time-select.mjs.map +1 -0
- package/es/packages/components/form/utils/index.mjs +40 -35
- package/es/packages/components/form/utils/index.mjs.map +1 -1
- package/es/src/components/form/src/slider.d.ts +28 -0
- package/es/src/components/form/src/time-picker.d.ts +28 -0
- package/es/src/components/form/src/time-select.d.ts +28 -0
- package/es/src/components/form/types/components.d.ts +6 -2
- package/es/src/components/form/types/index.d.ts +19 -5
- package/es/style.css +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/src/components/form/src/slider.d.ts +28 -0
- package/lib/src/components/form/src/time-picker.d.ts +28 -0
- package/lib/src/components/form/src/time-select.d.ts +28 -0
- package/lib/src/components/form/types/components.d.ts +6 -2
- package/lib/src/components/form/types/index.d.ts +19 -5
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as t, ref as r, computed as s, createVNode as m, resolveComponent as n, mergeProps as i } from "vue";
|
|
2
|
+
const f = /* @__PURE__ */ t({
|
|
3
|
+
name: "dinert-slider",
|
|
4
|
+
props: {
|
|
5
|
+
form: {
|
|
6
|
+
type: Object,
|
|
7
|
+
default: () => ({})
|
|
8
|
+
},
|
|
9
|
+
formItem: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: () => ({})
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(e) {
|
|
15
|
+
const o = r(null);
|
|
16
|
+
return {
|
|
17
|
+
options: s(() => e.formItem.options || {}),
|
|
18
|
+
sliderRef: o
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
render() {
|
|
22
|
+
return m(n("el-slider"), i({
|
|
23
|
+
modelValue: this.form.model[this.formItem.key],
|
|
24
|
+
"onUpdate:modelValue": (e) => this.form.model[this.formItem.key] = e
|
|
25
|
+
}, this.options, {
|
|
26
|
+
ref: (e) => {
|
|
27
|
+
this.sliderRef = e;
|
|
28
|
+
}
|
|
29
|
+
}), this.$slots);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
f as default
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=slider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.mjs","sources":["../../../../../packages/components/form/src/slider.tsx"],"sourcesContent":["import {computed, defineComponent, ref} from 'vue'\n\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\n\nexport default defineComponent({\n name: 'dinert-slider',\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 const sliderRef = ref(null)\n const options = computed(() => {\n const options = props.formItem.options || {}\n return options\n })\n\n return {\n options,\n sliderRef\n }\n },\n render() {\n return (\n <el-slider\n v-model={this.form.model[this.formItem.key]}\n {...this.options}\n v-slots={this.$slots}\n ref={el => {this.sliderRef = el}}\n >\n </el-slider>\n )\n }\n})\n\n"],"names":["defineComponent","name","props","form","type","Object","default","formItem","setup","sliderRef","ref","options","computed","render","_createVNode","_resolveComponent","_mergeProps","model","key","$event","el","$slots"],"mappings":";AAOA,MAAeA,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMC;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNH,MAAMC;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAMN,GAAO;AACT,UAAMO,IAAYC,EAAI,IAAI;AAM1B,WAAO;AAAA,MACHC,SANYC,EAAS,MACLV,EAAMK,SAASI,WAAW,CAAA,CAE7C;AAAA,MAIGF,WAAAA;AAAAA;EAEP;AAAA,EACDI,SAAS;AACL,WAAAC,EAAAC,EAAA,WAAA,GAAAC,EAAA;AAAA,MAAA,YAEiB,KAAKb,KAAKc,MAAM,KAAKV,SAASW,GAAG;AAAA,MAAC,uBAAAC,CAAAA,MAAlC,KAAKhB,KAAKc,MAAM,KAAKV,SAASW,GAAG,IAACC;AAAAA,OACvC,KAAKR,SAAO;AAAA,MAAA,KAEXS,CAAAA,MAAM;AAAC,aAAKX,YAAYW;AAAAA,MAAE;AAAA,KADtB,GAAA,KAAKC,MAAM;AAAA,EAKhC;AACJ,CAAC;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as o, ref as r, computed as m, createVNode as s, resolveComponent as i, mergeProps as n } from "vue";
|
|
2
|
+
const f = /* @__PURE__ */ o({
|
|
3
|
+
name: "dinert-slider",
|
|
4
|
+
props: {
|
|
5
|
+
form: {
|
|
6
|
+
type: Object,
|
|
7
|
+
default: () => ({})
|
|
8
|
+
},
|
|
9
|
+
formItem: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: () => ({})
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(e) {
|
|
15
|
+
const t = r(null);
|
|
16
|
+
return {
|
|
17
|
+
options: m(() => e.formItem.options || {}),
|
|
18
|
+
timePickerRef: t
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
render() {
|
|
22
|
+
return s(i("el-time-picker"), n({
|
|
23
|
+
modelValue: this.form.model[this.formItem.key],
|
|
24
|
+
"onUpdate:modelValue": (e) => this.form.model[this.formItem.key] = e,
|
|
25
|
+
startPlaceholder: "请选择开始时间",
|
|
26
|
+
endPlaceholder: "请选择结束时间"
|
|
27
|
+
}, this.options, {
|
|
28
|
+
ref: (e) => {
|
|
29
|
+
this.timePickerRef = e;
|
|
30
|
+
}
|
|
31
|
+
}), this.$slots);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
f as default
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=time-picker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-picker.mjs","sources":["../../../../../packages/components/form/src/time-picker.tsx"],"sourcesContent":["import {computed, defineComponent, ref} from 'vue'\n\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\n\nexport default defineComponent({\n name: 'dinert-slider',\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 const timePickerRef = ref(null)\n const options = computed(() => {\n const options = props.formItem.options || {}\n return options\n })\n\n return {\n options,\n timePickerRef\n }\n },\n render() {\n return (\n <el-time-picker\n v-model={this.form.model[this.formItem.key]}\n startPlaceholder={'请选择开始时间'}\n endPlaceholder={'请选择结束时间'}\n {...this.options}\n v-slots={this.$slots}\n ref={el => {this.timePickerRef = el}}\n >\n </el-time-picker>\n )\n }\n})\n\n"],"names":["defineComponent","name","props","form","type","Object","default","formItem","setup","timePickerRef","ref","options","computed","render","_createVNode","_resolveComponent","_mergeProps","model","key","$event","el","$slots"],"mappings":";AAOA,MAAeA,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMC;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNH,MAAMC;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAMN,GAAO;AACT,UAAMO,IAAgBC,EAAI,IAAI;AAM9B,WAAO;AAAA,MACHC,SANYC,EAAS,MACLV,EAAMK,SAASI,WAAW,CAAA,CAE7C;AAAA,MAIGF,eAAAA;AAAAA;EAEP;AAAA,EACDI,SAAS;AACL,WAAAC,EAAAC,EAAA,gBAAA,GAAAC,EAAA;AAAA,MAAA,YAEiB,KAAKb,KAAKc,MAAM,KAAKV,SAASW,GAAG;AAAA,MAAC,uBAAAC,CAAAA,MAAlC,KAAKhB,KAAKc,MAAM,KAAKV,SAASW,GAAG,IAACC;AAAAA,MAAA,kBACzB;AAAA,MAAS,gBACX;AAAA,OACZ,KAAKR,SAAO;AAAA,MAAA,KAEXS,CAAAA,MAAM;AAAC,aAAKX,gBAAgBW;AAAAA,MAAE;AAAA,KAD1B,GAAA,KAAKC,MAAM;AAAA,EAKhC;AACJ,CAAC;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as o, ref as r, computed as s, createVNode as m, resolveComponent as n, mergeProps as l } from "vue";
|
|
2
|
+
const f = /* @__PURE__ */ o({
|
|
3
|
+
name: "dinert-slider",
|
|
4
|
+
props: {
|
|
5
|
+
form: {
|
|
6
|
+
type: Object,
|
|
7
|
+
default: () => ({})
|
|
8
|
+
},
|
|
9
|
+
formItem: {
|
|
10
|
+
type: Object,
|
|
11
|
+
default: () => ({})
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
setup(e) {
|
|
15
|
+
const t = r(null);
|
|
16
|
+
return {
|
|
17
|
+
options: s(() => e.formItem.options || {}),
|
|
18
|
+
timeSelectRef: t
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
render() {
|
|
22
|
+
return m(n("el-time-select"), l({
|
|
23
|
+
modelValue: this.form.model[this.formItem.key],
|
|
24
|
+
"onUpdate:modelValue": (e) => this.form.model[this.formItem.key] = e,
|
|
25
|
+
startPlaceholder: "请选择开始时间",
|
|
26
|
+
endPlaceholder: "请选择结束时间"
|
|
27
|
+
}, this.options, {
|
|
28
|
+
ref: (e) => {
|
|
29
|
+
this.timeSelectRef = e;
|
|
30
|
+
}
|
|
31
|
+
}), this.$slots);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
f as default
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=time-select.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-select.mjs","sources":["../../../../../packages/components/form/src/time-select.tsx"],"sourcesContent":["import {computed, defineComponent, ref} from 'vue'\n\n\nimport type {RewriteFormProps, CustomFormItemProps} from '@packages/components/form/types'\nimport type {PropType} from 'vue'\n\n\nexport default defineComponent({\n name: 'dinert-slider',\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 const timeSelectRef = ref(null)\n const options = computed(() => {\n const options = props.formItem.options || {}\n return options\n })\n\n return {\n options,\n timeSelectRef\n }\n },\n render() {\n return (\n <el-time-select\n v-model={this.form.model[this.formItem.key]}\n startPlaceholder={'请选择开始时间'}\n endPlaceholder={'请选择结束时间'}\n {...this.options}\n v-slots={this.$slots}\n ref={el => {this.timeSelectRef = el}}\n >\n </el-time-select>\n )\n }\n})\n\n"],"names":["defineComponent","name","props","form","type","Object","default","formItem","setup","timeSelectRef","ref","options","computed","render","_createVNode","_resolveComponent","_mergeProps","model","key","$event","el","$slots"],"mappings":";AAOA,MAAeA,sBAAgB;AAAA,EAC3BC,MAAM;AAAA,EACNC,OAAO;AAAA,IACHC,MAAM;AAAA,MACFC,MAAMC;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACnB;AAAA,IACDC,UAAU;AAAA,MACNH,MAAMC;AAAAA,MACNC,SAASA,OAAO,CAAA;AAAA,IACpB;AAAA,EACH;AAAA,EACDE,MAAMN,GAAO;AACT,UAAMO,IAAgBC,EAAI,IAAI;AAM9B,WAAO;AAAA,MACHC,SANYC,EAAS,MACLV,EAAMK,SAASI,WAAW,CAAA,CAE7C;AAAA,MAIGF,eAAAA;AAAAA;EAEP;AAAA,EACDI,SAAS;AACL,WAAAC,EAAAC,EAAA,gBAAA,GAAAC,EAAA;AAAA,MAAA,YAEiB,KAAKb,KAAKc,MAAM,KAAKV,SAASW,GAAG;AAAA,MAAC,uBAAAC,CAAAA,MAAlC,KAAKhB,KAAKc,MAAM,KAAKV,SAASW,GAAG,IAACC;AAAAA,MAAA,kBACzB;AAAA,MAAS,gBACX;AAAA,OACZ,KAAKR,SAAO;AAAA,MAAA,KAEXS,CAAAA,MAAM;AAAC,aAAKX,gBAAgBW;AAAAA,MAAE;AAAA,KAD1B,GAAA,KAAKC,MAAM;AAAA,EAKhC;AACJ,CAAC;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isSlotsValue as
|
|
2
|
-
const
|
|
1
|
+
import { isSlotsValue as h } from "../../../utils/tools.mjs";
|
|
2
|
+
const g = (t, l, o) => {
|
|
3
3
|
const e = t.target.parentElement.parentElement, s = window.getComputedStyle(e, null), r = l.rules ? 12 : l.beforeWidth || 0, n = parseInt(s.getPropertyValue("max-width")) - r - parseInt(s.getPropertyValue("padding-right"));
|
|
4
4
|
t.target.previousElementSibling.offsetWidth >= n ? o.form.formItem[l.key].labelDisabled = !1 : o.form.formItem[l.key].labelDisabled = !0;
|
|
5
|
-
},
|
|
5
|
+
}, d = (t, l, o) => {
|
|
6
6
|
const e = [];
|
|
7
7
|
function s(r) {
|
|
8
8
|
r.forEach((n) => {
|
|
@@ -11,25 +11,27 @@ const h = (t, l, o) => {
|
|
|
11
11
|
}
|
|
12
12
|
return s(t), e;
|
|
13
13
|
}, y = (t, l) => {
|
|
14
|
-
var r, n,
|
|
14
|
+
var r, n, p, a;
|
|
15
15
|
const o = l.type, e = l.options || {}, s = [];
|
|
16
16
|
if (["input", "input-autocomplete", "input-number"].includes(o))
|
|
17
17
|
return t;
|
|
18
18
|
if (["select", "tree-select", "select-v2"].includes(o)) {
|
|
19
19
|
if (e && e.options && e.options.length) {
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
let i = null, c = ["select-v2"].includes(o) ? e.props && e.props.value : e.value;
|
|
21
|
+
c = c || "value";
|
|
22
|
+
let u = ["select-v2"].includes(o) ? e.props && e.props.label : e.label;
|
|
23
|
+
return u = u || "label", e.valueKey && (i = t && t[e.valueKey]), d(e.options, e.value === "object" ? e.valueKey : c, i || t).forEach((f) => {
|
|
24
|
+
s.push(f[u]);
|
|
25
|
+
}), s && s.length ? s.join(",") : t;
|
|
24
26
|
}
|
|
25
27
|
} else if (["cascader"].includes(o) && e && e.options && e.options.length) {
|
|
26
28
|
(((r = e.props) == null ? void 0 : r.emitPath) === void 0 || ((n = e.props) == null ? void 0 : n.emitPath) === !0) && (t = t && t[0]);
|
|
27
|
-
const
|
|
28
|
-
return
|
|
29
|
+
const i = d(e.options, ((p = e.props) == null ? void 0 : p.value) || "value", t)[0];
|
|
30
|
+
return i && i[((a = e.props) == null ? void 0 : a.label) || "label"];
|
|
29
31
|
}
|
|
30
32
|
return null;
|
|
31
|
-
},
|
|
32
|
-
var r, n,
|
|
33
|
+
}, I = (t, l) => {
|
|
34
|
+
var r, n, p, a;
|
|
33
35
|
const o = l.type, e = l.options || {}, s = [];
|
|
34
36
|
if ([
|
|
35
37
|
"input",
|
|
@@ -51,18 +53,20 @@ const h = (t, l, o) => {
|
|
|
51
53
|
return t;
|
|
52
54
|
if (["select", "tree-select", "select-v2", "radio", "radio-button", "checkbox", "checkbox-button"].includes(o)) {
|
|
53
55
|
if (e && e.options && e.options.length) {
|
|
54
|
-
let
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
let i = null, c = ["select-v2"].includes(o) ? e.props && e.props.value : e.value;
|
|
57
|
+
c = c || "value";
|
|
58
|
+
let u = ["select-v2"].includes(o) ? e.props && e.props.label : e.label;
|
|
59
|
+
return u = u || "label", e.valueKey && (i = t && t[e.valueKey]), d(e.options, e.value === "object" ? e.valueKey : c, i || t).forEach((f) => {
|
|
60
|
+
s.push(f[u]);
|
|
61
|
+
}), s && s.length ? s.join(",") : t;
|
|
58
62
|
}
|
|
59
63
|
} else if (["cascader"].includes(o) && e && e.options && e.options.length) {
|
|
60
64
|
(((r = e.props) == null ? void 0 : r.emitPath) === void 0 || ((n = e.props) == null ? void 0 : n.emitPath) === !0) && (t = t && t[0]);
|
|
61
|
-
const
|
|
62
|
-
return
|
|
65
|
+
const i = d(e.options, ((p = e.props) == null ? void 0 : p.value) || "value", t)[0];
|
|
66
|
+
return i && i[((a = e.props) == null ? void 0 : a.label) || "label"];
|
|
63
67
|
}
|
|
64
68
|
return null;
|
|
65
|
-
},
|
|
69
|
+
}, E = (t, l, o, e) => {
|
|
66
70
|
const s = ["input", "input-autocomplete", "cascader", "input-number", "select", "tree-select", "select-v2"];
|
|
67
71
|
if (!o || l.showLabel || !s.includes(l.type)) {
|
|
68
72
|
e.form.formItem[l.key].tempValueDisabled = !0;
|
|
@@ -70,11 +74,11 @@ const h = (t, l, o) => {
|
|
|
70
74
|
}
|
|
71
75
|
let r = null;
|
|
72
76
|
if (["input", "input-autocomplete", "cascader", "input-number"].includes(l.type) ? r = t.target.parentElement.querySelector(".el-input__inner") : ["select", "tree-select", "select-v2"].includes(l.type) && (r = t.target.parentElement.querySelector(".el-select__selected-item.el-select__placeholder"), r = r || t.target.parentElement.querySelector(".el-select__selection")), r) {
|
|
73
|
-
const n = window.getComputedStyle(r, null),
|
|
74
|
-
t.target.previousElementSibling.offsetWidth >=
|
|
77
|
+
const n = window.getComputedStyle(r, null), p = r.offsetWidth - parseInt(n.getPropertyValue("padding-right")) - parseInt(n.getPropertyValue("padding-left"));
|
|
78
|
+
t.target.previousElementSibling.offsetWidth >= p ? e.form.formItem[l.key].tempValueDisabled = !1 : e.form.formItem[l.key].tempValueDisabled = !0;
|
|
75
79
|
} else
|
|
76
80
|
e.form.formItem[l.key].tempValueDisabled = !1;
|
|
77
|
-
},
|
|
81
|
+
}, V = (t, l = "input", o = "请输入") => (o = [
|
|
78
82
|
"select",
|
|
79
83
|
"tree-select",
|
|
80
84
|
"cascader",
|
|
@@ -88,25 +92,26 @@ const h = (t, l, o) => {
|
|
|
88
92
|
"month",
|
|
89
93
|
"monthrange",
|
|
90
94
|
"year",
|
|
91
|
-
"years"
|
|
92
|
-
|
|
95
|
+
"years",
|
|
96
|
+
"time-picker"
|
|
97
|
+
].includes(l) ? "请选择" : o, o + (t || "")), v = (t, l = "formItem_") => l + (t || ""), w = (t = [], l, o, e) => {
|
|
93
98
|
var s, r;
|
|
94
99
|
for (const n in l.$slots) {
|
|
95
|
-
const
|
|
96
|
-
let
|
|
97
|
-
if (!
|
|
100
|
+
const p = n.split("formItem_").join("").split("_")[1];
|
|
101
|
+
let a = null;
|
|
102
|
+
if (!p)
|
|
98
103
|
return;
|
|
99
|
-
t.includes(
|
|
104
|
+
t.includes(p) && (a = (r = (s = l.$slots)[n]) == null ? void 0 : r.call(s, e), h(a) && (o[p] = () => a));
|
|
100
105
|
}
|
|
101
106
|
};
|
|
102
107
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
108
|
+
V as customPlaceholder,
|
|
109
|
+
d as findTreeNode,
|
|
110
|
+
v as formItemSlot,
|
|
111
|
+
I as getSpanValue,
|
|
107
112
|
y as getTooltipValue,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
113
|
+
g as labelMouseEnter,
|
|
114
|
+
w as renderSlot,
|
|
115
|
+
E as valueMouseEnter
|
|
111
116
|
};
|
|
112
117
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/form/utils/index.ts"],"sourcesContent":["import {isSlotsValue} from '@packages/utils/tools'\n\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 getSpanValue = (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', 'textarea', 'datetime',\n 'date',\n 'dates',\n 'week',\n 'month',\n 'year',\n 'years',\n 'datetimerange',\n 'daterange',\n 'monthrange',\n 'yearrange',].includes(type)) {\n return value\n } else if (['select', 'tree-select', 'select-v2', 'radio', 'radio-button', 'checkbox', 'checkbox-button'].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\n\nexport const renderSlot = (arr: string[] = [], _this: any, slots, item: any): any => {\n for (const prop in _this.$slots) {\n const slotName = prop.split('formItem_').join('').split('_')[1]\n let slotFn: any = null\n if (!slotName) {\n return\n }\n if (arr.includes(slotName)) {\n slotFn = _this.$slots[prop]?.(item)\n // eslint-disable-next-line consistent-return\n isSlotsValue(slotFn) && (slots[slotName] = () => slotFn)\n }\n }\n}\n"],"names":["labelMouseEnter","e","item","_this","el","labelEl","isRequried","labelWidth","findTreeNode","treeData","key","value","result","filterResult","getTooltipValue","type","options","tempArr","newVal","_a","_b","selectItem","_c","_d","getSpanValue","valueMouseEnter","showCom","inputEl","textWidth","customPlaceholder","customName","name","formItemSlot","renderSlot","arr","slots","prop","slotName","slotFn","isSlotsValue"],"mappings":";AAEO,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,GAAG,EAAE,gBAAgB,KAG9CC,EAAM,KAAK,SAASD,EAAK,GAAG,EAAE,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C,GAAiBf,IAAe,SAASgB,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,SAAShB,CAAI,IAAI,QAAQgB,GACrHA,KAASD,KAAe,MAGtBE,IAAe,CAACF,GAAiBC,IAAe,gBAClDA,KAAQD,KAAc,KAIpBG,IAAa,CAACC,IAAgB,CAAA,GAAI/B,GAAYgC,GAAOjC,MAAmB;;AACtE,aAAAkC,KAAQjC,EAAM,QAAQ;AACvB,UAAAkC,IAAWD,EAAK,MAAM,WAAW,EAAE,KAAK,EAAE,EAAE,MAAM,GAAG,EAAE,CAAC;AAC9D,QAAIE,IAAc;AAClB,QAAI,CAACD;AACD;AAEA,IAAAH,EAAI,SAASG,CAAQ,MACrBC,KAASlB,KAAAD,IAAAhB,EAAM,QAAOiC,OAAb,gBAAAhB,EAAA,KAAAD,GAAqBjB,IAE9BqC,EAAaD,CAAM,MAAMH,EAAME,CAAQ,IAAI,MAAMC;AAAA,EAEzD;AACJ;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../packages/components/form/utils/index.ts"],"sourcesContent":["import {isSlotsValue} from '@packages/utils/tools'\n\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\n let optValue = ['select-v2'].includes(type) ? options.props && options.props.value : options.value\n optValue = optValue || 'value'\n let optLabel = ['select-v2'].includes(type) ? options.props && options.props.label : options.label\n optLabel = optLabel || 'label'\n\n if (options.valueKey) {\n newVal = value && value[options.valueKey]\n }\n const selectItem = findTreeNode(options.options, options.value === 'object' ? options.valueKey : optValue, newVal || value)\n selectItem.forEach(item => {\n tempArr.push(item[optLabel])\n })\n if (tempArr && tempArr.length) {\n return tempArr.join(',')\n }\n return value\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 getSpanValue = (value: any, item: any): any => {\n const type = item.type\n const options = item.options || {}\n const tempArr: string[] = []\n\n\n if (['input', 'input-autocomplete', 'input-number', 'textarea', 'datetime',\n 'date',\n 'dates',\n 'week',\n 'month',\n 'year',\n 'years',\n 'datetimerange',\n 'daterange',\n 'monthrange',\n 'yearrange',].includes(type)) {\n return value\n } else if (['select', 'tree-select', 'select-v2', 'radio', 'radio-button', 'checkbox', 'checkbox-button'].includes(type)) {\n if (options && options.options && options.options.length) {\n let newVal = null\n let optValue = ['select-v2'].includes(type) ? options.props && options.props.value : options.value\n optValue = optValue || 'value'\n let optLabel = ['select-v2'].includes(type) ? options.props && options.props.label : options.label\n optLabel = optLabel || 'label'\n\n if (options.valueKey) {\n newVal = value && value[options.valueKey]\n }\n const selectItem = findTreeNode(options.options, options.value === 'object' ? options.valueKey : optValue, newVal || value)\n selectItem.forEach(item => {\n tempArr.push(item[optLabel])\n })\n if (tempArr && tempArr.length) {\n return tempArr.join(',')\n }\n return value\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', 'time-picker'].includes(type) ? '请选择' : name\n return name + ((customName) || '')\n}\n\nexport const formItemSlot = (customName: any, name: string = 'formItem_') => {\n return name + (customName || '')\n}\n\n\nexport const renderSlot = (arr: string[] = [], _this: any, slots, item: any): any => {\n for (const prop in _this.$slots) {\n const slotName = prop.split('formItem_').join('').split('_')[1]\n let slotFn: any = null\n if (!slotName) {\n return\n }\n if (arr.includes(slotName)) {\n slotFn = _this.$slots[prop]?.(item)\n // eslint-disable-next-line consistent-return\n isSlotsValue(slotFn) && (slots[slotName] = () => slotFn)\n }\n }\n}\n"],"names":["labelMouseEnter","e","item","_this","el","labelEl","isRequried","labelWidth","findTreeNode","treeData","key","value","result","filterResult","getTooltipValue","type","options","tempArr","newVal","optValue","optLabel","_a","_b","selectItem","_c","_d","getSpanValue","valueMouseEnter","showCom","inputEl","textWidth","customPlaceholder","customName","name","formItemSlot","renderSlot","arr","slots","prop","slotName","slotFn","isSlotsValue"],"mappings":";AAEO,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,GAAG,EAAE,gBAAgB,KAG9CC,EAAM,KAAK,SAASD,EAAK,GAAG,EAAE,gBAAgB;AAEtD,GAEaM,IAAe,CAACC,GAAeC,GAAaC,MAAkB;AACvE,QAAMC,IAAgB,CAAA;AACtB,WAASC,EAAaJ,G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'../types';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
form: {
|
|
5
|
+
type: PropType<RewriteFormProps<any, any>>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
formItem: {
|
|
9
|
+
type: PropType<CustomFormItemProps<any, any[], any>>;
|
|
10
|
+
default: () => {};
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
options: import("vue").ComputedRef<any>;
|
|
14
|
+
sliderRef: import("vue").Ref<null>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any, any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<any, any[], any>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any, any>;
|
|
26
|
+
formItem: CustomFormItemProps<any, any[], any>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../types';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
form: {
|
|
5
|
+
type: PropType<RewriteFormProps<any, any>>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
formItem: {
|
|
9
|
+
type: PropType<CustomFormItemProps<any, any[], any>>;
|
|
10
|
+
default: () => {};
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
options: import("vue").ComputedRef<any>;
|
|
14
|
+
timePickerRef: import("vue").Ref<null>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any, any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<any, any[], any>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any, any>;
|
|
26
|
+
formItem: CustomFormItemProps<any, any[], any>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RewriteFormProps, CustomFormItemProps } from '../types';
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
form: {
|
|
5
|
+
type: PropType<RewriteFormProps<any, any>>;
|
|
6
|
+
default: () => {};
|
|
7
|
+
};
|
|
8
|
+
formItem: {
|
|
9
|
+
type: PropType<CustomFormItemProps<any, any[], any>>;
|
|
10
|
+
default: () => {};
|
|
11
|
+
};
|
|
12
|
+
}, {
|
|
13
|
+
options: import("vue").ComputedRef<any>;
|
|
14
|
+
timeSelectRef: import("vue").Ref<null>;
|
|
15
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
16
|
+
form: {
|
|
17
|
+
type: PropType<RewriteFormProps<any, any>>;
|
|
18
|
+
default: () => {};
|
|
19
|
+
};
|
|
20
|
+
formItem: {
|
|
21
|
+
type: PropType<CustomFormItemProps<any, any[], any>>;
|
|
22
|
+
default: () => {};
|
|
23
|
+
};
|
|
24
|
+
}>>, {
|
|
25
|
+
form: RewriteFormProps<any, any>;
|
|
26
|
+
formItem: CustomFormItemProps<any, any[], any>;
|
|
27
|
+
}, {}>;
|
|
28
|
+
export default _default;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ExtractPropTypes } from 'vue';
|
|
2
2
|
import { MergeProp } from './utils';
|
|
3
|
-
import { InputProps, ElInput, SelectOptionProxy, ElSelect, cascaderProps, ElCascader, AutocompleteProps, ElAutocomplete, ElInputNumber, InputNumberProps, SwitchProps, DatePickerProps, ElDatePicker, RadioGroupProps, ElRadioGroup, CheckboxProps, RadioProps, CheckboxGroupProps, ElCheckbox, ElTreeSelect, RateProps, ElRate, CascaderProps, ElTree } from 'element-plus';
|
|
3
|
+
import { InputProps, ElInput, SelectOptionProxy, ElSelect, cascaderProps, ElCascader, AutocompleteProps, ElAutocomplete, ElInputNumber, InputNumberProps, SwitchProps, DatePickerProps, ElDatePicker, RadioGroupProps, ElRadioGroup, CheckboxProps, RadioProps, CheckboxGroupProps, ElCheckbox, ElTreeSelect, RateProps, ElRate, CascaderProps, ElTree, ElSlider, SliderProps, TimePickerDefaultProps, ElTimePicker, ElTimeSelect } from 'element-plus';
|
|
4
4
|
import { TreeOptionProps } from 'element-plus/es/components/tree-v2/src/types';
|
|
5
5
|
import type { SelectProps } from 'element-plus/es/components/select/src/select';
|
|
6
6
|
import { TreeProps } from 'element-plus/es/components/tree-v2/src/types';
|
|
7
|
+
import { TimeSelectProps } from 'element-plus/es/components/time-select/src/time-select';
|
|
7
8
|
type CommonFn = 'onChange' | 'onClear' | 'onBlur' | 'onFocus';
|
|
8
9
|
export type RewriteInputProps = Partial<InputProps & Pick<typeof ElInput, 'onInput' | CommonFn>>;
|
|
9
10
|
export type RewriteTextareaProps = Partial<InputProps & Pick<typeof ElInput, 'onInput' | CommonFn>>;
|
|
@@ -28,7 +29,7 @@ export type RewriteCheckboxGroupProps<O = any[]> = Partial<CheckboxGroupProps &
|
|
|
28
29
|
options: O | CheckboxProps[];
|
|
29
30
|
value: string;
|
|
30
31
|
} & Pick<typeof ElCheckbox, 'onChange'>>;
|
|
31
|
-
export type RewriteTreeSelectProps<O = any[]> = Partial<
|
|
32
|
+
export type RewriteTreeSelectProps<O = any[]> = Partial<TreeProps & Omit<ExtractPropTypes<typeof SelectProps>, 'options'> & {
|
|
32
33
|
options: O | SelectOptionProxy[];
|
|
33
34
|
label: string;
|
|
34
35
|
value: string;
|
|
@@ -37,4 +38,7 @@ export type RewriteTreeSelectProps<O = any[]> = Partial<Omit<TreeProps, 'props'>
|
|
|
37
38
|
export type RewriteRewriteRateProps<O = any[]> = Partial<Omit<RateProps, 'options'> & {
|
|
38
39
|
options: O;
|
|
39
40
|
} & Pick<typeof ElRate, 'onChange'>>;
|
|
41
|
+
export type RewriteSliderProps = Partial<SliderProps & Pick<typeof ElSlider, 'onChange' | 'onInput'>>;
|
|
42
|
+
export type RewriteTimePickerProps = Partial<TimePickerDefaultProps & Pick<typeof ElTimePicker, CommonFn | 'onVisible-change'>>;
|
|
43
|
+
export type RewriteTimeSelectProps = Partial<TimeSelectProps & Pick<typeof ElTimeSelect, CommonFn>>;
|
|
40
44
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FormProps, type FormItemProps, type ColProps, type RowProps, ButtonProps } from 'element-plus';
|
|
2
|
-
import { RewriteInputProps, RewriteSelectProps, RewriteTextareaProps, RewriteCascaderProps, RewriteAutocompleteProps, RewriteInputNumberProps, RewriteSwitchProps, RewriteDatePickerProps, RewriteRadioGroupProps, RewriteCheckboxGroupProps, RewriteTreeSelectProps, RewriteRewriteRateProps } from './components';
|
|
2
|
+
import { RewriteInputProps, RewriteSelectProps, RewriteTextareaProps, RewriteCascaderProps, RewriteAutocompleteProps, RewriteInputNumberProps, RewriteSwitchProps, RewriteDatePickerProps, RewriteRadioGroupProps, RewriteCheckboxGroupProps, RewriteTreeSelectProps, RewriteRewriteRateProps, RewriteSliderProps, RewriteTimePickerProps, RewriteTimeSelectProps } from './components';
|
|
3
3
|
import { MergeProp } from './utils';
|
|
4
4
|
import { TreeProps } from 'element-plus/es/components/tree-v2/src/types';
|
|
5
5
|
type RewriteColProps = Partial<ColProps>;
|
|
@@ -30,6 +30,9 @@ export interface RewriteFormItemPropsMap<O = any[]> {
|
|
|
30
30
|
'tree-select': RewriteTreeSelectProps<O>;
|
|
31
31
|
'radio-button': RewriteRadioGroupProps<O>;
|
|
32
32
|
'rate': RewriteRewriteRateProps<O>;
|
|
33
|
+
slider: RewriteSliderProps;
|
|
34
|
+
'time-picker': RewriteTimePickerProps;
|
|
35
|
+
'time-select': RewriteTimeSelectProps;
|
|
33
36
|
}
|
|
34
37
|
export interface CustomFormItemProps<D = any, O = any[], N extends keyof RewriteFormItemPropsMap = any> extends Partial<Omit<FormItemProps, 'label'>> {
|
|
35
38
|
key?: any;
|
|
@@ -39,7 +42,7 @@ export interface CustomFormItemProps<D = any, O = any[], N extends keyof Rewrite
|
|
|
39
42
|
label: string | ((model: D) => string);
|
|
40
43
|
sort?: number;
|
|
41
44
|
options?: RewriteFormItemPropsMap<O>[N];
|
|
42
|
-
showLabel?: boolean;
|
|
45
|
+
showLabel?: boolean | ((model: D) => boolean);
|
|
43
46
|
labelDisabled?: boolean;
|
|
44
47
|
labelWrap?: boolean;
|
|
45
48
|
valueDisabled?: boolean;
|
|
@@ -60,7 +63,7 @@ export interface RewriteFormProps<D = any, FI = any> extends Omit<Partial<FormPr
|
|
|
60
63
|
formItem: Partial<FormItemMap<D, FI>>;
|
|
61
64
|
colLayout?: RewriteColProps;
|
|
62
65
|
row?: RewriteRowProps;
|
|
63
|
-
showLabel?: boolean;
|
|
66
|
+
showLabel?: boolean | ((model: D) => boolean);
|
|
64
67
|
required?: boolean;
|
|
65
68
|
key?: any;
|
|
66
69
|
packUp?: boolean;
|
|
@@ -128,7 +131,6 @@ export interface FormItemPropsCheckbox<D, FI> extends CustomFormItemProps<D, FI>
|
|
|
128
131
|
export interface FormItemPropsTreeSelect<D, FI> extends CustomFormItemProps<D, FI> {
|
|
129
132
|
type: 'tree-select';
|
|
130
133
|
options?: RewriteTreeSelectProps & {
|
|
131
|
-
props?: TreeProps['props'];
|
|
132
134
|
nodeKey?: string;
|
|
133
135
|
};
|
|
134
136
|
}
|
|
@@ -136,5 +138,17 @@ export interface FormItemPropsRate<D, FI> extends CustomFormItemProps<D, FI> {
|
|
|
136
138
|
type: 'rate';
|
|
137
139
|
options?: RewriteRewriteRateProps;
|
|
138
140
|
}
|
|
139
|
-
export
|
|
141
|
+
export interface FormItemPropsSlider<D, FI> extends CustomFormItemProps<D, FI> {
|
|
142
|
+
type: 'slider';
|
|
143
|
+
options?: RewriteSliderProps;
|
|
144
|
+
}
|
|
145
|
+
export interface FormItemPropsTimePicker<D, FI> extends CustomFormItemProps<D, FI> {
|
|
146
|
+
type: 'time-picker';
|
|
147
|
+
options?: RewriteTimePickerProps;
|
|
148
|
+
}
|
|
149
|
+
export interface FormItemPropsTimeSelect<D, FI> extends CustomFormItemProps<D, FI> {
|
|
150
|
+
type: 'time-select';
|
|
151
|
+
options?: RewriteTimeSelectProps;
|
|
152
|
+
}
|
|
153
|
+
export type FormItemPropsCommon<D, FI> = FormItemPropsInput<D, FI> | FormItemPropsSelect<D, FI> | FormItemPropsCustom<D, FI> | FormItemPropsTextarea<D, FI> | FormItemPropsCascader<D, FI> | FormItemPropsInputAutocomplete<D, FI> | FormItemPropsInputNumber<D, FI> | FormItemPropsSwitch<D, FI> | FormItemPropsDate<D, FI> | FormItemPropsRadio<D, FI> | FormItemPropsCheckbox<D, FI> | FormItemPropsTreeSelect<D, FI> | FormItemPropsRate<D, FI> | FormItemPropsSelectV2<D, FI> | FormItemPropsSlider<D, FI> | FormItemPropsTimePicker<D, FI> | FormItemPropsTimeSelect<D, FI>;
|
|
140
154
|
export {};
|
package/es/style.css
CHANGED
|
@@ -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}.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-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
|
|
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}.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}.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.dialog .el-form-left .el-col.slider .label-text{overflow:unset}.dinert-form.el-form.dialog .el-form-left .el-col.slider .label-text .el-slider{padding-left:12px}.dinert-form.el-form.dialog .el-form-left .el-col.slider .label-text .el-slider .el-input-number{width:auto}.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:not(.el-slider__button){width:100%}.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-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}
|