@fangzhongya/fang-ui 0.1.33 → 0.1.35
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/buttons/src/data.cjs +1 -1
- package/dist/components/buttons/src/data.d.ts +1 -1
- package/dist/components/buttons/src/data.js +1 -1
- package/dist/components/buttons/src/index2.cjs +1 -1
- package/dist/components/buttons/src/index2.js +1 -1
- package/dist/components/common/config.d.ts +42 -40
- package/dist/components/common/urls.cjs +1 -1
- package/dist/components/common/urls.js +1 -1
- package/dist/components/dates-picker/src/index2.cjs +1 -1
- package/dist/components/dates-picker/src/index2.js +1 -1
- package/dist/components/dates2/src/index2.cjs +1 -1
- package/dist/components/dates2/src/index2.js +1 -1
- package/dist/components/dialogs/src/data.cjs +2 -2
- package/dist/components/dialogs/src/data.d.ts +5 -2
- package/dist/components/dialogs/src/data.js +2 -2
- package/dist/components/dialogs/src/index2.cjs +1 -1
- package/dist/components/dialogs/src/index2.js +1 -1
- package/dist/components/edit/src/data.cjs +1 -1
- package/dist/components/edit/src/data.d.ts +1 -1
- package/dist/components/edit/src/data.js +1 -1
- package/dist/components/edit/src/index2.cjs +3 -3
- package/dist/components/edit/src/index2.js +3 -3
- package/dist/components/edit/style/index2.scss +2 -0
- package/dist/components/edit-float/src/data.cjs +2 -2
- package/dist/components/edit-float/src/data.d.ts +2 -2
- package/dist/components/edit-float/src/data.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/edit-float/style/index2.scss +4 -0
- package/dist/components/forms/index.css +3 -0
- package/dist/components/forms/index.scss +3 -0
- package/dist/components/forms/src/index2.cjs +2 -2
- package/dist/components/forms/src/index2.js +2 -2
- 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 +2 -2
- package/dist/components/forms-item/src/index2.js +2 -2
- package/dist/components/forms-items/src/index2.cjs +2 -2
- package/dist/components/forms-items/src/index2.js +2 -2
- package/dist/components/index.scss +1 -0
- package/dist/components/input-history/src/index2.cjs +1 -1
- package/dist/components/input-history/src/index2.js +1 -1
- package/dist/components/input-history/style/index2.scss +3 -0
- package/dist/components/listsp/src/index2.cjs +3 -3
- package/dist/components/listsp/src/index2.js +3 -3
- package/dist/components/listspd/src/index2.cjs +8 -3
- package/dist/components/listspd/src/index2.js +8 -3
- package/dist/components/menus/src/index2.cjs +1 -1
- package/dist/components/menus/src/index2.js +1 -1
- package/dist/components/page/index.css +3 -0
- package/dist/components/page/src/index2.cjs +6 -6
- package/dist/components/page/src/index2.js +6 -6
- package/dist/components/selects/src/index2.cjs +36 -46
- package/dist/components/selects/src/index2.js +37 -47
- package/dist/components/switchs/src/data.cjs +5 -1
- package/dist/components/switchs/src/data.d.ts +4 -0
- package/dist/components/switchs/src/data.js +5 -1
- package/dist/components/switchs/src/index2.cjs +19 -2
- package/dist/components/switchs/src/index2.js +19 -2
- package/dist/components/tables/common/pagin.cjs +4 -10
- package/dist/components/tables/common/pagin.d.ts +1 -1
- package/dist/components/tables/common/pagin.js +4 -10
- package/dist/components/tablesp/src/index2.cjs +2 -2
- package/dist/components/tablesp/src/index2.js +2 -2
- package/dist/components/tablespd/src/index2.cjs +7 -3
- package/dist/components/tablespd/src/index2.js +7 -3
- package/dist/components/tabless/src/index2.cjs +3 -3
- package/dist/components/tabless/src/index2.js +3 -3
- package/dist/components/tablesv/src/index2.cjs +1 -1
- package/dist/components/tablesv/src/index2.js +1 -1
- package/dist/components/tablesvp/src/index2.cjs +5 -3
- package/dist/components/tablesvp/src/index2.js +5 -3
- package/dist/components/tablesvpd/src/index2.cjs +8 -3
- package/dist/components/tablesvpd/src/index2.js +8 -3
- package/dist/components/videos/index.css +11 -2
- package/dist/components/videos/index.scss +13 -2
- package/dist/components/videos/src/index2.cjs +49 -5
- package/dist/components/videos/src/index2.js +49 -5
- package/dist/components/window/src/data.cjs +3 -3
- package/dist/components/window/src/data.d.ts +2 -2
- package/dist/components/window/src/data.js +3 -3
- package/dist/components/window/src/index2.cjs +1 -1
- package/dist/components/window/src/index2.js +1 -1
- package/dist/css/forms.css +3 -0
- package/dist/css/index.css +36 -2
- package/dist/css/page.css +3 -0
- package/dist/css/videos.css +11 -2
- package/dist/icons/index.json +1 -1
- package/dist/index.css +36 -2
- package/package.json +2 -2
- /package/dist/components/{forms-items → forms-item}/index.css +0 -0
- /package/dist/components/{draggable → popover}/index.css +0 -0
- /package/dist/css/{forms-items.css → forms-item.css} +0 -0
- /package/dist/css/{draggable.css → popover.css} +0 -0
|
@@ -44,7 +44,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
44
44
|
onCurrentChange,
|
|
45
45
|
paginat,
|
|
46
46
|
data: data$1
|
|
47
|
-
} = pagin.useInit(props, emit, refTable, getLocale,
|
|
47
|
+
} = pagin.useInit(props, emit, refTable, getLocale, { type: 2 });
|
|
48
48
|
__expose({
|
|
49
49
|
getSelection,
|
|
50
50
|
getRef,
|
|
@@ -74,7 +74,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
74
74
|
paginat: vue.unref(paginat),
|
|
75
75
|
value: vue.unref(data$1).list,
|
|
76
76
|
list: vue.unref(tableList),
|
|
77
|
-
loading: ((_b = vue.unref(tableConfig).config) == null ? void 0 : _b.
|
|
77
|
+
loading: ((_b = vue.unref(tableConfig).config) == null ? void 0 : _b.isloading) === false || vue.unref(paginat).scroll && vue.unref(paginat).current > 1 ? false : vue.unref(loading),
|
|
78
78
|
options: vue.unref(props).options,
|
|
79
79
|
compons: vue.unref(props).compons,
|
|
80
80
|
onSortChange: vue.unref(onSortChange),
|
|
@@ -87,7 +87,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
87
87
|
return {
|
|
88
88
|
name: k,
|
|
89
89
|
fn: vue.withCtx((scope) => [
|
|
90
|
-
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
90
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
91
91
|
])
|
|
92
92
|
};
|
|
93
93
|
})
|
|
@@ -42,7 +42,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
onCurrentChange,
|
|
43
43
|
paginat,
|
|
44
44
|
data
|
|
45
|
-
} = useInit(props, emit, refTable, getLocale,
|
|
45
|
+
} = useInit(props, emit, refTable, getLocale, { type: 2 });
|
|
46
46
|
__expose({
|
|
47
47
|
getSelection,
|
|
48
48
|
getRef,
|
|
@@ -72,7 +72,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
72
72
|
paginat: unref(paginat),
|
|
73
73
|
value: unref(data).list,
|
|
74
74
|
list: unref(tableList),
|
|
75
|
-
loading: ((_b = unref(tableConfig).config) == null ? void 0 : _b.
|
|
75
|
+
loading: ((_b = unref(tableConfig).config) == null ? void 0 : _b.isloading) === false || unref(paginat).scroll && unref(paginat).current > 1 ? false : unref(loading),
|
|
76
76
|
options: unref(props).options,
|
|
77
77
|
compons: unref(props).compons,
|
|
78
78
|
onSortChange: unref(onSortChange),
|
|
@@ -85,7 +85,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
85
85
|
return {
|
|
86
86
|
name: k,
|
|
87
87
|
fn: withCtx((scope) => [
|
|
88
|
-
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
88
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
89
89
|
])
|
|
90
90
|
};
|
|
91
91
|
})
|
|
@@ -47,7 +47,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
47
47
|
onCurrentChange,
|
|
48
48
|
paginat,
|
|
49
49
|
data: data$2
|
|
50
|
-
} = pagin.useInit(props, emit, refTable, getLocale,
|
|
50
|
+
} = pagin.useInit(props, emit, refTable, getLocale, {
|
|
51
|
+
type: 2,
|
|
52
|
+
config: {
|
|
53
|
+
isdrag: true
|
|
54
|
+
}
|
|
55
|
+
});
|
|
51
56
|
__expose({
|
|
52
57
|
getSelection,
|
|
53
58
|
getRef,
|
|
@@ -78,7 +83,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
78
83
|
paginat: vue.unref(paginat),
|
|
79
84
|
value: vue.unref(data$2).list,
|
|
80
85
|
list: vue.unref(tableList),
|
|
81
|
-
loading: ((_b = vue.unref(tableConfig).config) == null ? void 0 : _b.
|
|
86
|
+
loading: ((_b = vue.unref(tableConfig).config) == null ? void 0 : _b.isloading) === false || vue.unref(paginat).scroll && vue.unref(paginat).current > 1 ? false : vue.unref(loading),
|
|
82
87
|
options: vue.unref(props).options,
|
|
83
88
|
compons: vue.unref(props).compons,
|
|
84
89
|
onSortChange: vue.unref(onSortChange),
|
|
@@ -91,7 +96,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
91
96
|
return {
|
|
92
97
|
name: k,
|
|
93
98
|
fn: vue.withCtx((scope) => [
|
|
94
|
-
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
99
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
95
100
|
])
|
|
96
101
|
};
|
|
97
102
|
})
|
|
@@ -45,7 +45,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
onCurrentChange,
|
|
46
46
|
paginat,
|
|
47
47
|
data
|
|
48
|
-
} = useInit(props, emit, refTable, getLocale,
|
|
48
|
+
} = useInit(props, emit, refTable, getLocale, {
|
|
49
|
+
type: 2,
|
|
50
|
+
config: {
|
|
51
|
+
isdrag: true
|
|
52
|
+
}
|
|
53
|
+
});
|
|
49
54
|
__expose({
|
|
50
55
|
getSelection,
|
|
51
56
|
getRef,
|
|
@@ -76,7 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76
81
|
paginat: unref(paginat),
|
|
77
82
|
value: unref(data).list,
|
|
78
83
|
list: unref(tableList),
|
|
79
|
-
loading: ((_b = unref(tableConfig).config) == null ? void 0 : _b.
|
|
84
|
+
loading: ((_b = unref(tableConfig).config) == null ? void 0 : _b.isloading) === false || unref(paginat).scroll && unref(paginat).current > 1 ? false : unref(loading),
|
|
80
85
|
options: unref(props).options,
|
|
81
86
|
compons: unref(props).compons,
|
|
82
87
|
onSortChange: unref(onSortChange),
|
|
@@ -89,7 +94,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
89
94
|
return {
|
|
90
95
|
name: k,
|
|
91
96
|
fn: withCtx((scope) => [
|
|
92
|
-
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
97
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
93
98
|
])
|
|
94
99
|
};
|
|
95
100
|
})
|
|
@@ -81,7 +81,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
81
81
|
return {
|
|
82
82
|
name: k,
|
|
83
83
|
fn: vue.withCtx((scope) => [
|
|
84
|
-
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
84
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope || {})))
|
|
85
85
|
])
|
|
86
86
|
};
|
|
87
87
|
})
|
|
@@ -79,7 +79,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
return {
|
|
80
80
|
name: k,
|
|
81
81
|
fn: withCtx((scope) => [
|
|
82
|
-
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
82
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope || {})))
|
|
83
83
|
])
|
|
84
84
|
};
|
|
85
85
|
})
|
|
@@ -488,7 +488,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
488
488
|
return getColumnList(v);
|
|
489
489
|
} else {
|
|
490
490
|
return getColumnList(props.list, (obj) => {
|
|
491
|
-
return obj.form && obj.
|
|
491
|
+
return obj.form && obj.isedit === false;
|
|
492
492
|
});
|
|
493
493
|
}
|
|
494
494
|
} else {
|
|
@@ -597,7 +597,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
597
597
|
return {
|
|
598
598
|
name: k,
|
|
599
599
|
fn: vue.withCtx((scope) => [
|
|
600
|
-
vue.unref(slots)["form-" + k] ? vue.renderSlot(_ctx.$slots, "form-" + k, vue.normalizeProps(vue.mergeProps({ key: 0 }, scope))) : vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.mergeProps({ key: 1 }, scope)))
|
|
600
|
+
vue.unref(slots)["form-" + k] ? vue.renderSlot(_ctx.$slots, "form-" + k, vue.normalizeProps(vue.mergeProps({ key: 0 }, scope || {}))) : vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.mergeProps({ key: 1 }, scope || {})))
|
|
601
601
|
])
|
|
602
602
|
};
|
|
603
603
|
})
|
|
@@ -609,7 +609,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
609
609
|
title: vue.unref(props).config.name + vue.unref(getLocale)("page.details"),
|
|
610
610
|
modelValue: details.visible,
|
|
611
611
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => details.visible = $event),
|
|
612
|
-
|
|
612
|
+
isFooter: false
|
|
613
613
|
}, {
|
|
614
614
|
default: vue.withCtx(() => {
|
|
615
615
|
var _a2;
|
|
@@ -624,7 +624,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
624
624
|
return {
|
|
625
625
|
name: k,
|
|
626
626
|
fn: vue.withCtx((scope) => [
|
|
627
|
-
vue.unref(slots)["list-" + k] ? vue.renderSlot(_ctx.$slots, "list-" + k, vue.normalizeProps(vue.mergeProps({ key: 0 }, scope))) : vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.mergeProps({ key: 1 }, scope)))
|
|
627
|
+
vue.unref(slots)["list-" + k] ? vue.renderSlot(_ctx.$slots, "list-" + k, vue.normalizeProps(vue.mergeProps({ key: 0 }, scope || {}))) : vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.mergeProps({ key: 1 }, scope || {})))
|
|
628
628
|
])
|
|
629
629
|
};
|
|
630
630
|
})
|
|
@@ -656,7 +656,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
656
656
|
return {
|
|
657
657
|
name: k,
|
|
658
658
|
fn: vue.withCtx((scope) => [
|
|
659
|
-
vue.unref(slots)["query-" + k] ? vue.renderSlot(_ctx.$slots, "query-" + k, vue.normalizeProps(vue.mergeProps({ key: 0 }, scope))) : vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.mergeProps({ key: 1 }, scope)))
|
|
659
|
+
vue.unref(slots)["query-" + k] ? vue.renderSlot(_ctx.$slots, "query-" + k, vue.normalizeProps(vue.mergeProps({ key: 0 }, scope || {}))) : vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.mergeProps({ key: 1 }, scope || {})))
|
|
660
660
|
])
|
|
661
661
|
};
|
|
662
662
|
})
|
|
@@ -719,7 +719,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
719
719
|
return {
|
|
720
720
|
name: k,
|
|
721
721
|
fn: vue.withCtx((scope) => [
|
|
722
|
-
vue.unref(slots)["table-" + k] ? vue.renderSlot(_ctx.$slots, "table-" + k, vue.normalizeProps(vue.mergeProps({ key: 0 }, scope))) : vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.mergeProps({ key: 1 }, scope)))
|
|
722
|
+
vue.unref(slots)["table-" + k] ? vue.renderSlot(_ctx.$slots, "table-" + k, vue.normalizeProps(vue.mergeProps({ key: 0 }, scope || {}))) : vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.mergeProps({ key: 1 }, scope || {})))
|
|
723
723
|
])
|
|
724
724
|
};
|
|
725
725
|
})
|
|
@@ -486,7 +486,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
486
486
|
return getColumnList(v);
|
|
487
487
|
} else {
|
|
488
488
|
return getColumnList(props.list, (obj) => {
|
|
489
|
-
return obj.form && obj.
|
|
489
|
+
return obj.form && obj.isedit === false;
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
492
|
} else {
|
|
@@ -595,7 +595,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
595
595
|
return {
|
|
596
596
|
name: k,
|
|
597
597
|
fn: withCtx((scope) => [
|
|
598
|
-
unref(slots)["form-" + k] ? renderSlot(_ctx.$slots, "form-" + k, normalizeProps(mergeProps({ key: 0 }, scope))) : renderSlot(_ctx.$slots, k, normalizeProps(mergeProps({ key: 1 }, scope)))
|
|
598
|
+
unref(slots)["form-" + k] ? renderSlot(_ctx.$slots, "form-" + k, normalizeProps(mergeProps({ key: 0 }, scope || {}))) : renderSlot(_ctx.$slots, k, normalizeProps(mergeProps({ key: 1 }, scope || {})))
|
|
599
599
|
])
|
|
600
600
|
};
|
|
601
601
|
})
|
|
@@ -607,7 +607,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
607
607
|
title: unref(props).config.name + unref(getLocale)("page.details"),
|
|
608
608
|
modelValue: details.visible,
|
|
609
609
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => details.visible = $event),
|
|
610
|
-
|
|
610
|
+
isFooter: false
|
|
611
611
|
}, {
|
|
612
612
|
default: withCtx(() => {
|
|
613
613
|
var _a2;
|
|
@@ -622,7 +622,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
622
622
|
return {
|
|
623
623
|
name: k,
|
|
624
624
|
fn: withCtx((scope) => [
|
|
625
|
-
unref(slots)["list-" + k] ? renderSlot(_ctx.$slots, "list-" + k, normalizeProps(mergeProps({ key: 0 }, scope))) : renderSlot(_ctx.$slots, k, normalizeProps(mergeProps({ key: 1 }, scope)))
|
|
625
|
+
unref(slots)["list-" + k] ? renderSlot(_ctx.$slots, "list-" + k, normalizeProps(mergeProps({ key: 0 }, scope || {}))) : renderSlot(_ctx.$slots, k, normalizeProps(mergeProps({ key: 1 }, scope || {})))
|
|
626
626
|
])
|
|
627
627
|
};
|
|
628
628
|
})
|
|
@@ -654,7 +654,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
654
654
|
return {
|
|
655
655
|
name: k,
|
|
656
656
|
fn: withCtx((scope) => [
|
|
657
|
-
unref(slots)["query-" + k] ? renderSlot(_ctx.$slots, "query-" + k, normalizeProps(mergeProps({ key: 0 }, scope))) : renderSlot(_ctx.$slots, k, normalizeProps(mergeProps({ key: 1 }, scope)))
|
|
657
|
+
unref(slots)["query-" + k] ? renderSlot(_ctx.$slots, "query-" + k, normalizeProps(mergeProps({ key: 0 }, scope || {}))) : renderSlot(_ctx.$slots, k, normalizeProps(mergeProps({ key: 1 }, scope || {})))
|
|
658
658
|
])
|
|
659
659
|
};
|
|
660
660
|
})
|
|
@@ -717,7 +717,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
717
717
|
return {
|
|
718
718
|
name: k,
|
|
719
719
|
fn: withCtx((scope) => [
|
|
720
|
-
unref(slots)["table-" + k] ? renderSlot(_ctx.$slots, "table-" + k, normalizeProps(mergeProps({ key: 0 }, scope))) : renderSlot(_ctx.$slots, k, normalizeProps(mergeProps({ key: 1 }, scope)))
|
|
720
|
+
unref(slots)["table-" + k] ? renderSlot(_ctx.$slots, "table-" + k, normalizeProps(mergeProps({ key: 0 }, scope || {}))) : renderSlot(_ctx.$slots, k, normalizeProps(mergeProps({ key: 1 }, scope || {})))
|
|
721
721
|
])
|
|
722
722
|
};
|
|
723
723
|
})
|
|
@@ -57,59 +57,49 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
57
57
|
return arr.length > 0;
|
|
58
58
|
});
|
|
59
59
|
const setEmptyFun = () => {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return "";
|
|
74
|
-
}
|
|
75
|
-
return o;
|
|
76
|
-
});
|
|
77
|
-
} else {
|
|
78
|
-
if (v === emptyValue) {
|
|
79
|
-
listFuObj.value.value = "";
|
|
80
|
-
} else {
|
|
81
|
-
listFuObj.value.value = v;
|
|
60
|
+
setValue = (item) => {
|
|
61
|
+
const v = use.useVueValue(item, props.prop);
|
|
62
|
+
if (v === "") {
|
|
63
|
+
return emptyValue;
|
|
64
|
+
}
|
|
65
|
+
return v;
|
|
66
|
+
};
|
|
67
|
+
value = vue.computed({
|
|
68
|
+
set(v) {
|
|
69
|
+
if (multiple.value) {
|
|
70
|
+
listFuObj.value.value = (v ?? []).map((o) => {
|
|
71
|
+
if (o === emptyValue) {
|
|
72
|
+
return "";
|
|
82
73
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return (v ?? []).map((o) => {
|
|
89
|
-
if (o === "") {
|
|
90
|
-
return emptyValue;
|
|
91
|
-
}
|
|
92
|
-
return o;
|
|
93
|
-
});
|
|
74
|
+
return o;
|
|
75
|
+
});
|
|
76
|
+
} else {
|
|
77
|
+
if (v === emptyValue) {
|
|
78
|
+
listFuObj.value.value = "";
|
|
94
79
|
} else {
|
|
95
|
-
|
|
80
|
+
listFuObj.value.value = v;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
get() {
|
|
85
|
+
const v = listFuObj.value.value;
|
|
86
|
+
if (multiple.value) {
|
|
87
|
+
return (v ?? []).map((o) => {
|
|
88
|
+
if (o === "") {
|
|
96
89
|
return emptyValue;
|
|
97
90
|
}
|
|
98
|
-
return
|
|
91
|
+
return o;
|
|
92
|
+
});
|
|
93
|
+
} else {
|
|
94
|
+
if (isOptionsEmpty.value && v === "") {
|
|
95
|
+
return emptyValue;
|
|
99
96
|
}
|
|
97
|
+
return v;
|
|
100
98
|
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
103
101
|
};
|
|
104
|
-
|
|
105
|
-
() => isOptionsEmpty.value,
|
|
106
|
-
() => {
|
|
107
|
-
setEmptyFun();
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
immediate: true
|
|
111
|
-
}
|
|
112
|
-
);
|
|
102
|
+
setEmptyFun();
|
|
113
103
|
}
|
|
114
104
|
const onChange = (v) => {
|
|
115
105
|
if (multiple.value) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, useAttrs, computed,
|
|
1
|
+
import { defineComponent, ref, useAttrs, computed, createElementBlock, openBlock, mergeProps, unref, createVNode, isRef, withCtx, Fragment, renderList, createBlock } from "vue";
|
|
2
2
|
import { Select } from "../../select/index.js";
|
|
3
3
|
import { Option } from "../../option/index.js";
|
|
4
4
|
import { compareArray } from "@fangzhongya/utils/basic/array/compareArray";
|
|
@@ -55,59 +55,49 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
return arr.length > 0;
|
|
56
56
|
});
|
|
57
57
|
const setEmptyFun = () => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return "";
|
|
72
|
-
}
|
|
73
|
-
return o;
|
|
74
|
-
});
|
|
75
|
-
} else {
|
|
76
|
-
if (v === emptyValue) {
|
|
77
|
-
listFuObj.value.value = "";
|
|
78
|
-
} else {
|
|
79
|
-
listFuObj.value.value = v;
|
|
58
|
+
setValue = (item) => {
|
|
59
|
+
const v = useVueValue(item, props.prop);
|
|
60
|
+
if (v === "") {
|
|
61
|
+
return emptyValue;
|
|
62
|
+
}
|
|
63
|
+
return v;
|
|
64
|
+
};
|
|
65
|
+
value = computed({
|
|
66
|
+
set(v) {
|
|
67
|
+
if (multiple.value) {
|
|
68
|
+
listFuObj.value.value = (v ?? []).map((o) => {
|
|
69
|
+
if (o === emptyValue) {
|
|
70
|
+
return "";
|
|
80
71
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return (v ?? []).map((o) => {
|
|
87
|
-
if (o === "") {
|
|
88
|
-
return emptyValue;
|
|
89
|
-
}
|
|
90
|
-
return o;
|
|
91
|
-
});
|
|
72
|
+
return o;
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
if (v === emptyValue) {
|
|
76
|
+
listFuObj.value.value = "";
|
|
92
77
|
} else {
|
|
93
|
-
|
|
78
|
+
listFuObj.value.value = v;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
get() {
|
|
83
|
+
const v = listFuObj.value.value;
|
|
84
|
+
if (multiple.value) {
|
|
85
|
+
return (v ?? []).map((o) => {
|
|
86
|
+
if (o === "") {
|
|
94
87
|
return emptyValue;
|
|
95
88
|
}
|
|
96
|
-
return
|
|
89
|
+
return o;
|
|
90
|
+
});
|
|
91
|
+
} else {
|
|
92
|
+
if (isOptionsEmpty.value && v === "") {
|
|
93
|
+
return emptyValue;
|
|
97
94
|
}
|
|
95
|
+
return v;
|
|
98
96
|
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
97
|
+
}
|
|
98
|
+
});
|
|
101
99
|
};
|
|
102
|
-
|
|
103
|
-
() => isOptionsEmpty.value,
|
|
104
|
-
() => {
|
|
105
|
-
setEmptyFun();
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
immediate: true
|
|
109
|
-
}
|
|
110
|
-
);
|
|
100
|
+
setEmptyFun();
|
|
111
101
|
}
|
|
112
102
|
const onChange = (v) => {
|
|
113
103
|
if (multiple.value) {
|
|
@@ -3,7 +3,11 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const list = require("../../common/list.cjs");
|
|
4
4
|
const name = "switchs";
|
|
5
5
|
const dataProps = {
|
|
6
|
-
...list.props
|
|
6
|
+
...list.props,
|
|
7
|
+
isEmpty: {
|
|
8
|
+
type: Boolean,
|
|
9
|
+
default: true
|
|
10
|
+
}
|
|
7
11
|
};
|
|
8
12
|
const dataEmits = [...list.emits];
|
|
9
13
|
exports.dataEmits = dataEmits;
|
|
@@ -31,18 +31,29 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
31
31
|
const elRef = vue.ref();
|
|
32
32
|
const active = vue.ref({});
|
|
33
33
|
const inactive = vue.ref({});
|
|
34
|
+
const emptyValue = "__Symbol('empty')__" + (/* @__PURE__ */ new Date()).valueOf();
|
|
34
35
|
vue.watch(
|
|
35
36
|
() => props.options,
|
|
36
37
|
() => {
|
|
37
38
|
if (props.options && props.options.length > 1) {
|
|
38
39
|
const i = props.options[0];
|
|
39
40
|
inactive.value.text = use.useVueValue(i, props.label);
|
|
40
|
-
|
|
41
|
+
const v = use.useVueValue(i, props.prop);
|
|
42
|
+
if (props.isEmpty && v === "") {
|
|
43
|
+
inactive.value.value = emptyValue;
|
|
44
|
+
} else {
|
|
45
|
+
inactive.value.value = v;
|
|
46
|
+
}
|
|
41
47
|
inactive.value.icon = i == null ? void 0 : i.icon;
|
|
42
48
|
inactive.value.color = i == null ? void 0 : i.color;
|
|
43
49
|
const a = props.options[1];
|
|
44
50
|
active.value.text = use.useVueValue(a, props.label);
|
|
45
|
-
|
|
51
|
+
const va = use.useVueValue(a, props.prop);
|
|
52
|
+
if (props.isEmpty && va === "") {
|
|
53
|
+
active.value.value = emptyValue;
|
|
54
|
+
} else {
|
|
55
|
+
active.value.value = va;
|
|
56
|
+
}
|
|
46
57
|
active.value.icon = a == null ? void 0 : a.icon;
|
|
47
58
|
active.value.color = a == null ? void 0 : a.color;
|
|
48
59
|
}
|
|
@@ -63,9 +74,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
63
74
|
const value = vue.computed({
|
|
64
75
|
get() {
|
|
65
76
|
let v = props.modelValue;
|
|
77
|
+
if (props.isEmpty && v === "") {
|
|
78
|
+
return emptyValue;
|
|
79
|
+
}
|
|
66
80
|
return v;
|
|
67
81
|
},
|
|
68
82
|
set(value2) {
|
|
83
|
+
if (props.isEmpty && value2 === emptyValue) {
|
|
84
|
+
value2 = "";
|
|
85
|
+
}
|
|
69
86
|
emit("update:modelValue", value2);
|
|
70
87
|
if (props.optobj) {
|
|
71
88
|
const obj = props.options.filter((o) => {
|
|
@@ -29,18 +29,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
const elRef = ref();
|
|
30
30
|
const active = ref({});
|
|
31
31
|
const inactive = ref({});
|
|
32
|
+
const emptyValue = "__Symbol('empty')__" + (/* @__PURE__ */ new Date()).valueOf();
|
|
32
33
|
watch(
|
|
33
34
|
() => props.options,
|
|
34
35
|
() => {
|
|
35
36
|
if (props.options && props.options.length > 1) {
|
|
36
37
|
const i = props.options[0];
|
|
37
38
|
inactive.value.text = useVueValue(i, props.label);
|
|
38
|
-
|
|
39
|
+
const v = useVueValue(i, props.prop);
|
|
40
|
+
if (props.isEmpty && v === "") {
|
|
41
|
+
inactive.value.value = emptyValue;
|
|
42
|
+
} else {
|
|
43
|
+
inactive.value.value = v;
|
|
44
|
+
}
|
|
39
45
|
inactive.value.icon = i == null ? void 0 : i.icon;
|
|
40
46
|
inactive.value.color = i == null ? void 0 : i.color;
|
|
41
47
|
const a = props.options[1];
|
|
42
48
|
active.value.text = useVueValue(a, props.label);
|
|
43
|
-
|
|
49
|
+
const va = useVueValue(a, props.prop);
|
|
50
|
+
if (props.isEmpty && va === "") {
|
|
51
|
+
active.value.value = emptyValue;
|
|
52
|
+
} else {
|
|
53
|
+
active.value.value = va;
|
|
54
|
+
}
|
|
44
55
|
active.value.icon = a == null ? void 0 : a.icon;
|
|
45
56
|
active.value.color = a == null ? void 0 : a.color;
|
|
46
57
|
}
|
|
@@ -61,9 +72,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
61
72
|
const value = computed({
|
|
62
73
|
get() {
|
|
63
74
|
let v = props.modelValue;
|
|
75
|
+
if (props.isEmpty && v === "") {
|
|
76
|
+
return emptyValue;
|
|
77
|
+
}
|
|
64
78
|
return v;
|
|
65
79
|
},
|
|
66
80
|
set(value2) {
|
|
81
|
+
if (props.isEmpty && value2 === emptyValue) {
|
|
82
|
+
value2 = "";
|
|
83
|
+
}
|
|
67
84
|
emit("update:modelValue", value2);
|
|
68
85
|
if (props.optobj) {
|
|
69
86
|
const obj = props.options.filter((o) => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
+
const unmergeObject = require("@fangzhongya/utils/basic/object/unmergeObject");
|
|
4
5
|
require("../../../utils/index.cjs");
|
|
5
6
|
const urls = require("../../common/urls.cjs");
|
|
6
7
|
const firstLower = require("@fangzhongya/utils/basic/string/firstLower");
|
|
@@ -73,7 +74,7 @@ const dataProps = {
|
|
|
73
74
|
}
|
|
74
75
|
};
|
|
75
76
|
const dataEmit = ["list-events", "selection", "drag", "update:value"];
|
|
76
|
-
const useInit = (props2, emit, refTable, getLocale,
|
|
77
|
+
const useInit = (props2, emit, refTable, getLocale, defaultConfig = {}) => {
|
|
77
78
|
var _a, _b;
|
|
78
79
|
const loading = vue.ref(false);
|
|
79
80
|
const mpagconfig = {
|
|
@@ -207,7 +208,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
207
208
|
paginat.cross = pagin.cross || false;
|
|
208
209
|
paginat.pageSize = pagin.size || mpagconfig.pageSize;
|
|
209
210
|
pagconfig.value = Object.assign({}, mpagconfig, pagin.config || {});
|
|
210
|
-
tableConfig.value = config;
|
|
211
|
+
tableConfig.value = unmergeObject.unmergeObject(defaultConfig, config, 2);
|
|
211
212
|
};
|
|
212
213
|
vue.watch(
|
|
213
214
|
[() => props2.configs, () => props2.config, () => props2.list],
|
|
@@ -232,13 +233,6 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
232
233
|
});
|
|
233
234
|
return obj;
|
|
234
235
|
});
|
|
235
|
-
const istype = vue.computed(() => {
|
|
236
|
-
if (isEl) {
|
|
237
|
-
return true;
|
|
238
|
-
} else {
|
|
239
|
-
return tableConfig.value.type == 1;
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
236
|
function setCrossPage() {
|
|
243
237
|
const v = data.current;
|
|
244
238
|
console.log("v", v);
|
|
@@ -428,7 +422,7 @@ const useInit = (props2, emit, refTable, getLocale, isEl) => {
|
|
|
428
422
|
}
|
|
429
423
|
function empty() {
|
|
430
424
|
var _a2, _b2, _c, _d;
|
|
431
|
-
if (
|
|
425
|
+
if (tableConfig.value.type == 1 && ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.isradio)) {
|
|
432
426
|
(_b2 = refTable.value) == null ? void 0 : _b2.clearRadioRow();
|
|
433
427
|
}
|
|
434
428
|
(_c = refTable.value) == null ? void 0 : _c.clearSelection();
|
|
@@ -93,7 +93,7 @@ export declare const dataProps: {
|
|
|
93
93
|
};
|
|
94
94
|
};
|
|
95
95
|
export declare const dataEmit: string[];
|
|
96
|
-
export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit: Function, refTable: Ref, getLocale: Translator,
|
|
96
|
+
export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit: Function, refTable: Ref, getLocale: Translator, defaultConfig?: TableConfig) => {
|
|
97
97
|
height: ComputedRef<any>;
|
|
98
98
|
tableConfig: Ref<{
|
|
99
99
|
[x: string]: any;
|