@fangzhongya/fang-ui 0.0.28 → 0.0.29
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/components/array/src/index.cjs +6 -9
- package/dist/components/array/src/index.js +6 -9
- package/dist/components/cascader/index.d.ts +1 -1
- package/dist/components/cascader/src/index.d.ts +2 -2
- package/dist/components/checks/src/index.cjs +4 -4
- package/dist/components/checks/src/index.js +4 -4
- package/dist/components/common/list.cjs +2 -3
- package/dist/components/common/list.js +2 -3
- package/dist/components/common/use.cjs +11 -11
- package/dist/components/common/use.js +11 -11
- package/dist/components/cs-slot/src/index.cjs +6 -6
- package/dist/components/cs-slot/src/index.js +6 -6
- package/dist/components/dialog/src/index.cjs +2 -2
- package/dist/components/dialog/src/index.js +2 -2
- package/dist/components/edit-float/src/index2.cjs +2 -2
- package/dist/components/edit-float/src/index2.js +2 -2
- package/dist/components/el-tables/src/columns3.cjs +1 -1
- package/dist/components/el-tables/src/columns3.js +1 -1
- package/dist/components/el-tables/src/index.cjs +2 -3
- package/dist/components/el-tables/src/index.js +2 -3
- package/dist/components/forms/src/index.cjs +2 -2
- package/dist/components/forms/src/index.js +2 -2
- package/dist/components/forms/src/setup.cjs +5 -8
- package/dist/components/forms/src/setup.js +5 -8
- package/dist/components/forms/src/util.cjs +1 -2
- package/dist/components/forms/src/util.js +1 -2
- package/dist/components/forms-drag/src/index.cjs +2 -2
- package/dist/components/forms-drag/src/index.js +2 -2
- package/dist/components/forms-item/src/index.cjs +1 -1
- package/dist/components/forms-item/src/index.js +1 -1
- package/dist/components/forms-items/src/index.cjs +2 -2
- package/dist/components/forms-items/src/index.js +2 -2
- package/dist/components/global-config/src/index.cjs +1 -1
- package/dist/components/global-config/src/index.js +1 -1
- package/dist/components/icon-picker/src/index.cjs +4 -6
- package/dist/components/icon-picker/src/index.js +4 -6
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/src/index.d.ts +2 -2
- package/dist/components/input-number/index.d.ts +1 -1
- package/dist/components/input-number/src/index.d.ts +2 -2
- package/dist/components/input-select/index.d.ts +1 -1
- package/dist/components/input-select/src/index.d.ts +2 -2
- package/dist/components/input-select/src/index2.cjs +1 -1
- package/dist/components/input-select/src/index2.js +1 -1
- package/dist/components/labels/src/index2.cjs +1 -2
- package/dist/components/labels/src/index2.js +1 -2
- package/dist/components/menus/src/menu-ll.cjs +1 -1
- package/dist/components/menus/src/menu-ll.js +1 -1
- package/dist/components/page/src/index.cjs +65 -85
- package/dist/components/page/src/index.js +65 -85
- package/dist/components/page/src/set-column2.cjs +2 -2
- package/dist/components/page/src/set-column2.js +2 -2
- package/dist/components/right-key/index.d.ts +15 -0
- package/dist/components/right-key/src/data.cjs +4 -0
- package/dist/components/right-key/src/data.d.ts +4 -0
- package/dist/components/right-key/src/data.js +4 -0
- package/dist/components/right-key/src/index.cjs +5 -1
- package/dist/components/right-key/src/index.d.ts +9 -0
- package/dist/components/right-key/src/index.js +5 -1
- package/dist/components/role-select/src/index.cjs +1 -1
- package/dist/components/role-select/src/index.js +1 -1
- package/dist/components/selector/src/index2.cjs +2 -2
- package/dist/components/selector/src/index2.js +2 -2
- package/dist/components/selects/src/index.cjs +1 -1
- package/dist/components/selects/src/index.js +1 -1
- package/dist/components/stick-window/src/index.cjs +1 -1
- package/dist/components/stick-window/src/index.js +1 -1
- package/dist/components/switchs/src/index.cjs +4 -4
- package/dist/components/switchs/src/index.js +4 -4
- package/dist/components/table-list/src/table-list.cjs +10 -15
- package/dist/components/table-list/src/table-list.js +10 -15
- package/dist/components/tables/common/pagin.cjs +40 -57
- package/dist/components/tables/common/pagin.js +40 -57
- package/dist/components/tables/common/table-but.cjs +1 -2
- package/dist/components/tables/common/table-but.js +1 -2
- package/dist/components/tables/common/table-color.cjs +4 -5
- package/dist/components/tables/common/table-color.js +4 -5
- package/dist/components/tables/common/table-list.cjs +1 -2
- package/dist/components/tables/common/table-list.js +1 -2
- package/dist/components/tables/common/util.cjs +2 -3
- package/dist/components/tables/common/util.js +2 -3
- package/dist/components/tables/src/index.cjs +4 -5
- package/dist/components/tables/src/index.js +4 -5
- package/dist/components/tables-form/src/columns3.cjs +1 -1
- package/dist/components/tables-form/src/columns3.js +1 -1
- package/dist/components/tables-form/src/index.cjs +4 -7
- package/dist/components/tables-form/src/index.js +4 -7
- package/dist/components/tables-pagin/src/index.cjs +3 -4
- package/dist/components/tables-pagin/src/index.js +3 -4
- package/dist/components/vxe-tables/src/columns3.cjs +1 -1
- package/dist/components/vxe-tables/src/columns3.js +1 -1
- package/dist/components/vxe-tables/src/index.cjs +2 -3
- package/dist/components/vxe-tables/src/index.js +2 -3
- package/dist/directives/adjust/index.cjs +1 -2
- package/dist/directives/adjust/index.js +1 -2
- package/dist/hooks/global-config/index.cjs +2 -5
- package/dist/hooks/global-config/index.js +2 -5
- package/package.json +13 -13
- /package/dist/components/{forms-items → forms-item}/index.css +0 -0
|
@@ -27,8 +27,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
27
|
return false;
|
|
28
28
|
});
|
|
29
29
|
const multiple = vue.computed(() => {
|
|
30
|
-
|
|
31
|
-
let multiple2 = (_a = props.config) == null ? void 0 : _a.multiple;
|
|
30
|
+
let multiple2 = props.config?.multiple;
|
|
32
31
|
if (props.multiple) {
|
|
33
32
|
if (multiple2 === true) {
|
|
34
33
|
return "|";
|
|
@@ -81,7 +80,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
81
80
|
}
|
|
82
81
|
const errer = vue.ref();
|
|
83
82
|
function onInput(type) {
|
|
84
|
-
var _a, _b;
|
|
85
83
|
if (props.check) {
|
|
86
84
|
errer.value = void 0;
|
|
87
85
|
if (start.value && end.value) {
|
|
@@ -107,7 +105,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
107
105
|
if (start.value > end.value) {
|
|
108
106
|
callback(
|
|
109
107
|
new Error(
|
|
110
|
-
props.endPlaceholder + (
|
|
108
|
+
props.endPlaceholder + (props.config?.placeholder ?? "") + "不能大于" + props.startPlaceholder + (props.config?.placeholder ?? "")
|
|
111
109
|
)
|
|
112
110
|
);
|
|
113
111
|
return false;
|
|
@@ -167,7 +165,6 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
167
165
|
...data.dataExpose
|
|
168
166
|
});
|
|
169
167
|
return (_ctx, _cache) => {
|
|
170
|
-
var _a, _b, _c, _d;
|
|
171
168
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
172
169
|
class: vue.normalizeClass([vue.unref(cs).z(), vue.unref(cs).is("focus", isfocus.value)]),
|
|
173
170
|
onMouseenter,
|
|
@@ -183,7 +180,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
183
180
|
_cache[0] || (_cache[0] = ($event) => start.value = $event),
|
|
184
181
|
_cache[1] || (_cache[1] = ($event) => onInput(0))
|
|
185
182
|
],
|
|
186
|
-
placeholder: props.startPlaceholder + (
|
|
183
|
+
placeholder: props.startPlaceholder + (props.config?.placeholder ?? ""),
|
|
187
184
|
onClick: vue.withModifiers(onFocus, ["stop"]),
|
|
188
185
|
onBlur
|
|
189
186
|
}), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
|
|
@@ -198,7 +195,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
198
195
|
_cache[2] || (_cache[2] = ($event) => end.value = $event),
|
|
199
196
|
_cache[3] || (_cache[3] = ($event) => onInput(1))
|
|
200
197
|
],
|
|
201
|
-
placeholder: props.endPlaceholder + (
|
|
198
|
+
placeholder: props.endPlaceholder + (props.config?.placeholder ?? ""),
|
|
202
199
|
onClick: vue.withModifiers(onFocus, ["stop"]),
|
|
203
200
|
onBlur
|
|
204
201
|
}), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
|
|
@@ -207,9 +204,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
207
204
|
class: vue.normalizeClass([
|
|
208
205
|
vue.unref(cs).z("error"),
|
|
209
206
|
vue.unref(cs).is("clear", isclear.value),
|
|
210
|
-
"type-" +
|
|
207
|
+
"type-" + errer.value?.type
|
|
211
208
|
])
|
|
212
|
-
}, vue.toDisplayString(
|
|
209
|
+
}, vue.toDisplayString(errer.value?.message ? errer.value.message : errer.value), 3)) : vue.createCommentVNode("", true),
|
|
213
210
|
vue.createElementVNode("input", {
|
|
214
211
|
class: vue.normalizeClass(vue.unref(cs).z("focus")),
|
|
215
212
|
ref_key: "refInput",
|
|
@@ -25,8 +25,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
25
|
return false;
|
|
26
26
|
});
|
|
27
27
|
const multiple = computed(() => {
|
|
28
|
-
|
|
29
|
-
let multiple2 = (_a = props.config) == null ? void 0 : _a.multiple;
|
|
28
|
+
let multiple2 = props.config?.multiple;
|
|
30
29
|
if (props.multiple) {
|
|
31
30
|
if (multiple2 === true) {
|
|
32
31
|
return "|";
|
|
@@ -79,7 +78,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
78
|
}
|
|
80
79
|
const errer = ref();
|
|
81
80
|
function onInput(type) {
|
|
82
|
-
var _a, _b;
|
|
83
81
|
if (props.check) {
|
|
84
82
|
errer.value = void 0;
|
|
85
83
|
if (start.value && end.value) {
|
|
@@ -105,7 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
103
|
if (start.value > end.value) {
|
|
106
104
|
callback(
|
|
107
105
|
new Error(
|
|
108
|
-
props.endPlaceholder + (
|
|
106
|
+
props.endPlaceholder + (props.config?.placeholder ?? "") + "不能大于" + props.startPlaceholder + (props.config?.placeholder ?? "")
|
|
109
107
|
)
|
|
110
108
|
);
|
|
111
109
|
return false;
|
|
@@ -165,7 +163,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
165
163
|
...dataExpose
|
|
166
164
|
});
|
|
167
165
|
return (_ctx, _cache) => {
|
|
168
|
-
var _a, _b, _c, _d;
|
|
169
166
|
return openBlock(), createElementBlock("div", {
|
|
170
167
|
class: normalizeClass([unref(cs).z(), unref(cs).is("focus", isfocus.value)]),
|
|
171
168
|
onMouseenter,
|
|
@@ -181,7 +178,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
181
178
|
_cache[0] || (_cache[0] = ($event) => start.value = $event),
|
|
182
179
|
_cache[1] || (_cache[1] = ($event) => onInput(0))
|
|
183
180
|
],
|
|
184
|
-
placeholder: props.startPlaceholder + (
|
|
181
|
+
placeholder: props.startPlaceholder + (props.config?.placeholder ?? ""),
|
|
185
182
|
onClick: withModifiers(onFocus, ["stop"]),
|
|
186
183
|
onBlur
|
|
187
184
|
}), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
|
|
@@ -196,7 +193,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
196
193
|
_cache[2] || (_cache[2] = ($event) => end.value = $event),
|
|
197
194
|
_cache[3] || (_cache[3] = ($event) => onInput(1))
|
|
198
195
|
],
|
|
199
|
-
placeholder: props.endPlaceholder + (
|
|
196
|
+
placeholder: props.endPlaceholder + (props.config?.placeholder ?? ""),
|
|
200
197
|
onClick: withModifiers(onFocus, ["stop"]),
|
|
201
198
|
onBlur
|
|
202
199
|
}), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
|
|
@@ -205,9 +202,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
205
202
|
class: normalizeClass([
|
|
206
203
|
unref(cs).z("error"),
|
|
207
204
|
unref(cs).is("clear", isclear.value),
|
|
208
|
-
"type-" +
|
|
205
|
+
"type-" + errer.value?.type
|
|
209
206
|
])
|
|
210
|
-
}, toDisplayString(
|
|
207
|
+
}, toDisplayString(errer.value?.message ? errer.value.message : errer.value), 3)) : createCommentVNode("", true),
|
|
211
208
|
createElementVNode("input", {
|
|
212
209
|
class: normalizeClass(unref(cs).z("focus")),
|
|
213
210
|
ref_key: "refInput",
|
|
@@ -57,9 +57,9 @@ declare const Cascader: {
|
|
|
57
57
|
readonly tagEffect: "plain" | "dark" | "light";
|
|
58
58
|
readonly size?: ("" | "default" | "small" | "large") | undefined;
|
|
59
59
|
readonly modelValue?: ((string | number)[] | (string | number) | ((string | number)[] | (string | number))[]) | undefined;
|
|
60
|
+
readonly placeholder?: string | undefined;
|
|
60
61
|
readonly emptyValues?: unknown[] | undefined;
|
|
61
62
|
readonly valueOnClear?: (string | number | boolean | Function) | undefined;
|
|
62
|
-
readonly placeholder?: string | undefined;
|
|
63
63
|
readonly maxCollapseTagsTooltipHeight?: (string | number) | undefined;
|
|
64
64
|
"onUpdate:modelValue"?: ((value: CascaderValue) => any) | undefined | undefined;
|
|
65
65
|
onChange?: ((value: CascaderValue) => any) | undefined | undefined;
|
|
@@ -55,9 +55,9 @@ declare function __VLS_template(): {
|
|
|
55
55
|
readonly tagEffect: "plain" | "dark" | "light";
|
|
56
56
|
readonly size?: ("" | "default" | "small" | "large") | undefined;
|
|
57
57
|
readonly modelValue?: ((string | number)[] | (string | number) | ((string | number)[] | (string | number))[]) | undefined;
|
|
58
|
+
readonly placeholder?: string | undefined;
|
|
58
59
|
readonly emptyValues?: unknown[] | undefined;
|
|
59
60
|
readonly valueOnClear?: (string | number | boolean | Function) | undefined;
|
|
60
|
-
readonly placeholder?: string | undefined;
|
|
61
61
|
readonly maxCollapseTagsTooltipHeight?: (string | number) | undefined;
|
|
62
62
|
"onUpdate:modelValue"?: ((value: CascaderValue) => any) | undefined | undefined;
|
|
63
63
|
onChange?: ((value: CascaderValue) => any) | undefined | undefined;
|
|
@@ -580,9 +580,9 @@ declare const __VLS_component: DefineComponent<{}, {
|
|
|
580
580
|
readonly tagEffect: "plain" | "dark" | "light";
|
|
581
581
|
readonly size?: ("" | "default" | "small" | "large") | undefined;
|
|
582
582
|
readonly modelValue?: ((string | number)[] | (string | number) | ((string | number)[] | (string | number))[]) | undefined;
|
|
583
|
+
readonly placeholder?: string | undefined;
|
|
583
584
|
readonly emptyValues?: unknown[] | undefined;
|
|
584
585
|
readonly valueOnClear?: (string | number | boolean | Function) | undefined;
|
|
585
|
-
readonly placeholder?: string | undefined;
|
|
586
586
|
readonly maxCollapseTagsTooltipHeight?: (string | number) | undefined;
|
|
587
587
|
"onUpdate:modelValue"?: ((value: CascaderValue) => any) | undefined | undefined;
|
|
588
588
|
onChange?: ((value: CascaderValue) => any) | undefined | undefined;
|
|
@@ -51,8 +51,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
51
51
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.options, (item) => {
|
|
52
52
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(comps.value), {
|
|
53
53
|
value: vue.unref(use.useVueValue)(item, props.prop),
|
|
54
|
-
border: item
|
|
55
|
-
disabled: item
|
|
54
|
+
border: item?.border,
|
|
55
|
+
disabled: item?.disabled,
|
|
56
56
|
onChange: (is) => onChange(item, is)
|
|
57
57
|
}, {
|
|
58
58
|
default: vue.withCtx(() => [
|
|
@@ -74,9 +74,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
74
74
|
default: vue.withCtx(() => [
|
|
75
75
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.options, (item) => {
|
|
76
76
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(comps.value), {
|
|
77
|
-
border: item
|
|
77
|
+
border: item?.border,
|
|
78
78
|
value: vue.unref(use.useVueValue)(item, props.prop),
|
|
79
|
-
disabled: item
|
|
79
|
+
disabled: item?.disabled
|
|
80
80
|
}, {
|
|
81
81
|
default: vue.withCtx(() => [
|
|
82
82
|
vue.createTextVNode(vue.toDisplayString(vue.unref(use.useVueValue)(item, props.label)), 1)
|
|
@@ -49,8 +49,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
49
49
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.options, (item) => {
|
|
50
50
|
return openBlock(), createBlock(resolveDynamicComponent(comps.value), {
|
|
51
51
|
value: unref(useVueValue)(item, props.prop),
|
|
52
|
-
border: item
|
|
53
|
-
disabled: item
|
|
52
|
+
border: item?.border,
|
|
53
|
+
disabled: item?.disabled,
|
|
54
54
|
onChange: (is) => onChange(item, is)
|
|
55
55
|
}, {
|
|
56
56
|
default: withCtx(() => [
|
|
@@ -72,9 +72,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
72
|
default: withCtx(() => [
|
|
73
73
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.options, (item) => {
|
|
74
74
|
return openBlock(), createBlock(resolveDynamicComponent(comps.value), {
|
|
75
|
-
border: item
|
|
75
|
+
border: item?.border,
|
|
76
76
|
value: unref(useVueValue)(item, props.prop),
|
|
77
|
-
disabled: item
|
|
77
|
+
disabled: item?.disabled
|
|
78
78
|
}, {
|
|
79
79
|
default: withCtx(() => [
|
|
80
80
|
createTextVNode(toDisplayString(unref(useVueValue)(item, props.label)), 1)
|
|
@@ -90,14 +90,13 @@ function comHandle(props2, emit) {
|
|
|
90
90
|
immediate: true
|
|
91
91
|
});
|
|
92
92
|
function getValueObjs(v) {
|
|
93
|
-
var _a, _b;
|
|
94
93
|
if (isValue(v)) {
|
|
95
94
|
if (selectMultiple.value && v instanceof Array) {
|
|
96
|
-
return
|
|
95
|
+
return props2.options?.filter((o) => {
|
|
97
96
|
return v.includes(use.useVueValue(o, props2.prop));
|
|
98
97
|
});
|
|
99
98
|
} else {
|
|
100
|
-
return
|
|
99
|
+
return props2.options?.filter((o) => {
|
|
101
100
|
return use.useVueValue(o, props2.prop) === v;
|
|
102
101
|
});
|
|
103
102
|
}
|
|
@@ -88,14 +88,13 @@ function comHandle(props2, emit) {
|
|
|
88
88
|
immediate: true
|
|
89
89
|
});
|
|
90
90
|
function getValueObjs(v) {
|
|
91
|
-
var _a, _b;
|
|
92
91
|
if (isValue(v)) {
|
|
93
92
|
if (selectMultiple.value && v instanceof Array) {
|
|
94
|
-
return
|
|
93
|
+
return props2.options?.filter((o) => {
|
|
95
94
|
return v.includes(useVueValue(o, props2.prop));
|
|
96
95
|
});
|
|
97
96
|
} else {
|
|
98
|
-
return
|
|
97
|
+
return props2.options?.filter((o) => {
|
|
99
98
|
return useVueValue(o, props2.prop) === v;
|
|
100
99
|
});
|
|
101
100
|
}
|
|
@@ -75,29 +75,29 @@ function getValueObjs(value, multiple, options, config) {
|
|
|
75
75
|
if (value !== void 0 && value !== null) {
|
|
76
76
|
if (multiple) {
|
|
77
77
|
if (multiple === true) {
|
|
78
|
-
const d = options
|
|
78
|
+
const d = options?.filter((o) => {
|
|
79
79
|
return value.includes(
|
|
80
|
-
useVueValue(o,
|
|
80
|
+
useVueValue(o, config?.prop ?? "value")
|
|
81
81
|
);
|
|
82
82
|
});
|
|
83
83
|
return d.map((o) => {
|
|
84
|
-
return o[
|
|
84
|
+
return o[config?.label ?? "label"] ?? useVueValue(o, config?.prop ?? "value");
|
|
85
85
|
}).join(",");
|
|
86
86
|
} else {
|
|
87
87
|
const z = value.split(multiple);
|
|
88
|
-
const d = options
|
|
89
|
-
return z.includes(useVueValue(o,
|
|
88
|
+
const d = options?.filter((o) => {
|
|
89
|
+
return z.includes(useVueValue(o, config?.prop ?? "value"));
|
|
90
90
|
});
|
|
91
91
|
return d.map((o) => {
|
|
92
|
-
return o[
|
|
92
|
+
return o[config?.label ?? "label"] ?? useVueValue(o, config?.prop ?? "value");
|
|
93
93
|
}).join(multiple);
|
|
94
94
|
}
|
|
95
95
|
} else {
|
|
96
|
-
const d = options
|
|
97
|
-
return useVueValue(o,
|
|
96
|
+
const d = options?.filter((o) => {
|
|
97
|
+
return useVueValue(o, config?.prop ?? "value") === value;
|
|
98
98
|
});
|
|
99
99
|
if (d.length > 0) {
|
|
100
|
-
return d[0][
|
|
100
|
+
return d[0][config?.label ?? "label"] ?? value;
|
|
101
101
|
} else {
|
|
102
102
|
return value;
|
|
103
103
|
}
|
|
@@ -108,7 +108,7 @@ function getValueObjs(value, multiple, options, config) {
|
|
|
108
108
|
}
|
|
109
109
|
function setOptionsValue(value, obj, data, optionss) {
|
|
110
110
|
let options = [];
|
|
111
|
-
if (obj
|
|
111
|
+
if (obj?.options) {
|
|
112
112
|
const opt = obj.options;
|
|
113
113
|
if (typeof opt === "string") {
|
|
114
114
|
const value2 = optionss[opt];
|
|
@@ -157,7 +157,7 @@ function getValue(obj, data, index) {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
function setComponString(value, obj, componObj, data, optionss, compons) {
|
|
160
|
-
if (obj
|
|
160
|
+
if (obj?.options) {
|
|
161
161
|
let options = [];
|
|
162
162
|
const opt = obj.options;
|
|
163
163
|
if (typeof opt === "string") {
|
|
@@ -73,29 +73,29 @@ function getValueObjs(value, multiple, options, config) {
|
|
|
73
73
|
if (value !== void 0 && value !== null) {
|
|
74
74
|
if (multiple) {
|
|
75
75
|
if (multiple === true) {
|
|
76
|
-
const d = options
|
|
76
|
+
const d = options?.filter((o) => {
|
|
77
77
|
return value.includes(
|
|
78
|
-
useVueValue(o,
|
|
78
|
+
useVueValue(o, config?.prop ?? "value")
|
|
79
79
|
);
|
|
80
80
|
});
|
|
81
81
|
return d.map((o) => {
|
|
82
|
-
return o[
|
|
82
|
+
return o[config?.label ?? "label"] ?? useVueValue(o, config?.prop ?? "value");
|
|
83
83
|
}).join(",");
|
|
84
84
|
} else {
|
|
85
85
|
const z = value.split(multiple);
|
|
86
|
-
const d = options
|
|
87
|
-
return z.includes(useVueValue(o,
|
|
86
|
+
const d = options?.filter((o) => {
|
|
87
|
+
return z.includes(useVueValue(o, config?.prop ?? "value"));
|
|
88
88
|
});
|
|
89
89
|
return d.map((o) => {
|
|
90
|
-
return o[
|
|
90
|
+
return o[config?.label ?? "label"] ?? useVueValue(o, config?.prop ?? "value");
|
|
91
91
|
}).join(multiple);
|
|
92
92
|
}
|
|
93
93
|
} else {
|
|
94
|
-
const d = options
|
|
95
|
-
return useVueValue(o,
|
|
94
|
+
const d = options?.filter((o) => {
|
|
95
|
+
return useVueValue(o, config?.prop ?? "value") === value;
|
|
96
96
|
});
|
|
97
97
|
if (d.length > 0) {
|
|
98
|
-
return d[0][
|
|
98
|
+
return d[0][config?.label ?? "label"] ?? value;
|
|
99
99
|
} else {
|
|
100
100
|
return value;
|
|
101
101
|
}
|
|
@@ -106,7 +106,7 @@ function getValueObjs(value, multiple, options, config) {
|
|
|
106
106
|
}
|
|
107
107
|
function setOptionsValue(value, obj, data, optionss) {
|
|
108
108
|
let options = [];
|
|
109
|
-
if (obj
|
|
109
|
+
if (obj?.options) {
|
|
110
110
|
const opt = obj.options;
|
|
111
111
|
if (typeof opt === "string") {
|
|
112
112
|
const value2 = optionss[opt];
|
|
@@ -155,7 +155,7 @@ function getValue(obj, data, index) {
|
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
function setComponString(value, obj, componObj, data, optionss, compons) {
|
|
158
|
-
if (obj
|
|
158
|
+
if (obj?.options) {
|
|
159
159
|
let options = [];
|
|
160
160
|
const opt = obj.options;
|
|
161
161
|
if (typeof opt === "string") {
|
|
@@ -17,26 +17,26 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
17
17
|
vue.createElementVNode("div", {
|
|
18
18
|
class: vue.normalizeClass(vue.unref(cs).z("top"))
|
|
19
19
|
}, [
|
|
20
|
-
_cache[1] || (_cache[1] = vue.createTextVNode(" 头部 ")),
|
|
20
|
+
_cache[1] || (_cache[1] = vue.createTextVNode(" 头部 ", -1)),
|
|
21
21
|
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).top, { param: param.value }, () => [
|
|
22
|
-
_cache[0] || (_cache[0] = vue.createTextVNode("1"))
|
|
22
|
+
_cache[0] || (_cache[0] = vue.createTextVNode("1", -1))
|
|
23
23
|
])
|
|
24
24
|
], 2),
|
|
25
25
|
vue.createElementVNode("div", null, [
|
|
26
|
-
_cache[3] || (_cache[3] = vue.createTextVNode(" 默认 ")),
|
|
26
|
+
_cache[3] || (_cache[3] = vue.createTextVNode(" 默认 ", -1)),
|
|
27
27
|
vue.renderSlot(_ctx.$slots, "default", {}, () => [
|
|
28
|
-
_cache[2] || (_cache[2] = vue.createTextVNode("2"))
|
|
28
|
+
_cache[2] || (_cache[2] = vue.createTextVNode("2", -1))
|
|
29
29
|
])
|
|
30
30
|
]),
|
|
31
31
|
vue.createElementVNode("div", {
|
|
32
32
|
class: vue.normalizeClass(vue.unref(cs).z("bottom"))
|
|
33
33
|
}, [
|
|
34
|
-
_cache[5] || (_cache[5] = vue.createTextVNode(" 尾部 ")),
|
|
34
|
+
_cache[5] || (_cache[5] = vue.createTextVNode(" 尾部 ", -1)),
|
|
35
35
|
vue.renderSlot(_ctx.$slots, vue.unref(data.dataSlot).bottom, {
|
|
36
36
|
value,
|
|
37
37
|
param: param.value
|
|
38
38
|
}, () => [
|
|
39
|
-
_cache[4] || (_cache[4] = vue.createTextVNode("3"))
|
|
39
|
+
_cache[4] || (_cache[4] = vue.createTextVNode("3", -1))
|
|
40
40
|
])
|
|
41
41
|
], 2)
|
|
42
42
|
], 2);
|
|
@@ -15,26 +15,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
15
15
|
createElementVNode("div", {
|
|
16
16
|
class: normalizeClass(unref(cs).z("top"))
|
|
17
17
|
}, [
|
|
18
|
-
_cache[1] || (_cache[1] = createTextVNode(" 头部 ")),
|
|
18
|
+
_cache[1] || (_cache[1] = createTextVNode(" 头部 ", -1)),
|
|
19
19
|
renderSlot(_ctx.$slots, unref(dataSlot).top, { param: param.value }, () => [
|
|
20
|
-
_cache[0] || (_cache[0] = createTextVNode("1"))
|
|
20
|
+
_cache[0] || (_cache[0] = createTextVNode("1", -1))
|
|
21
21
|
])
|
|
22
22
|
], 2),
|
|
23
23
|
createElementVNode("div", null, [
|
|
24
|
-
_cache[3] || (_cache[3] = createTextVNode(" 默认 ")),
|
|
24
|
+
_cache[3] || (_cache[3] = createTextVNode(" 默认 ", -1)),
|
|
25
25
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
26
|
-
_cache[2] || (_cache[2] = createTextVNode("2"))
|
|
26
|
+
_cache[2] || (_cache[2] = createTextVNode("2", -1))
|
|
27
27
|
])
|
|
28
28
|
]),
|
|
29
29
|
createElementVNode("div", {
|
|
30
30
|
class: normalizeClass(unref(cs).z("bottom"))
|
|
31
31
|
}, [
|
|
32
|
-
_cache[5] || (_cache[5] = createTextVNode(" 尾部 ")),
|
|
32
|
+
_cache[5] || (_cache[5] = createTextVNode(" 尾部 ", -1)),
|
|
33
33
|
renderSlot(_ctx.$slots, unref(dataSlot).bottom, {
|
|
34
34
|
value,
|
|
35
35
|
param: param.value
|
|
36
36
|
}, () => [
|
|
37
|
-
_cache[4] || (_cache[4] = createTextVNode("3"))
|
|
37
|
+
_cache[4] || (_cache[4] = createTextVNode("3", -1))
|
|
38
38
|
])
|
|
39
39
|
], 2)
|
|
40
40
|
], 2);
|
|
@@ -57,7 +57,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
57
57
|
}, [
|
|
58
58
|
vue.createVNode(vue.unref(ElButton), { onClick: onClose }, {
|
|
59
59
|
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
60
|
-
vue.createTextVNode("关闭")
|
|
60
|
+
vue.createTextVNode("关闭", -1)
|
|
61
61
|
])),
|
|
62
62
|
_: 1,
|
|
63
63
|
__: [1]
|
|
@@ -67,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
67
67
|
onClick: onSubmit
|
|
68
68
|
}, {
|
|
69
69
|
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
70
|
-
vue.createTextVNode("确认")
|
|
70
|
+
vue.createTextVNode("确认", -1)
|
|
71
71
|
])),
|
|
72
72
|
_: 1,
|
|
73
73
|
__: [2]
|
|
@@ -55,7 +55,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
}, [
|
|
56
56
|
createVNode(unref(ElButton), { onClick: onClose }, {
|
|
57
57
|
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
58
|
-
createTextVNode("关闭")
|
|
58
|
+
createTextVNode("关闭", -1)
|
|
59
59
|
])),
|
|
60
60
|
_: 1,
|
|
61
61
|
__: [1]
|
|
@@ -65,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
65
|
onClick: onSubmit
|
|
66
66
|
}, {
|
|
67
67
|
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
68
|
-
createTextVNode("确认")
|
|
68
|
+
createTextVNode("确认", -1)
|
|
69
69
|
])),
|
|
70
70
|
_: 1,
|
|
71
71
|
__: [2]
|
|
@@ -141,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
141
141
|
onClick: onConfirm
|
|
142
142
|
}, {
|
|
143
143
|
default: vue.withCtx(() => _cache[1] || (_cache[1] = [
|
|
144
|
-
vue.createTextVNode("确认")
|
|
144
|
+
vue.createTextVNode("确认", -1)
|
|
145
145
|
])),
|
|
146
146
|
_: 1,
|
|
147
147
|
__: [1]
|
|
@@ -152,7 +152,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
152
152
|
onClick: onClickqx
|
|
153
153
|
}, {
|
|
154
154
|
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
155
|
-
vue.createTextVNode("关闭")
|
|
155
|
+
vue.createTextVNode("关闭", -1)
|
|
156
156
|
])),
|
|
157
157
|
_: 1,
|
|
158
158
|
__: [2]
|
|
@@ -139,7 +139,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
139
139
|
onClick: onConfirm
|
|
140
140
|
}, {
|
|
141
141
|
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
142
|
-
createTextVNode("确认")
|
|
142
|
+
createTextVNode("确认", -1)
|
|
143
143
|
])),
|
|
144
144
|
_: 1,
|
|
145
145
|
__: [1]
|
|
@@ -150,7 +150,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
150
150
|
onClick: onClickqx
|
|
151
151
|
}, {
|
|
152
152
|
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
153
|
-
createTextVNode("关闭")
|
|
153
|
+
createTextVNode("关闭", -1)
|
|
154
154
|
])),
|
|
155
155
|
_: 1,
|
|
156
156
|
__: [2]
|
|
@@ -7,7 +7,7 @@ const elementPlus = require("element-plus");
|
|
|
7
7
|
const column = require("./column.cjs");
|
|
8
8
|
function getLists(arrs, emit, props, slots, listobj) {
|
|
9
9
|
let arr = [];
|
|
10
|
-
arrs
|
|
10
|
+
arrs?.forEach((obj, index) => {
|
|
11
11
|
if (listobj) {
|
|
12
12
|
obj.father = obj.father ?? listobj;
|
|
13
13
|
}
|
|
@@ -5,7 +5,7 @@ import { ElTableColumn } from "element-plus";
|
|
|
5
5
|
import { setProps, setHeader, columnRender } from "./column.js";
|
|
6
6
|
function getLists(arrs, emit, props, slots, listobj) {
|
|
7
7
|
let arr = [];
|
|
8
|
-
arrs
|
|
8
|
+
arrs?.forEach((obj, index) => {
|
|
9
9
|
if (listobj) {
|
|
10
10
|
obj.father = obj.father ?? listobj;
|
|
11
11
|
}
|
|
@@ -42,10 +42,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
42
42
|
}
|
|
43
43
|
let isSort = false;
|
|
44
44
|
const tableDefaultSort = vue.computed(() => {
|
|
45
|
-
var _a, _b;
|
|
46
45
|
return {
|
|
47
|
-
prop:
|
|
48
|
-
order:
|
|
46
|
+
prop: props.defaultSort?.prop,
|
|
47
|
+
order: props.defaultSort?.order
|
|
49
48
|
};
|
|
50
49
|
});
|
|
51
50
|
const rowStyle = vue.computed(() => {
|
|
@@ -40,10 +40,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
40
|
}
|
|
41
41
|
let isSort = false;
|
|
42
42
|
const tableDefaultSort = computed(() => {
|
|
43
|
-
var _a, _b;
|
|
44
43
|
return {
|
|
45
|
-
prop:
|
|
46
|
-
order:
|
|
44
|
+
prop: props.defaultSort?.prop,
|
|
45
|
+
order: props.defaultSort?.order
|
|
47
46
|
};
|
|
48
47
|
});
|
|
49
48
|
const rowStyle = computed(() => {
|
|
@@ -88,12 +88,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
88
88
|
key: setKey(item, index2),
|
|
89
89
|
class: vue.normalizeClass([
|
|
90
90
|
vue.unref(cs).z("li"),
|
|
91
|
-
vue.unref(cs).is("div", item
|
|
91
|
+
vue.unref(cs).is("div", item?.isdiv),
|
|
92
92
|
item.class
|
|
93
93
|
]),
|
|
94
94
|
style: vue.normalizeStyle(vue.unref(setStyles)(item))
|
|
95
95
|
}, [
|
|
96
|
-
|
|
96
|
+
item?.isdiv ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.FormsDiv), {
|
|
97
97
|
key: 0,
|
|
98
98
|
listobj: item,
|
|
99
99
|
optionss: props.options,
|
|
@@ -86,12 +86,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
86
86
|
key: setKey(item, index),
|
|
87
87
|
class: normalizeClass([
|
|
88
88
|
unref(cs).z("li"),
|
|
89
|
-
unref(cs).is("div", item
|
|
89
|
+
unref(cs).is("div", item?.isdiv),
|
|
90
90
|
item.class
|
|
91
91
|
]),
|
|
92
92
|
style: normalizeStyle(unref(setStyles)(item))
|
|
93
93
|
}, [
|
|
94
|
-
|
|
94
|
+
item?.isdiv ? (openBlock(), createBlock(unref(FormsDiv), {
|
|
95
95
|
key: 0,
|
|
96
96
|
listobj: item,
|
|
97
97
|
optionss: props.options,
|
|
@@ -111,8 +111,7 @@ function setUp(props, emit, cs, refForm) {
|
|
|
111
111
|
function getRules() {
|
|
112
112
|
const rules = {};
|
|
113
113
|
const setListValue = (arr, listobj) => {
|
|
114
|
-
arr
|
|
115
|
-
var _a, _b;
|
|
114
|
+
arr?.forEach((obj) => {
|
|
116
115
|
if (listobj) {
|
|
117
116
|
obj.father = obj.father ?? listobj;
|
|
118
117
|
}
|
|
@@ -129,10 +128,10 @@ function setUp(props, emit, cs, refForm) {
|
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
obj.config = obj.config ?? {};
|
|
132
|
-
if (
|
|
131
|
+
if (obj.config?.placeholder === void 0) {
|
|
133
132
|
obj.config.placeholder = (trigger == 1 ? "请输入" : "请选择") + obj.label;
|
|
134
133
|
}
|
|
135
|
-
if (
|
|
134
|
+
if (obj.config?.clearable === void 0) {
|
|
136
135
|
obj.config.clearable = true;
|
|
137
136
|
}
|
|
138
137
|
if (obj.prop) {
|
|
@@ -204,12 +203,10 @@ function setUp(props, emit, cs, refForm) {
|
|
|
204
203
|
});
|
|
205
204
|
}
|
|
206
205
|
function resetFields() {
|
|
207
|
-
|
|
208
|
-
(_a = refForm.value) == null ? void 0 : _a.resetFields();
|
|
206
|
+
refForm.value?.resetFields();
|
|
209
207
|
}
|
|
210
208
|
function validateField(...arr) {
|
|
211
|
-
|
|
212
|
-
(_a = refForm.value) == null ? void 0 : _a.validateField(...arr);
|
|
209
|
+
refForm.value?.validateField(...arr);
|
|
213
210
|
}
|
|
214
211
|
function closeForm() {
|
|
215
212
|
resetFields();
|