@fangzhongya/fang-ui 0.0.48 → 0.0.49
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/index2.cjs +9 -6
- package/dist/components/array/src/index2.js +9 -6
- package/dist/components/box-teleport/src/index2.cjs +1 -1
- package/dist/components/box-teleport/src/index2.js +1 -1
- package/dist/components/checks/src/index2.cjs +4 -4
- package/dist/components/checks/src/index2.js +4 -4
- package/dist/components/common/list.cjs +3 -2
- package/dist/components/common/list.js +3 -2
- package/dist/components/common/use.cjs +11 -11
- package/dist/components/common/use.js +11 -11
- package/dist/components/forms/src/index2.cjs +2 -2
- package/dist/components/forms/src/index2.js +2 -2
- package/dist/components/forms/src/setup.cjs +8 -5
- package/dist/components/forms/src/setup.js +8 -5
- package/dist/components/forms/src/util.cjs +2 -1
- package/dist/components/forms/src/util.js +2 -1
- package/dist/components/forms-drag/src/index2.cjs +2 -2
- package/dist/components/forms-drag/src/index2.js +2 -2
- package/dist/components/forms-item/src/index2.cjs +1 -1
- package/dist/components/forms-item/src/index2.js +1 -1
- package/dist/components/forms-items/src/index2.cjs +2 -2
- package/dist/components/forms-items/src/index2.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/index2.cjs +6 -4
- package/dist/components/icon-picker/src/index2.js +6 -4
- package/dist/components/index.cjs +82 -80
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.scss +1 -0
- package/dist/components/index2.scss +1 -0
- package/dist/components/input-select/src/index2.cjs +1 -1
- package/dist/components/input-select/src/index2.js +1 -1
- package/dist/components/keep-com/index.cjs +9 -0
- package/dist/components/keep-com/index.d.ts +2 -0
- package/dist/components/keep-com/index.js +9 -0
- package/dist/components/keep-com/index.scss +5 -0
- package/dist/components/keep-com/src/data.cjs +42 -0
- package/dist/components/keep-com/src/data.d.ts +71 -0
- package/dist/components/keep-com/src/data.js +42 -0
- package/dist/components/keep-com/src/index.cjs +4 -0
- package/dist/components/keep-com/src/index.js +4 -0
- package/dist/components/keep-com/src/index2.cjs +77 -0
- package/dist/components/keep-com/src/index2.js +77 -0
- package/dist/components/labels/src/index2.cjs +2 -1
- package/dist/components/labels/src/index2.js +2 -1
- package/dist/components/menus/src/menu-ll2.cjs +1 -1
- package/dist/components/menus/src/menu-ll2.js +1 -1
- package/dist/components/page/src/index2.cjs +85 -65
- package/dist/components/page/src/index2.js +85 -65
- package/dist/components/paging/src/index2.cjs +8 -4
- package/dist/components/paging/src/index2.js +8 -4
- package/dist/components/seamless-scroll/src/index2.cjs +2 -2
- package/dist/components/seamless-scroll/src/index2.js +2 -2
- package/dist/components/selects/src/index2.cjs +1 -1
- package/dist/components/selects/src/index2.js +1 -1
- package/dist/components/stick-window/src/index2.cjs +1 -1
- package/dist/components/stick-window/src/index2.js +1 -1
- package/dist/components/switchs/src/index2.cjs +4 -4
- package/dist/components/switchs/src/index2.js +4 -4
- package/dist/components/tables/common/pagin.cjs +57 -40
- package/dist/components/tables/common/pagin.js +57 -40
- package/dist/components/tables/common/table-but2.cjs +2 -1
- package/dist/components/tables/common/table-but2.js +2 -1
- package/dist/components/tables/common/table-color2.cjs +5 -4
- package/dist/components/tables/common/table-color2.js +5 -4
- package/dist/components/tables/common/table-list2.cjs +2 -1
- package/dist/components/tables/common/table-list2.js +2 -1
- package/dist/components/tables/common/util.cjs +3 -2
- package/dist/components/tables/common/util.js +3 -2
- package/dist/components/tables/src/columns3.cjs +1 -1
- package/dist/components/tables/src/columns3.js +1 -1
- package/dist/components/tables/src/index2.cjs +3 -2
- package/dist/components/tables/src/index2.js +3 -2
- package/dist/components/tablesp/src/index2.cjs +4 -3
- package/dist/components/tablesp/src/index2.js +4 -3
- package/dist/components/tabless/src/index2.cjs +5 -4
- package/dist/components/tabless/src/index2.js +5 -4
- package/dist/components/tablesv/src/columns3.cjs +1 -1
- package/dist/components/tablesv/src/columns3.js +1 -1
- package/dist/components/tablesv/src/index2.cjs +3 -2
- package/dist/components/tablesv/src/index2.js +3 -2
- package/dist/components/tablesvp/src/index2.cjs +3 -2
- package/dist/components/tablesvp/src/index2.js +3 -2
- package/dist/directives/adjust/index.cjs +2 -1
- package/dist/directives/adjust/index.js +2 -1
- package/dist/expand/{chunk-CHIAKFM2.cjs → chunk-LSKJOV4K.cjs} +2 -0
- package/dist/expand/{chunk-R2KDOEN3.js → chunk-ZS2GF6MH.js} +2 -0
- package/dist/expand/components.cjs +5 -5
- package/dist/expand/components.js +1 -1
- package/dist/expand/config.cjs +2 -2
- package/dist/expand/config.js +1 -1
- package/dist/hooks/event-aliass/index.cjs +2 -1
- package/dist/hooks/event-aliass/index.js +2 -1
- package/dist/hooks/global-config/index.cjs +6 -3
- package/dist/hooks/global-config/index.js +6 -3
- package/dist/icons/index.css +29 -29
- package/dist/icons/index.json +10 -10
- package/dist/index.cjs +100 -98
- package/dist/index.js +2 -0
- package/dist/utils/vues/common.cjs +2 -1
- package/dist/utils/vues/common.js +2 -1
- package/package.json +3 -3
- /package/dist/components/{forms-item → forms-items}/index.css +0 -0
- /package/dist/components/{option-group → transfer}/index.css +0 -0
- /package/dist/css/{forms-item.css → forms-items.css} +0 -0
- /package/dist/css/{option-group.css → transfer.css} +0 -0
|
@@ -29,7 +29,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
29
29
|
return false;
|
|
30
30
|
});
|
|
31
31
|
const multiple = vue.computed(() => {
|
|
32
|
-
|
|
32
|
+
var _a;
|
|
33
|
+
let multiple2 = (_a = props.config) == null ? void 0 : _a.multiple;
|
|
33
34
|
if (props.multiple) {
|
|
34
35
|
if (multiple2 === true) {
|
|
35
36
|
return "|";
|
|
@@ -82,6 +83,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
82
83
|
}
|
|
83
84
|
const errer = vue.ref();
|
|
84
85
|
function onInput(type) {
|
|
86
|
+
var _a, _b;
|
|
85
87
|
if (props.check) {
|
|
86
88
|
errer.value = void 0;
|
|
87
89
|
if (start.value && end.value) {
|
|
@@ -107,7 +109,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
107
109
|
if (start.value > end.value) {
|
|
108
110
|
callback(
|
|
109
111
|
new Error(
|
|
110
|
-
props.endPlaceholder + (props.config
|
|
112
|
+
props.endPlaceholder + (((_a = props.config) == null ? void 0 : _a.placeholder) ?? "") + "不能大于" + props.startPlaceholder + (((_b = props.config) == null ? void 0 : _b.placeholder) ?? "")
|
|
111
113
|
)
|
|
112
114
|
);
|
|
113
115
|
return false;
|
|
@@ -167,6 +169,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
167
169
|
...data.dataExpose
|
|
168
170
|
});
|
|
169
171
|
return (_ctx, _cache) => {
|
|
172
|
+
var _a, _b, _c, _d;
|
|
170
173
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
171
174
|
class: vue.normalizeClass([vue.unref(cs).z(), vue.unref(cs).is("focus", isfocus.value)]),
|
|
172
175
|
onMouseenter,
|
|
@@ -182,7 +185,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
182
185
|
_cache[0] || (_cache[0] = ($event) => start.value = $event),
|
|
183
186
|
_cache[1] || (_cache[1] = ($event) => onInput(0))
|
|
184
187
|
],
|
|
185
|
-
placeholder: props.startPlaceholder + (props.config
|
|
188
|
+
placeholder: props.startPlaceholder + (((_a = props.config) == null ? void 0 : _a.placeholder) ?? ""),
|
|
186
189
|
onClick: vue.withModifiers(onFocus, ["stop"]),
|
|
187
190
|
onBlur
|
|
188
191
|
}), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
|
|
@@ -197,7 +200,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
197
200
|
_cache[2] || (_cache[2] = ($event) => end.value = $event),
|
|
198
201
|
_cache[3] || (_cache[3] = ($event) => onInput(1))
|
|
199
202
|
],
|
|
200
|
-
placeholder: props.endPlaceholder + (props.config
|
|
203
|
+
placeholder: props.endPlaceholder + (((_b = props.config) == null ? void 0 : _b.placeholder) ?? ""),
|
|
201
204
|
onClick: vue.withModifiers(onFocus, ["stop"]),
|
|
202
205
|
onBlur
|
|
203
206
|
}), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
|
|
@@ -206,9 +209,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
206
209
|
class: vue.normalizeClass([
|
|
207
210
|
vue.unref(cs).z("error"),
|
|
208
211
|
vue.unref(cs).is("clear", isclear.value),
|
|
209
|
-
"type-" + errer.value
|
|
212
|
+
"type-" + ((_c = errer.value) == null ? void 0 : _c.type)
|
|
210
213
|
])
|
|
211
|
-
}, vue.toDisplayString(errer.value
|
|
214
|
+
}, vue.toDisplayString(((_d = errer.value) == null ? void 0 : _d.message) ? errer.value.message : errer.value), 3)) : vue.createCommentVNode("", true),
|
|
212
215
|
vue.createElementVNode("input", {
|
|
213
216
|
class: vue.normalizeClass(vue.unref(cs).z("focus")),
|
|
214
217
|
ref_key: "refInput",
|
|
@@ -27,7 +27,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
27
27
|
return false;
|
|
28
28
|
});
|
|
29
29
|
const multiple = computed(() => {
|
|
30
|
-
|
|
30
|
+
var _a;
|
|
31
|
+
let multiple2 = (_a = props.config) == null ? void 0 : _a.multiple;
|
|
31
32
|
if (props.multiple) {
|
|
32
33
|
if (multiple2 === true) {
|
|
33
34
|
return "|";
|
|
@@ -80,6 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
80
81
|
}
|
|
81
82
|
const errer = ref();
|
|
82
83
|
function onInput(type) {
|
|
84
|
+
var _a, _b;
|
|
83
85
|
if (props.check) {
|
|
84
86
|
errer.value = void 0;
|
|
85
87
|
if (start.value && end.value) {
|
|
@@ -105,7 +107,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
107
|
if (start.value > end.value) {
|
|
106
108
|
callback(
|
|
107
109
|
new Error(
|
|
108
|
-
props.endPlaceholder + (props.config
|
|
110
|
+
props.endPlaceholder + (((_a = props.config) == null ? void 0 : _a.placeholder) ?? "") + "不能大于" + props.startPlaceholder + (((_b = props.config) == null ? void 0 : _b.placeholder) ?? "")
|
|
109
111
|
)
|
|
110
112
|
);
|
|
111
113
|
return false;
|
|
@@ -165,6 +167,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
165
167
|
...dataExpose
|
|
166
168
|
});
|
|
167
169
|
return (_ctx, _cache) => {
|
|
170
|
+
var _a, _b, _c, _d;
|
|
168
171
|
return openBlock(), createElementBlock("div", {
|
|
169
172
|
class: normalizeClass([unref(cs).z(), unref(cs).is("focus", isfocus.value)]),
|
|
170
173
|
onMouseenter,
|
|
@@ -180,7 +183,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
180
183
|
_cache[0] || (_cache[0] = ($event) => start.value = $event),
|
|
181
184
|
_cache[1] || (_cache[1] = ($event) => onInput(0))
|
|
182
185
|
],
|
|
183
|
-
placeholder: props.startPlaceholder + (props.config
|
|
186
|
+
placeholder: props.startPlaceholder + (((_a = props.config) == null ? void 0 : _a.placeholder) ?? ""),
|
|
184
187
|
onClick: withModifiers(onFocus, ["stop"]),
|
|
185
188
|
onBlur
|
|
186
189
|
}), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
|
|
@@ -195,7 +198,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
195
198
|
_cache[2] || (_cache[2] = ($event) => end.value = $event),
|
|
196
199
|
_cache[3] || (_cache[3] = ($event) => onInput(1))
|
|
197
200
|
],
|
|
198
|
-
placeholder: props.endPlaceholder + (props.config
|
|
201
|
+
placeholder: props.endPlaceholder + (((_b = props.config) == null ? void 0 : _b.placeholder) ?? ""),
|
|
199
202
|
onClick: withModifiers(onFocus, ["stop"]),
|
|
200
203
|
onBlur
|
|
201
204
|
}), null, 16, ["multiple", "class", "modelValue", "placeholder"])),
|
|
@@ -204,9 +207,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
204
207
|
class: normalizeClass([
|
|
205
208
|
unref(cs).z("error"),
|
|
206
209
|
unref(cs).is("clear", isclear.value),
|
|
207
|
-
"type-" + errer.value
|
|
210
|
+
"type-" + ((_c = errer.value) == null ? void 0 : _c.type)
|
|
208
211
|
])
|
|
209
|
-
}, toDisplayString(errer.value
|
|
212
|
+
}, toDisplayString(((_d = errer.value) == null ? void 0 : _d.message) ? errer.value.message : errer.value), 3)) : createCommentVNode("", true),
|
|
210
213
|
createElementVNode("input", {
|
|
211
214
|
class: normalizeClass(unref(cs).z("focus")),
|
|
212
215
|
ref_key: "refInput",
|
|
@@ -15,7 +15,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
15
15
|
const props = __props;
|
|
16
16
|
const emit = __emit;
|
|
17
17
|
const id = enums.FunctConfig.BOXIDNAME.trim();
|
|
18
|
-
if (document && !document
|
|
18
|
+
if (document && !(document == null ? void 0 : document.querySelector(id))) {
|
|
19
19
|
const d = document.createElement("div");
|
|
20
20
|
if (id.startsWith("#")) {
|
|
21
21
|
d.id = id.replace(/^#/, "");
|
|
@@ -13,7 +13,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
13
13
|
const props = __props;
|
|
14
14
|
const emit = __emit;
|
|
15
15
|
const id = FunctConfig.BOXIDNAME.trim();
|
|
16
|
-
if (document && !document
|
|
16
|
+
if (document && !(document == null ? void 0 : document.querySelector(id))) {
|
|
17
17
|
const d = document.createElement("div");
|
|
18
18
|
if (id.startsWith("#")) {
|
|
19
19
|
d.id = id.replace(/^#/, "");
|
|
@@ -52,8 +52,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
52
52
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.options, (item) => {
|
|
53
53
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(comps.value), {
|
|
54
54
|
value: vue.unref(use.useVueValue)(item, props.prop),
|
|
55
|
-
border: item
|
|
56
|
-
disabled: item
|
|
55
|
+
border: item == null ? void 0 : item.border,
|
|
56
|
+
disabled: item == null ? void 0 : item.disabled,
|
|
57
57
|
onChange: (is) => onChange(item, is)
|
|
58
58
|
}, {
|
|
59
59
|
default: vue.withCtx(() => [
|
|
@@ -75,9 +75,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
75
75
|
default: vue.withCtx(() => [
|
|
76
76
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(props.options, (item) => {
|
|
77
77
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(comps.value), {
|
|
78
|
-
border: item
|
|
78
|
+
border: item == null ? void 0 : item.border,
|
|
79
79
|
value: vue.unref(use.useVueValue)(item, props.prop),
|
|
80
|
-
disabled: item
|
|
80
|
+
disabled: item == null ? void 0 : item.disabled
|
|
81
81
|
}, {
|
|
82
82
|
default: vue.withCtx(() => [
|
|
83
83
|
vue.createTextVNode(vue.toDisplayString(vue.unref(use.useVueValue)(item, props.label)), 1)
|
|
@@ -50,8 +50,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.options, (item) => {
|
|
51
51
|
return openBlock(), createBlock(resolveDynamicComponent(comps.value), {
|
|
52
52
|
value: unref(useVueValue)(item, props.prop),
|
|
53
|
-
border: item
|
|
54
|
-
disabled: item
|
|
53
|
+
border: item == null ? void 0 : item.border,
|
|
54
|
+
disabled: item == null ? void 0 : item.disabled,
|
|
55
55
|
onChange: (is) => onChange(item, is)
|
|
56
56
|
}, {
|
|
57
57
|
default: withCtx(() => [
|
|
@@ -73,9 +73,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
73
|
default: withCtx(() => [
|
|
74
74
|
(openBlock(true), createElementBlock(Fragment, null, renderList(props.options, (item) => {
|
|
75
75
|
return openBlock(), createBlock(resolveDynamicComponent(comps.value), {
|
|
76
|
-
border: item
|
|
76
|
+
border: item == null ? void 0 : item.border,
|
|
77
77
|
value: unref(useVueValue)(item, props.prop),
|
|
78
|
-
disabled: item
|
|
78
|
+
disabled: item == null ? void 0 : item.disabled
|
|
79
79
|
}, {
|
|
80
80
|
default: withCtx(() => [
|
|
81
81
|
createTextVNode(toDisplayString(unref(useVueValue)(item, props.label)), 1)
|
|
@@ -90,13 +90,14 @@ function comHandle(props2, emit) {
|
|
|
90
90
|
immediate: true
|
|
91
91
|
});
|
|
92
92
|
function getValueObjs(v) {
|
|
93
|
+
var _a, _b;
|
|
93
94
|
if (isValue(v)) {
|
|
94
95
|
if (selectMultiple.value && v instanceof Array) {
|
|
95
|
-
return props2.options
|
|
96
|
+
return (_a = props2.options) == null ? void 0 : _a.filter((o) => {
|
|
96
97
|
return v.includes(use.useVueValue(o, props2.prop));
|
|
97
98
|
});
|
|
98
99
|
} else {
|
|
99
|
-
return props2.options
|
|
100
|
+
return (_b = props2.options) == null ? void 0 : _b.filter((o) => {
|
|
100
101
|
return use.useVueValue(o, props2.prop) === v;
|
|
101
102
|
});
|
|
102
103
|
}
|
|
@@ -88,13 +88,14 @@ function comHandle(props2, emit) {
|
|
|
88
88
|
immediate: true
|
|
89
89
|
});
|
|
90
90
|
function getValueObjs(v) {
|
|
91
|
+
var _a, _b;
|
|
91
92
|
if (isValue(v)) {
|
|
92
93
|
if (selectMultiple.value && v instanceof Array) {
|
|
93
|
-
return props2.options
|
|
94
|
+
return (_a = props2.options) == null ? void 0 : _a.filter((o) => {
|
|
94
95
|
return v.includes(useVueValue(o, props2.prop));
|
|
95
96
|
});
|
|
96
97
|
} else {
|
|
97
|
-
return props2.options
|
|
98
|
+
return (_b = props2.options) == null ? void 0 : _b.filter((o) => {
|
|
98
99
|
return useVueValue(o, props2.prop) === v;
|
|
99
100
|
});
|
|
100
101
|
}
|
|
@@ -72,29 +72,29 @@ function getValueObjs(value, multiple, options, config) {
|
|
|
72
72
|
if (value !== void 0 && value !== null) {
|
|
73
73
|
if (multiple) {
|
|
74
74
|
if (multiple === true) {
|
|
75
|
-
const d = options
|
|
75
|
+
const d = options == null ? void 0 : options.filter((o) => {
|
|
76
76
|
return value.includes(
|
|
77
|
-
useVueValue(o, config
|
|
77
|
+
useVueValue(o, (config == null ? void 0 : config.prop) ?? "value")
|
|
78
78
|
);
|
|
79
79
|
});
|
|
80
80
|
return d.map((o) => {
|
|
81
|
-
return o[config
|
|
81
|
+
return o[(config == null ? void 0 : config.label) ?? "label"] ?? useVueValue(o, (config == null ? void 0 : config.prop) ?? "value");
|
|
82
82
|
}).join(",");
|
|
83
83
|
} else {
|
|
84
84
|
const z = value.split(multiple);
|
|
85
|
-
const d = options
|
|
86
|
-
return z.includes(useVueValue(o, config
|
|
85
|
+
const d = options == null ? void 0 : options.filter((o) => {
|
|
86
|
+
return z.includes(useVueValue(o, (config == null ? void 0 : config.prop) ?? "value"));
|
|
87
87
|
});
|
|
88
88
|
return d.map((o) => {
|
|
89
|
-
return o[config
|
|
89
|
+
return o[(config == null ? void 0 : config.label) ?? "label"] ?? useVueValue(o, (config == null ? void 0 : config.prop) ?? "value");
|
|
90
90
|
}).join(multiple);
|
|
91
91
|
}
|
|
92
92
|
} else {
|
|
93
|
-
const d = options
|
|
94
|
-
return useVueValue(o, config
|
|
93
|
+
const d = options == null ? void 0 : options.filter((o) => {
|
|
94
|
+
return useVueValue(o, (config == null ? void 0 : config.prop) ?? "value") === value;
|
|
95
95
|
});
|
|
96
96
|
if (d.length > 0) {
|
|
97
|
-
return d[0][config
|
|
97
|
+
return d[0][(config == null ? void 0 : config.label) ?? "label"] ?? value;
|
|
98
98
|
} else {
|
|
99
99
|
return value;
|
|
100
100
|
}
|
|
@@ -105,7 +105,7 @@ function getValueObjs(value, multiple, options, config) {
|
|
|
105
105
|
}
|
|
106
106
|
function setOptionsValue(value, obj, data, optionss) {
|
|
107
107
|
let options = [];
|
|
108
|
-
if (obj
|
|
108
|
+
if (obj == null ? void 0 : obj.options) {
|
|
109
109
|
const opt = obj.options;
|
|
110
110
|
if (typeof opt === "string") {
|
|
111
111
|
const value2 = optionss[opt];
|
|
@@ -154,7 +154,7 @@ function getValue(obj, data, index) {
|
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
function setComponString(value, obj, componObj, data, optionss, compons) {
|
|
157
|
-
if (obj
|
|
157
|
+
if (obj == null ? void 0 : obj.options) {
|
|
158
158
|
let options = [];
|
|
159
159
|
const opt = obj.options;
|
|
160
160
|
if (typeof opt === "string") {
|
|
@@ -70,29 +70,29 @@ function getValueObjs(value, multiple, options, config) {
|
|
|
70
70
|
if (value !== void 0 && value !== null) {
|
|
71
71
|
if (multiple) {
|
|
72
72
|
if (multiple === true) {
|
|
73
|
-
const d = options
|
|
73
|
+
const d = options == null ? void 0 : options.filter((o) => {
|
|
74
74
|
return value.includes(
|
|
75
|
-
useVueValue(o, config
|
|
75
|
+
useVueValue(o, (config == null ? void 0 : config.prop) ?? "value")
|
|
76
76
|
);
|
|
77
77
|
});
|
|
78
78
|
return d.map((o) => {
|
|
79
|
-
return o[config
|
|
79
|
+
return o[(config == null ? void 0 : config.label) ?? "label"] ?? useVueValue(o, (config == null ? void 0 : config.prop) ?? "value");
|
|
80
80
|
}).join(",");
|
|
81
81
|
} else {
|
|
82
82
|
const z = value.split(multiple);
|
|
83
|
-
const d = options
|
|
84
|
-
return z.includes(useVueValue(o, config
|
|
83
|
+
const d = options == null ? void 0 : options.filter((o) => {
|
|
84
|
+
return z.includes(useVueValue(o, (config == null ? void 0 : config.prop) ?? "value"));
|
|
85
85
|
});
|
|
86
86
|
return d.map((o) => {
|
|
87
|
-
return o[config
|
|
87
|
+
return o[(config == null ? void 0 : config.label) ?? "label"] ?? useVueValue(o, (config == null ? void 0 : config.prop) ?? "value");
|
|
88
88
|
}).join(multiple);
|
|
89
89
|
}
|
|
90
90
|
} else {
|
|
91
|
-
const d = options
|
|
92
|
-
return useVueValue(o, config
|
|
91
|
+
const d = options == null ? void 0 : options.filter((o) => {
|
|
92
|
+
return useVueValue(o, (config == null ? void 0 : config.prop) ?? "value") === value;
|
|
93
93
|
});
|
|
94
94
|
if (d.length > 0) {
|
|
95
|
-
return d[0][config
|
|
95
|
+
return d[0][(config == null ? void 0 : config.label) ?? "label"] ?? value;
|
|
96
96
|
} else {
|
|
97
97
|
return value;
|
|
98
98
|
}
|
|
@@ -103,7 +103,7 @@ function getValueObjs(value, multiple, options, config) {
|
|
|
103
103
|
}
|
|
104
104
|
function setOptionsValue(value, obj, data, optionss) {
|
|
105
105
|
let options = [];
|
|
106
|
-
if (obj
|
|
106
|
+
if (obj == null ? void 0 : obj.options) {
|
|
107
107
|
const opt = obj.options;
|
|
108
108
|
if (typeof opt === "string") {
|
|
109
109
|
const value2 = optionss[opt];
|
|
@@ -152,7 +152,7 @@ function getValue(obj, data, index) {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
function setComponString(value, obj, componObj, data, optionss, compons) {
|
|
155
|
-
if (obj
|
|
155
|
+
if (obj == null ? void 0 : obj.options) {
|
|
156
156
|
let options = [];
|
|
157
157
|
const opt = obj.options;
|
|
158
158
|
if (typeof opt === "string") {
|
|
@@ -109,12 +109,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
109
109
|
key: setKey(item, index2),
|
|
110
110
|
class: vue.normalizeClass([
|
|
111
111
|
vue.unref(cs).z("li"),
|
|
112
|
-
vue.unref(cs).is("div", item
|
|
112
|
+
vue.unref(cs).is("div", item == null ? void 0 : item.isdiv),
|
|
113
113
|
item.class
|
|
114
114
|
]),
|
|
115
115
|
style: vue.normalizeStyle(vue.unref(setStyles)(item))
|
|
116
116
|
}, [
|
|
117
|
-
item
|
|
117
|
+
(item == null ? void 0 : item.isdiv) ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.FormsDiv), {
|
|
118
118
|
key: 0,
|
|
119
119
|
listobj: item,
|
|
120
120
|
optionss: props.options,
|
|
@@ -107,12 +107,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
107
|
key: setKey(item, index),
|
|
108
108
|
class: normalizeClass([
|
|
109
109
|
unref(cs).z("li"),
|
|
110
|
-
unref(cs).is("div", item
|
|
110
|
+
unref(cs).is("div", item == null ? void 0 : item.isdiv),
|
|
111
111
|
item.class
|
|
112
112
|
]),
|
|
113
113
|
style: normalizeStyle(unref(setStyles)(item))
|
|
114
114
|
}, [
|
|
115
|
-
item
|
|
115
|
+
(item == null ? void 0 : item.isdiv) ? (openBlock(), createBlock(unref(FormsDiv), {
|
|
116
116
|
key: 0,
|
|
117
117
|
listobj: item,
|
|
118
118
|
optionss: props.options,
|
|
@@ -99,7 +99,8 @@ function setUp(props, emit, cs, refForm) {
|
|
|
99
99
|
function getRules() {
|
|
100
100
|
const rules = {};
|
|
101
101
|
const setListValue = (arr, listobj) => {
|
|
102
|
-
arr
|
|
102
|
+
arr == null ? void 0 : arr.forEach((obj) => {
|
|
103
|
+
var _a, _b;
|
|
103
104
|
if (listobj) {
|
|
104
105
|
obj.father = obj.father ?? listobj;
|
|
105
106
|
}
|
|
@@ -116,10 +117,10 @@ function setUp(props, emit, cs, refForm) {
|
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
obj.config = obj.config ?? {};
|
|
119
|
-
if (obj.config
|
|
120
|
+
if (((_a = obj.config) == null ? void 0 : _a.placeholder) === void 0) {
|
|
120
121
|
obj.config.placeholder = (trigger == 1 ? "请输入" : "请选择") + obj.label;
|
|
121
122
|
}
|
|
122
|
-
if (obj.config
|
|
123
|
+
if (((_b = obj.config) == null ? void 0 : _b.clearable) === void 0) {
|
|
123
124
|
obj.config.clearable = true;
|
|
124
125
|
}
|
|
125
126
|
if (obj.prop) {
|
|
@@ -191,10 +192,12 @@ function setUp(props, emit, cs, refForm) {
|
|
|
191
192
|
});
|
|
192
193
|
}
|
|
193
194
|
function resetFields() {
|
|
194
|
-
|
|
195
|
+
var _a;
|
|
196
|
+
(_a = refForm.value) == null ? void 0 : _a.resetFields();
|
|
195
197
|
}
|
|
196
198
|
function validateField(...arr) {
|
|
197
|
-
|
|
199
|
+
var _a;
|
|
200
|
+
(_a = refForm.value) == null ? void 0 : _a.validateField(...arr);
|
|
198
201
|
}
|
|
199
202
|
function closeForm() {
|
|
200
203
|
resetFields();
|
|
@@ -97,7 +97,8 @@ function setUp(props, emit, cs, refForm) {
|
|
|
97
97
|
function getRules() {
|
|
98
98
|
const rules = {};
|
|
99
99
|
const setListValue = (arr, listobj) => {
|
|
100
|
-
arr
|
|
100
|
+
arr == null ? void 0 : arr.forEach((obj) => {
|
|
101
|
+
var _a, _b;
|
|
101
102
|
if (listobj) {
|
|
102
103
|
obj.father = obj.father ?? listobj;
|
|
103
104
|
}
|
|
@@ -114,10 +115,10 @@ function setUp(props, emit, cs, refForm) {
|
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
obj.config = obj.config ?? {};
|
|
117
|
-
if (obj.config
|
|
118
|
+
if (((_a = obj.config) == null ? void 0 : _a.placeholder) === void 0) {
|
|
118
119
|
obj.config.placeholder = (trigger == 1 ? "请输入" : "请选择") + obj.label;
|
|
119
120
|
}
|
|
120
|
-
if (obj.config
|
|
121
|
+
if (((_b = obj.config) == null ? void 0 : _b.clearable) === void 0) {
|
|
121
122
|
obj.config.clearable = true;
|
|
122
123
|
}
|
|
123
124
|
if (obj.prop) {
|
|
@@ -189,10 +190,12 @@ function setUp(props, emit, cs, refForm) {
|
|
|
189
190
|
});
|
|
190
191
|
}
|
|
191
192
|
function resetFields() {
|
|
192
|
-
|
|
193
|
+
var _a;
|
|
194
|
+
(_a = refForm.value) == null ? void 0 : _a.resetFields();
|
|
193
195
|
}
|
|
194
196
|
function validateField(...arr) {
|
|
195
|
-
|
|
197
|
+
var _a;
|
|
198
|
+
(_a = refForm.value) == null ? void 0 : _a.validateField(...arr);
|
|
196
199
|
}
|
|
197
200
|
function closeForm() {
|
|
198
201
|
resetFields();
|
|
@@ -20,8 +20,9 @@ function _interopNamespaceDefault(e) {
|
|
|
20
20
|
}
|
|
21
21
|
const judge__namespace = /* @__PURE__ */ _interopNamespaceDefault(judge);
|
|
22
22
|
function getRule(trigger, obj, data, refForm) {
|
|
23
|
+
var _a;
|
|
23
24
|
const name = obj.label;
|
|
24
|
-
let multiple = obj.multiple ?? obj.config
|
|
25
|
+
let multiple = obj.multiple ?? ((_a = obj.config) == null ? void 0 : _a.multiple);
|
|
25
26
|
const rule = obj.rule;
|
|
26
27
|
if (typeof multiple != "boolean") {
|
|
27
28
|
multiple = false;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useHide } from "../../common/use.js";
|
|
2
2
|
import * as judge from "@fangzhongya/utils/judge/judge";
|
|
3
3
|
function getRule(trigger, obj, data, refForm) {
|
|
4
|
+
var _a;
|
|
4
5
|
const name = obj.label;
|
|
5
|
-
let multiple = obj.multiple ?? obj.config
|
|
6
|
+
let multiple = obj.multiple ?? ((_a = obj.config) == null ? void 0 : _a.multiple);
|
|
6
7
|
const rule = obj.rule;
|
|
7
8
|
if (typeof multiple != "boolean") {
|
|
8
9
|
multiple = false;
|
|
@@ -137,7 +137,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
137
137
|
vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
138
138
|
class: vue.normalizeClass(["handle", [
|
|
139
139
|
vue.unref(cs).z("li"),
|
|
140
|
-
vue.unref(cs).is("div", item
|
|
140
|
+
vue.unref(cs).is("div", item == null ? void 0 : item.isDiv),
|
|
141
141
|
item.class,
|
|
142
142
|
props.itemClass,
|
|
143
143
|
vue.unref(cs).is("hover", props.index == index2)
|
|
@@ -146,7 +146,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
146
146
|
onClick: vue.withModifiers(($event) => onClickHandle(item, index2), ["stop"]),
|
|
147
147
|
"data-key": index2
|
|
148
148
|
}, [
|
|
149
|
-
item
|
|
149
|
+
(item == null ? void 0 : item.isDiv) ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.FormsDiv), {
|
|
150
150
|
key: 0,
|
|
151
151
|
listobj: item,
|
|
152
152
|
optionss: props.options,
|
|
@@ -135,7 +135,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
135
135
|
withDirectives((openBlock(), createElementBlock("div", {
|
|
136
136
|
class: normalizeClass(["handle", [
|
|
137
137
|
unref(cs).z("li"),
|
|
138
|
-
unref(cs).is("div", item
|
|
138
|
+
unref(cs).is("div", item == null ? void 0 : item.isDiv),
|
|
139
139
|
item.class,
|
|
140
140
|
props.itemClass,
|
|
141
141
|
unref(cs).is("hover", props.index == index)
|
|
@@ -144,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
144
144
|
onClick: withModifiers(($event) => onClickHandle(item, index), ["stop"]),
|
|
145
145
|
"data-key": index
|
|
146
146
|
}, [
|
|
147
|
-
item
|
|
147
|
+
(item == null ? void 0 : item.isDiv) ? (openBlock(), createBlock(unref(FormsDiv), {
|
|
148
148
|
key: 0,
|
|
149
149
|
listobj: item,
|
|
150
150
|
optionss: props.options,
|
|
@@ -30,7 +30,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
30
30
|
});
|
|
31
31
|
const itemProp = props.__prop ?? props.prop;
|
|
32
32
|
const rowHeight = vue.computed(() => {
|
|
33
|
-
return props.rowHeight ?? prs.rowHeight ?? form
|
|
33
|
+
return props.rowHeight ?? prs.rowHeight ?? (form == null ? void 0 : form.rowHeight);
|
|
34
34
|
});
|
|
35
35
|
function setLabelWidth(v) {
|
|
36
36
|
if (v.hideLabel ?? prs.hideLabel) {
|
|
@@ -28,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
28
28
|
});
|
|
29
29
|
const itemProp = props.__prop ?? props.prop;
|
|
30
30
|
const rowHeight = computed(() => {
|
|
31
|
-
return props.rowHeight ?? prs.rowHeight ?? form
|
|
31
|
+
return props.rowHeight ?? prs.rowHeight ?? (form == null ? void 0 : form.rowHeight);
|
|
32
32
|
});
|
|
33
33
|
function setLabelWidth(v) {
|
|
34
34
|
if (v.hideLabel ?? prs.hideLabel) {
|
|
@@ -72,10 +72,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
72
72
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(props).children, (item, index2) => {
|
|
73
73
|
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
74
74
|
key: setKey(item, index2),
|
|
75
|
-
class: vue.normalizeClass([vue.unref(cs).z("li"), vue.unref(cs).is("div", item
|
|
75
|
+
class: vue.normalizeClass([vue.unref(cs).z("li"), vue.unref(cs).is("div", item == null ? void 0 : item.isdiv), item.class]),
|
|
76
76
|
style: vue.normalizeStyle(setStyles(item))
|
|
77
77
|
}, [
|
|
78
|
-
item
|
|
78
|
+
(item == null ? void 0 : item.isdiv) ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.FormsDiv), vue.mergeProps({
|
|
79
79
|
key: 0,
|
|
80
80
|
ref_for: true
|
|
81
81
|
}, binds.value, {
|
|
@@ -70,10 +70,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
70
70
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(props).children, (item, index) => {
|
|
71
71
|
return withDirectives((openBlock(), createElementBlock("div", {
|
|
72
72
|
key: setKey(item, index),
|
|
73
|
-
class: normalizeClass([unref(cs).z("li"), unref(cs).is("div", item
|
|
73
|
+
class: normalizeClass([unref(cs).z("li"), unref(cs).is("div", item == null ? void 0 : item.isdiv), item.class]),
|
|
74
74
|
style: normalizeStyle(setStyles(item))
|
|
75
75
|
}, [
|
|
76
|
-
item
|
|
76
|
+
(item == null ? void 0 : item.isdiv) ? (openBlock(), createBlock(unref(FormsDiv), mergeProps({
|
|
77
77
|
key: 0,
|
|
78
78
|
ref_for: true
|
|
79
79
|
}, binds.value, {
|
|
@@ -20,6 +20,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
20
20
|
props: data.dataProps,
|
|
21
21
|
emits: data.dataEmits,
|
|
22
22
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
23
|
+
var _a, _b;
|
|
23
24
|
const { getLocale } = index.useLocale();
|
|
24
25
|
const cs = index$1.useCssName("icon-picker");
|
|
25
26
|
const props = __props;
|
|
@@ -27,10 +28,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
27
28
|
let ac = "";
|
|
28
29
|
if (props.icons) {
|
|
29
30
|
if (props.icons instanceof Array) {
|
|
30
|
-
ac = props.icons[0]
|
|
31
|
+
ac = (_a = props.icons[0]) == null ? void 0 : _a.prefix;
|
|
31
32
|
} else {
|
|
32
33
|
const k = Object.keys(props.icons)[0];
|
|
33
|
-
ac = props.icons[k]
|
|
34
|
+
ac = (_b = props.icons[k]) == null ? void 0 : _b.prefix;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
37
|
const activeName = vue.ref(ac);
|
|
@@ -38,6 +39,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
38
39
|
const search = vue.ref("");
|
|
39
40
|
const value = vue.ref("");
|
|
40
41
|
const currentIconList = vue.computed(() => {
|
|
42
|
+
var _a2;
|
|
41
43
|
let arr = {};
|
|
42
44
|
if (activeName.value) {
|
|
43
45
|
if (props.icons instanceof Array) {
|
|
@@ -45,12 +47,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
45
47
|
const element = props.icons[index2];
|
|
46
48
|
const name = element.prefix;
|
|
47
49
|
if (name == activeName.value) {
|
|
48
|
-
arr = element
|
|
50
|
+
arr = (element == null ? void 0 : element.icons) || [];
|
|
49
51
|
break;
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
} else {
|
|
53
|
-
arr = props.icons[activeName.value]
|
|
55
|
+
arr = ((_a2 = props.icons[activeName.value]) == null ? void 0 : _a2.icons) || [];
|
|
54
56
|
}
|
|
55
57
|
}
|
|
56
58
|
if (search.value) {
|