@fangzhongya/fang-ui 0.1.27 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/array/index.css +4 -0
- package/dist/components/array/src/index2.cjs +5 -5
- package/dist/components/array/src/index2.js +2 -2
- package/dist/components/audios/index.css +4 -0
- package/dist/components/box/index.css +4 -0
- package/dist/components/box-adjust/index.css +4 -0
- package/dist/components/box-local/index.css +4 -0
- package/dist/components/box-mask/index.css +4 -0
- package/dist/components/box-title/index.css +4 -0
- package/dist/components/buttons/index.css +4 -0
- package/dist/components/cascaders/index.css +4 -0
- package/dist/components/checks/index.css +4 -0
- package/dist/components/common/compons/components.cjs +52 -0
- package/dist/components/common/compons/components.d.ts +27 -0
- package/dist/components/common/compons/components.js +52 -0
- package/dist/components/common/compons/index.scss +23 -0
- package/dist/components/common/compons/index2.scss +23 -0
- package/dist/components/common/use.cjs +29 -3
- package/dist/components/common/use.d.ts +2 -2
- package/dist/components/common/use.js +29 -3
- package/dist/components/dates/index.css +4 -0
- package/dist/components/dates-divide/index.css +4 -0
- package/dist/components/dates-picker/index.css +4 -0
- package/dist/components/dates2/index.css +4 -0
- package/dist/components/dialogs/index.css +4 -0
- package/dist/components/edit/index.css +4 -0
- package/dist/components/edit-float/index.css +4 -0
- package/dist/components/forms/common/config.cjs +11 -1
- package/dist/components/forms/common/config.d.ts +1 -0
- package/dist/components/forms/common/config.js +11 -1
- package/dist/components/forms/index.css +10 -6
- package/dist/components/forms/index.scss +2 -1
- package/dist/components/forms/src/data.cjs +7 -0
- package/dist/components/forms/src/data.d.ts +7 -0
- package/dist/components/forms/src/data.js +7 -0
- package/dist/components/forms/src/setup.cjs +3 -12
- package/dist/components/forms/src/setup.d.ts +1 -1
- package/dist/components/forms/src/setup.js +4 -13
- package/dist/components/forms/style/index2.scss +3 -1
- package/dist/components/forms-div/index.css +4 -0
- package/dist/components/forms-div/src/index2.cjs +4 -4
- package/dist/components/forms-div/src/index2.js +2 -2
- package/dist/components/forms-item/index.css +4 -0
- package/dist/components/forms-item/src/indexts.d.ts +1 -1
- package/dist/components/forms-item/src/label.cjs +15 -28
- package/dist/components/forms-item/src/label.js +16 -29
- package/dist/components/full-screen/index.css +4 -0
- package/dist/components/history/index.css +4 -0
- package/dist/components/icon/index.css +4 -0
- package/dist/components/icon-picker/index.css +4 -0
- package/dist/components/iframe/index.css +4 -0
- package/dist/components/images/index.css +4 -0
- package/dist/components/index.cjs +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.scss +2 -1
- package/dist/components/index2.scss +2 -1
- package/dist/components/input-array/index.css +4 -0
- package/dist/components/input-history/index.css +4 -0
- package/dist/components/input-num/index.css +4 -0
- package/dist/components/input-select/index.css +4 -0
- package/dist/components/inputs/index.css +4 -0
- package/dist/components/{global-config → keep-com}/index.css +4 -0
- package/dist/components/labels/index.css +4 -0
- package/dist/components/list/index.css +4 -0
- package/dist/components/list/src/data.cjs +6 -0
- package/dist/components/list/src/data.d.ts +6 -0
- package/dist/components/list/src/data.js +6 -0
- package/dist/components/list/src/index2.cjs +6 -6
- package/dist/components/list/src/index2.js +2 -2
- package/dist/components/lists/index.css +4 -0
- package/dist/components/listsp/index.css +4 -0
- package/dist/components/listspd/index.css +4 -0
- package/dist/components/menus/index.css +4 -0
- package/dist/components/no-data/index.css +4 -0
- package/dist/components/page/index.css +10 -6
- package/dist/components/paging/index.css +4 -0
- package/dist/components/popup/index.css +4 -0
- package/dist/components/retract/index.css +4 -0
- package/dist/components/right-key/index.css +4 -0
- package/dist/components/scss/common.scss +4 -0
- package/dist/components/seamless-scroll/index.css +4 -0
- package/dist/components/select-scroll/index.css +4 -0
- package/dist/components/selector/index.css +4 -0
- package/dist/components/selects/index.css +4 -0
- package/dist/components/sliders/index.css +4 -0
- package/dist/components/switchs/index.css +4 -0
- package/dist/components/tables/common/config.cjs +1 -1
- package/dist/components/tables/common/config.js +1 -1
- package/dist/components/tables/common/pagin.cjs +74 -32
- package/dist/components/tables/common/pagin.d.ts +8 -1
- package/dist/components/tables/common/pagin.js +74 -32
- package/dist/components/tables/index.css +4 -0
- package/dist/components/tables/src/column.cjs +22 -20
- package/dist/components/tables/src/column.d.ts +3 -0
- package/dist/components/tables/src/column.js +14 -12
- package/dist/components/tables/src/data.cjs +15 -0
- package/dist/components/tables/src/data.d.ts +13 -0
- package/dist/components/tables/src/data.js +15 -0
- package/dist/components/tables/src/index2.cjs +17 -9
- package/dist/components/tables/src/index2.js +11 -3
- package/dist/components/tablesp/index.css +4 -0
- package/dist/components/tablespd/index.css +4 -0
- package/dist/components/tabless/index.css +4 -0
- package/dist/components/tablesv/index.css +4 -0
- package/dist/components/tablesv/src/column.cjs +116 -112
- package/dist/components/tablesv/src/column.d.ts +3 -1
- package/dist/components/tablesv/src/column.js +110 -106
- package/dist/components/tablesv/src/data.cjs +44 -0
- package/dist/components/tablesv/src/data.d.ts +43 -1
- package/dist/components/tablesv/src/data.js +44 -0
- package/dist/components/tablesv/src/index2.cjs +37 -14
- package/dist/components/tablesv/src/index2.js +36 -13
- package/dist/components/tablesv/style/index2.scss +3 -1
- package/dist/components/tablesvp/index.css +10 -0
- package/dist/components/tablesvp/index.scss +8 -0
- package/dist/components/tablesvp/src/index2.cjs +15 -5
- package/dist/components/tablesvp/src/index2.js +15 -5
- package/dist/components/tablesvpd/index.cjs +9 -0
- package/dist/components/tablesvpd/index.css +157 -0
- package/dist/components/tablesvpd/index.d.ts +4 -0
- package/dist/components/tablesvpd/index.js +9 -0
- package/dist/components/tablesvpd/index.scss +41 -0
- package/dist/components/tablesvpd/src/data.cjs +13 -0
- package/dist/components/tablesvpd/src/data.d.ts +18 -0
- package/dist/components/tablesvpd/src/data.js +13 -0
- package/dist/components/tablesvpd/src/index.cjs +4 -0
- package/dist/components/tablesvpd/src/index.js +4 -0
- package/dist/components/tablesvpd/src/index2.cjs +107 -0
- package/dist/components/tablesvpd/src/index2.js +107 -0
- package/dist/components/tablesvpd/style/index2.scss +4 -0
- package/dist/components/uploads/index.css +4 -0
- package/dist/components/videos/index.css +4 -0
- package/dist/components/window/index.css +4 -0
- package/dist/css/array.css +4 -0
- package/dist/css/audios.css +4 -0
- package/dist/css/box-adjust.css +4 -0
- package/dist/css/box-local.css +4 -0
- package/dist/css/box-mask.css +4 -0
- package/dist/css/box-title.css +4 -0
- package/dist/css/box.css +4 -0
- package/dist/css/buttons.css +4 -0
- package/dist/css/cascaders.css +4 -0
- package/dist/css/checks.css +4 -0
- package/dist/css/dates-divide.css +4 -0
- package/dist/css/dates-picker.css +4 -0
- package/dist/css/dates.css +4 -0
- package/dist/css/dates2.css +4 -0
- package/dist/css/dialogs.css +4 -0
- package/dist/css/edit-float.css +4 -0
- package/dist/css/edit.css +4 -0
- package/dist/css/forms-div.css +4 -0
- package/dist/css/forms-item.css +4 -0
- package/dist/css/forms.css +10 -6
- package/dist/css/full-screen.css +4 -0
- package/dist/css/history.css +4 -0
- package/dist/css/icon-picker.css +4 -0
- package/dist/css/icon.css +4 -0
- package/dist/css/iframe.css +4 -0
- package/dist/css/images.css +4 -0
- package/dist/css/index.css +44 -6
- package/dist/css/input-array.css +4 -0
- package/dist/css/input-history.css +4 -0
- package/dist/css/input-num.css +4 -0
- package/dist/css/input-select.css +4 -0
- package/dist/css/inputs.css +4 -0
- package/dist/css/{global-config.css → keep-com.css} +4 -0
- package/dist/css/labels.css +4 -0
- package/dist/css/list.css +4 -0
- package/dist/css/lists.css +4 -0
- package/dist/css/listsp.css +4 -0
- package/dist/css/listspd.css +4 -0
- package/dist/css/menus.css +4 -0
- package/dist/css/no-data.css +4 -0
- package/dist/css/page.css +10 -6
- package/dist/css/paging.css +4 -0
- package/dist/css/popup.css +4 -0
- package/dist/css/retract.css +4 -0
- package/dist/css/right-key.css +4 -0
- package/dist/css/seamless-scroll.css +4 -0
- package/dist/css/select-scroll.css +4 -0
- package/dist/css/selector.css +4 -0
- package/dist/css/selects.css +4 -0
- package/dist/css/sliders.css +4 -0
- package/dist/css/switchs.css +4 -0
- package/dist/css/tables.css +4 -0
- package/dist/css/tablesp.css +4 -0
- package/dist/css/tablespd.css +4 -0
- package/dist/css/tabless.css +4 -0
- package/dist/css/tablesv.css +4 -0
- package/dist/css/tablesvp.css +10 -0
- package/dist/css/tablesvpd.css +157 -0
- package/dist/css/uploads.css +4 -0
- package/dist/css/videos.css +4 -0
- package/dist/css/window.css +4 -0
- package/dist/expand/{chunk-MC76Q3TQ.cjs → chunk-3HP2ZDNG.cjs} +3 -1
- package/dist/expand/{chunk-CV4O5V2F.js → chunk-7C25SBCF.js} +3 -1
- 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/compons/index.cjs +44 -0
- package/dist/hooks/compons/index.d.ts +7 -0
- package/dist/hooks/compons/index.js +44 -0
- package/dist/icons/index.json +1 -1
- package/dist/index.cjs +24 -22
- package/dist/index.css +44 -6
- package/dist/index.js +2 -0
- package/package.json +12 -12
- package/dist/components/common/compons.cjs +0 -76
- package/dist/components/common/compons.d.ts +0 -9
- package/dist/components/common/compons.js +0 -76
- package/dist/components/common/compons.scss +0 -26
- package/dist/components/common/compons2.scss +0 -26
|
@@ -3,114 +3,14 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const use = require("../../common/use.cjs");
|
|
5
5
|
const getAttrValue = require("../../../utils/vues/getAttrValue.cjs");
|
|
6
|
-
const
|
|
6
|
+
const index = require("../../../hooks/compons/index.cjs");
|
|
7
7
|
const config = require("../../tables/common/config.cjs");
|
|
8
8
|
const util = require("../../tables/common/util.cjs");
|
|
9
9
|
require("../../../utils/index.cjs");
|
|
10
10
|
const column = require("vxe-table/es/column");
|
|
11
|
-
const index = require("../../radio/index.cjs");
|
|
12
|
-
const index$
|
|
11
|
+
const index$1 = require("../../radio/index.cjs");
|
|
12
|
+
const index$2 = require("../../checkbox/index.cjs");
|
|
13
13
|
const lineToSmallHump = require("@fangzhongya/utils/name/lineToSmallHump");
|
|
14
|
-
function setBox(props, obj, emit, propss, slots, index$2) {
|
|
15
|
-
if (props.type == "radio") {
|
|
16
|
-
return vue.h(
|
|
17
|
-
column.VxeColumn,
|
|
18
|
-
{
|
|
19
|
-
...props,
|
|
20
|
-
className: obj.class,
|
|
21
|
-
minWidth: util.setMinWidth(obj, propss)
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
radio: (scope) => {
|
|
25
|
-
return vue.h(
|
|
26
|
-
"span",
|
|
27
|
-
{
|
|
28
|
-
class: "fv-custom-radio " + props.align + " " + (scope.disabled ? "is-disabled" : ""),
|
|
29
|
-
onClick(event) {
|
|
30
|
-
emit("list-events", "radio", scope);
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
[
|
|
34
|
-
vue.h(
|
|
35
|
-
index.Radio,
|
|
36
|
-
{
|
|
37
|
-
modelValue: scope.checked,
|
|
38
|
-
value: true,
|
|
39
|
-
label: true,
|
|
40
|
-
disabled: scope.disabled
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
default() {
|
|
44
|
-
return "";
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
),
|
|
48
|
-
vue.h("span", {
|
|
49
|
-
class: "fv-custom-radio-mask"
|
|
50
|
-
})
|
|
51
|
-
]
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
);
|
|
56
|
-
} else {
|
|
57
|
-
return vue.h(
|
|
58
|
-
column.VxeColumn,
|
|
59
|
-
{
|
|
60
|
-
...props,
|
|
61
|
-
className: obj.class,
|
|
62
|
-
minWidth: util.setMinWidth(obj, propss)
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
header: (scope) => {
|
|
66
|
-
return vue.h(
|
|
67
|
-
"span",
|
|
68
|
-
{
|
|
69
|
-
class: "fv-custom-checkbox",
|
|
70
|
-
onClick(event) {
|
|
71
|
-
emit("list-events", "checkbox-all", scope);
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
[
|
|
75
|
-
vue.h(
|
|
76
|
-
index$1.Checkbox,
|
|
77
|
-
{
|
|
78
|
-
indeterminate: scope.indeterminate,
|
|
79
|
-
modelValue: scope.checked
|
|
80
|
-
},
|
|
81
|
-
obj.label
|
|
82
|
-
),
|
|
83
|
-
vue.h("span", {
|
|
84
|
-
class: "fv-custom-checkbox-mask"
|
|
85
|
-
})
|
|
86
|
-
]
|
|
87
|
-
);
|
|
88
|
-
},
|
|
89
|
-
checkbox: (scope) => {
|
|
90
|
-
return vue.h(
|
|
91
|
-
"span",
|
|
92
|
-
{
|
|
93
|
-
class: "fv-custom-checkbox " + (scope.disabled ? "is-disabled" : ""),
|
|
94
|
-
onClick(event) {
|
|
95
|
-
emit("list-events", "checkbox", scope);
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
[
|
|
99
|
-
vue.h(index$1.Checkbox, {
|
|
100
|
-
indeterminate: scope.indeterminate,
|
|
101
|
-
modelValue: scope.checked,
|
|
102
|
-
disabled: scope.disabled
|
|
103
|
-
}),
|
|
104
|
-
vue.h("span", {
|
|
105
|
-
class: "fv-custom-checkbox-mask"
|
|
106
|
-
})
|
|
107
|
-
]
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
14
|
const noProps = ["children", "class", "minWidth"];
|
|
115
15
|
function setProps(obj, props) {
|
|
116
16
|
const table = props.table;
|
|
@@ -126,13 +26,14 @@ function setProps(obj, props) {
|
|
|
126
26
|
const ckey = lineToSmallHump.lineToSmallHump(key);
|
|
127
27
|
if (!noProps.includes(ckey)) {
|
|
128
28
|
if (obj[key] !== "") {
|
|
129
|
-
robj[key] = obj[key];
|
|
130
29
|
if (key == "label") {
|
|
131
30
|
robj["title"] = obj[key];
|
|
132
31
|
} else if (ckey == "showOverflowTooltip") {
|
|
133
32
|
if (obj[key]) {
|
|
134
33
|
robj["show-overflow"] = "tooltip";
|
|
135
34
|
}
|
|
35
|
+
} else if (key == "sortable") {
|
|
36
|
+
robj[key] = obj[key] ? true : void 0;
|
|
136
37
|
} else if (key == "prop") {
|
|
137
38
|
robj["field"] = obj[key];
|
|
138
39
|
} else if (key == "fixed") {
|
|
@@ -162,14 +63,16 @@ function setProps(obj, props) {
|
|
|
162
63
|
} else if (obj[key] == "index") {
|
|
163
64
|
robj[key] = "seq";
|
|
164
65
|
}
|
|
66
|
+
} else {
|
|
67
|
+
robj[key] = obj[key];
|
|
165
68
|
}
|
|
166
69
|
}
|
|
167
70
|
}
|
|
168
71
|
});
|
|
169
72
|
return robj;
|
|
170
73
|
}
|
|
171
|
-
function setSslot(obj, scope, emit, slots, props,
|
|
172
|
-
const slot = use.useSetSlot(obj, scope.row, slots,
|
|
74
|
+
function setSslot(obj, scope, emit, slots, props, index$12) {
|
|
75
|
+
const slot = use.useSetSlot(obj, scope.row, slots, index$12, scope);
|
|
173
76
|
if (slot) {
|
|
174
77
|
return slot;
|
|
175
78
|
}
|
|
@@ -181,16 +84,17 @@ function setSslot(obj, scope, emit, slots, props, index2) {
|
|
|
181
84
|
obj,
|
|
182
85
|
scope.row,
|
|
183
86
|
optionss,
|
|
184
|
-
|
|
87
|
+
index.useComponsGet(config.provides.compons),
|
|
185
88
|
emit,
|
|
186
|
-
|
|
89
|
+
index$12,
|
|
90
|
+
scope
|
|
187
91
|
);
|
|
188
92
|
if (column2) {
|
|
189
93
|
return column2;
|
|
190
94
|
}
|
|
191
95
|
}
|
|
192
96
|
}
|
|
193
|
-
return defaultDom(obj, scope, props,
|
|
97
|
+
return defaultDom(obj, scope, props, index$12);
|
|
194
98
|
}
|
|
195
99
|
function defaultDom(obj, scope, props, index2) {
|
|
196
100
|
var _a;
|
|
@@ -224,7 +128,7 @@ function defaultDom(obj, scope, props, index2) {
|
|
|
224
128
|
domValue ?? table.emptyDisplay ?? ""
|
|
225
129
|
);
|
|
226
130
|
}
|
|
227
|
-
function setHeader(obj, scope, slots, emit, props,
|
|
131
|
+
function setHeader(obj, scope, slots, emit, props, index$12) {
|
|
228
132
|
const optionss = props.options || {};
|
|
229
133
|
return use.useGetDomLabel(
|
|
230
134
|
obj.label,
|
|
@@ -232,9 +136,9 @@ function setHeader(obj, scope, slots, emit, props, index2) {
|
|
|
232
136
|
scope.row,
|
|
233
137
|
slots,
|
|
234
138
|
optionss,
|
|
235
|
-
|
|
139
|
+
index.useComponsGet(config.provides.compons),
|
|
236
140
|
emit,
|
|
237
|
-
|
|
141
|
+
index$12
|
|
238
142
|
);
|
|
239
143
|
}
|
|
240
144
|
function getDom(obj, emit, propss, slots, index2) {
|
|
@@ -266,6 +170,106 @@ function getDom(obj, emit, propss, slots, index2) {
|
|
|
266
170
|
function columnRender(obj, emit, props, slots, index2) {
|
|
267
171
|
return getDom(obj, emit, props, slots, index2);
|
|
268
172
|
}
|
|
173
|
+
function setBox(props, obj, emit, propss, slots, index2) {
|
|
174
|
+
if (props.type == "radio") {
|
|
175
|
+
return vue.h(
|
|
176
|
+
column.VxeColumn,
|
|
177
|
+
{
|
|
178
|
+
...props,
|
|
179
|
+
className: obj.class,
|
|
180
|
+
minWidth: util.setMinWidth(obj, propss)
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
radio: (scope) => {
|
|
184
|
+
return vue.h(
|
|
185
|
+
"span",
|
|
186
|
+
{
|
|
187
|
+
class: "fv-custom-radio " + props.align + " " + (scope.disabled ? "is-disabled" : ""),
|
|
188
|
+
onClick(event) {
|
|
189
|
+
emit("list-events", "radio", scope);
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
[
|
|
193
|
+
vue.h(
|
|
194
|
+
index$1.Radio,
|
|
195
|
+
{
|
|
196
|
+
modelValue: scope.checked,
|
|
197
|
+
value: true,
|
|
198
|
+
label: true,
|
|
199
|
+
disabled: scope.disabled
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
default() {
|
|
203
|
+
return "";
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
vue.h("span", {
|
|
208
|
+
class: "fv-custom-radio-mask"
|
|
209
|
+
})
|
|
210
|
+
]
|
|
211
|
+
);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
} else {
|
|
216
|
+
return vue.h(
|
|
217
|
+
column.VxeColumn,
|
|
218
|
+
{
|
|
219
|
+
...props,
|
|
220
|
+
className: obj.class,
|
|
221
|
+
minWidth: util.setMinWidth(obj, propss)
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
header: (scope) => {
|
|
225
|
+
return vue.h(
|
|
226
|
+
"span",
|
|
227
|
+
{
|
|
228
|
+
class: "fv-custom-checkbox",
|
|
229
|
+
onClick(event) {
|
|
230
|
+
emit("list-events", "checkbox-all", scope);
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
[
|
|
234
|
+
vue.h(
|
|
235
|
+
index$2.Checkbox,
|
|
236
|
+
{
|
|
237
|
+
indeterminate: scope.indeterminate,
|
|
238
|
+
modelValue: scope.checked
|
|
239
|
+
},
|
|
240
|
+
obj.label
|
|
241
|
+
),
|
|
242
|
+
vue.h("span", {
|
|
243
|
+
class: "fv-custom-checkbox-mask"
|
|
244
|
+
})
|
|
245
|
+
]
|
|
246
|
+
);
|
|
247
|
+
},
|
|
248
|
+
checkbox: (scope) => {
|
|
249
|
+
return vue.h(
|
|
250
|
+
"span",
|
|
251
|
+
{
|
|
252
|
+
class: "fv-custom-checkbox " + (scope.disabled ? "is-disabled" : ""),
|
|
253
|
+
onClick(event) {
|
|
254
|
+
emit("list-events", "checkbox", scope);
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
[
|
|
258
|
+
vue.h(index$2.Checkbox, {
|
|
259
|
+
indeterminate: scope.indeterminate,
|
|
260
|
+
modelValue: scope.checked,
|
|
261
|
+
disabled: scope.disabled
|
|
262
|
+
}),
|
|
263
|
+
vue.h("span", {
|
|
264
|
+
class: "fv-custom-checkbox-mask"
|
|
265
|
+
})
|
|
266
|
+
]
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
269
273
|
exports.columnRender = columnRender;
|
|
270
274
|
exports.setHeader = setHeader;
|
|
271
275
|
exports.setProps = setProps;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { VNode, RendererNode, RendererElement } from 'vue';
|
|
2
2
|
export declare function setProps(obj: ListObj, props: ObjAny): ObjAny;
|
|
3
|
-
export declare function setHeader(obj: ListObj, scope: ObjAny, slots: ObjAny, emit: Function, props: ObjAny, index: number):
|
|
3
|
+
export declare function setHeader(obj: ListObj, scope: ObjAny, slots: ObjAny, emit: Function, props: ObjAny, index: number): string | VNode<RendererNode, RendererElement, {
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}>;
|
|
4
6
|
export declare function columnRender(obj: ListObj, emit: Function, props: ObjAny, slots: ObjAny, index: number): VNode<RendererNode, RendererElement, {
|
|
5
7
|
[key: string]: any;
|
|
6
8
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from "vue";
|
|
2
2
|
import { useSetSlot, useSetCompon, useGetDomValue, useGetDomLabel } from "../../common/use.js";
|
|
3
3
|
import { getAttrValue } from "../../../utils/vues/getAttrValue.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useComponsGet } from "../../../hooks/compons/index.js";
|
|
5
5
|
import { provides } from "../../tables/common/config.js";
|
|
6
6
|
import { setMinWidth } from "../../tables/common/util.js";
|
|
7
7
|
import "../../../utils/index.js";
|
|
@@ -9,106 +9,6 @@ import { VxeColumn } from "vxe-table/es/column";
|
|
|
9
9
|
import { Radio } from "../../radio/index.js";
|
|
10
10
|
import { Checkbox } from "../../checkbox/index.js";
|
|
11
11
|
import { lineToSmallHump } from "@fangzhongya/utils/name/lineToSmallHump";
|
|
12
|
-
function setBox(props, obj, emit, propss, slots, index) {
|
|
13
|
-
if (props.type == "radio") {
|
|
14
|
-
return h(
|
|
15
|
-
VxeColumn,
|
|
16
|
-
{
|
|
17
|
-
...props,
|
|
18
|
-
className: obj.class,
|
|
19
|
-
minWidth: setMinWidth(obj, propss)
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
radio: (scope) => {
|
|
23
|
-
return h(
|
|
24
|
-
"span",
|
|
25
|
-
{
|
|
26
|
-
class: "fv-custom-radio " + props.align + " " + (scope.disabled ? "is-disabled" : ""),
|
|
27
|
-
onClick(event) {
|
|
28
|
-
emit("list-events", "radio", scope);
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
[
|
|
32
|
-
h(
|
|
33
|
-
Radio,
|
|
34
|
-
{
|
|
35
|
-
modelValue: scope.checked,
|
|
36
|
-
value: true,
|
|
37
|
-
label: true,
|
|
38
|
-
disabled: scope.disabled
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
default() {
|
|
42
|
-
return "";
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
h("span", {
|
|
47
|
-
class: "fv-custom-radio-mask"
|
|
48
|
-
})
|
|
49
|
-
]
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
);
|
|
54
|
-
} else {
|
|
55
|
-
return h(
|
|
56
|
-
VxeColumn,
|
|
57
|
-
{
|
|
58
|
-
...props,
|
|
59
|
-
className: obj.class,
|
|
60
|
-
minWidth: setMinWidth(obj, propss)
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
header: (scope) => {
|
|
64
|
-
return h(
|
|
65
|
-
"span",
|
|
66
|
-
{
|
|
67
|
-
class: "fv-custom-checkbox",
|
|
68
|
-
onClick(event) {
|
|
69
|
-
emit("list-events", "checkbox-all", scope);
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
[
|
|
73
|
-
h(
|
|
74
|
-
Checkbox,
|
|
75
|
-
{
|
|
76
|
-
indeterminate: scope.indeterminate,
|
|
77
|
-
modelValue: scope.checked
|
|
78
|
-
},
|
|
79
|
-
obj.label
|
|
80
|
-
),
|
|
81
|
-
h("span", {
|
|
82
|
-
class: "fv-custom-checkbox-mask"
|
|
83
|
-
})
|
|
84
|
-
]
|
|
85
|
-
);
|
|
86
|
-
},
|
|
87
|
-
checkbox: (scope) => {
|
|
88
|
-
return h(
|
|
89
|
-
"span",
|
|
90
|
-
{
|
|
91
|
-
class: "fv-custom-checkbox " + (scope.disabled ? "is-disabled" : ""),
|
|
92
|
-
onClick(event) {
|
|
93
|
-
emit("list-events", "checkbox", scope);
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
[
|
|
97
|
-
h(Checkbox, {
|
|
98
|
-
indeterminate: scope.indeterminate,
|
|
99
|
-
modelValue: scope.checked,
|
|
100
|
-
disabled: scope.disabled
|
|
101
|
-
}),
|
|
102
|
-
h("span", {
|
|
103
|
-
class: "fv-custom-checkbox-mask"
|
|
104
|
-
})
|
|
105
|
-
]
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
12
|
const noProps = ["children", "class", "minWidth"];
|
|
113
13
|
function setProps(obj, props) {
|
|
114
14
|
const table = props.table;
|
|
@@ -124,13 +24,14 @@ function setProps(obj, props) {
|
|
|
124
24
|
const ckey = lineToSmallHump(key);
|
|
125
25
|
if (!noProps.includes(ckey)) {
|
|
126
26
|
if (obj[key] !== "") {
|
|
127
|
-
robj[key] = obj[key];
|
|
128
27
|
if (key == "label") {
|
|
129
28
|
robj["title"] = obj[key];
|
|
130
29
|
} else if (ckey == "showOverflowTooltip") {
|
|
131
30
|
if (obj[key]) {
|
|
132
31
|
robj["show-overflow"] = "tooltip";
|
|
133
32
|
}
|
|
33
|
+
} else if (key == "sortable") {
|
|
34
|
+
robj[key] = obj[key] ? true : void 0;
|
|
134
35
|
} else if (key == "prop") {
|
|
135
36
|
robj["field"] = obj[key];
|
|
136
37
|
} else if (key == "fixed") {
|
|
@@ -160,6 +61,8 @@ function setProps(obj, props) {
|
|
|
160
61
|
} else if (obj[key] == "index") {
|
|
161
62
|
robj[key] = "seq";
|
|
162
63
|
}
|
|
64
|
+
} else {
|
|
65
|
+
robj[key] = obj[key];
|
|
163
66
|
}
|
|
164
67
|
}
|
|
165
68
|
}
|
|
@@ -167,7 +70,7 @@ function setProps(obj, props) {
|
|
|
167
70
|
return robj;
|
|
168
71
|
}
|
|
169
72
|
function setSslot(obj, scope, emit, slots, props, index) {
|
|
170
|
-
const slot = useSetSlot(obj, scope.row, slots, index);
|
|
73
|
+
const slot = useSetSlot(obj, scope.row, slots, index, scope);
|
|
171
74
|
if (slot) {
|
|
172
75
|
return slot;
|
|
173
76
|
}
|
|
@@ -179,9 +82,10 @@ function setSslot(obj, scope, emit, slots, props, index) {
|
|
|
179
82
|
obj,
|
|
180
83
|
scope.row,
|
|
181
84
|
optionss,
|
|
182
|
-
|
|
85
|
+
useComponsGet(provides.compons),
|
|
183
86
|
emit,
|
|
184
|
-
index
|
|
87
|
+
index,
|
|
88
|
+
scope
|
|
185
89
|
);
|
|
186
90
|
if (column) {
|
|
187
91
|
return column;
|
|
@@ -230,7 +134,7 @@ function setHeader(obj, scope, slots, emit, props, index) {
|
|
|
230
134
|
scope.row,
|
|
231
135
|
slots,
|
|
232
136
|
optionss,
|
|
233
|
-
|
|
137
|
+
useComponsGet(provides.compons),
|
|
234
138
|
emit,
|
|
235
139
|
index
|
|
236
140
|
);
|
|
@@ -264,6 +168,106 @@ function getDom(obj, emit, propss, slots, index) {
|
|
|
264
168
|
function columnRender(obj, emit, props, slots, index) {
|
|
265
169
|
return getDom(obj, emit, props, slots, index);
|
|
266
170
|
}
|
|
171
|
+
function setBox(props, obj, emit, propss, slots, index) {
|
|
172
|
+
if (props.type == "radio") {
|
|
173
|
+
return h(
|
|
174
|
+
VxeColumn,
|
|
175
|
+
{
|
|
176
|
+
...props,
|
|
177
|
+
className: obj.class,
|
|
178
|
+
minWidth: setMinWidth(obj, propss)
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
radio: (scope) => {
|
|
182
|
+
return h(
|
|
183
|
+
"span",
|
|
184
|
+
{
|
|
185
|
+
class: "fv-custom-radio " + props.align + " " + (scope.disabled ? "is-disabled" : ""),
|
|
186
|
+
onClick(event) {
|
|
187
|
+
emit("list-events", "radio", scope);
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
[
|
|
191
|
+
h(
|
|
192
|
+
Radio,
|
|
193
|
+
{
|
|
194
|
+
modelValue: scope.checked,
|
|
195
|
+
value: true,
|
|
196
|
+
label: true,
|
|
197
|
+
disabled: scope.disabled
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
default() {
|
|
201
|
+
return "";
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
h("span", {
|
|
206
|
+
class: "fv-custom-radio-mask"
|
|
207
|
+
})
|
|
208
|
+
]
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
} else {
|
|
214
|
+
return h(
|
|
215
|
+
VxeColumn,
|
|
216
|
+
{
|
|
217
|
+
...props,
|
|
218
|
+
className: obj.class,
|
|
219
|
+
minWidth: setMinWidth(obj, propss)
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
header: (scope) => {
|
|
223
|
+
return h(
|
|
224
|
+
"span",
|
|
225
|
+
{
|
|
226
|
+
class: "fv-custom-checkbox",
|
|
227
|
+
onClick(event) {
|
|
228
|
+
emit("list-events", "checkbox-all", scope);
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
[
|
|
232
|
+
h(
|
|
233
|
+
Checkbox,
|
|
234
|
+
{
|
|
235
|
+
indeterminate: scope.indeterminate,
|
|
236
|
+
modelValue: scope.checked
|
|
237
|
+
},
|
|
238
|
+
obj.label
|
|
239
|
+
),
|
|
240
|
+
h("span", {
|
|
241
|
+
class: "fv-custom-checkbox-mask"
|
|
242
|
+
})
|
|
243
|
+
]
|
|
244
|
+
);
|
|
245
|
+
},
|
|
246
|
+
checkbox: (scope) => {
|
|
247
|
+
return h(
|
|
248
|
+
"span",
|
|
249
|
+
{
|
|
250
|
+
class: "fv-custom-checkbox " + (scope.disabled ? "is-disabled" : ""),
|
|
251
|
+
onClick(event) {
|
|
252
|
+
emit("list-events", "checkbox", scope);
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
[
|
|
256
|
+
h(Checkbox, {
|
|
257
|
+
indeterminate: scope.indeterminate,
|
|
258
|
+
modelValue: scope.checked,
|
|
259
|
+
disabled: scope.disabled
|
|
260
|
+
}),
|
|
261
|
+
h("span", {
|
|
262
|
+
class: "fv-custom-checkbox-mask"
|
|
263
|
+
})
|
|
264
|
+
]
|
|
265
|
+
);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
267
271
|
export {
|
|
268
272
|
columnRender,
|
|
269
273
|
setHeader,
|
|
@@ -11,12 +11,29 @@ const dataProps = {
|
|
|
11
11
|
return {};
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
+
/**
|
|
15
|
+
* @props { String, Number } height='auto' 高度
|
|
16
|
+
*/
|
|
14
17
|
height: {
|
|
15
18
|
type: [String, Number],
|
|
16
19
|
default() {
|
|
17
20
|
return "auto";
|
|
18
21
|
}
|
|
19
22
|
},
|
|
23
|
+
/**
|
|
24
|
+
* @props { String, Number } maxHeight
|
|
25
|
+
* 最大高度 设置了最大高度 height 值将无效化
|
|
26
|
+
*/
|
|
27
|
+
maxHeight: {
|
|
28
|
+
type: String
|
|
29
|
+
},
|
|
30
|
+
/**
|
|
31
|
+
* @props { String, Number } minHeight
|
|
32
|
+
* 最小高度
|
|
33
|
+
*/
|
|
34
|
+
minHeight: {
|
|
35
|
+
type: String
|
|
36
|
+
},
|
|
20
37
|
/**
|
|
21
38
|
* 加载中
|
|
22
39
|
*/
|
|
@@ -56,6 +73,9 @@ const dataProps = {
|
|
|
56
73
|
return [];
|
|
57
74
|
}
|
|
58
75
|
},
|
|
76
|
+
rowKey: {
|
|
77
|
+
type: String
|
|
78
|
+
},
|
|
59
79
|
/**
|
|
60
80
|
* 行高度
|
|
61
81
|
*/
|
|
@@ -77,6 +97,12 @@ const dataProps = {
|
|
|
77
97
|
return {};
|
|
78
98
|
}
|
|
79
99
|
},
|
|
100
|
+
/**
|
|
101
|
+
* @props { Boolean } isCompons 是否使用默认的配置
|
|
102
|
+
*/
|
|
103
|
+
isCompons: {
|
|
104
|
+
type: Boolean
|
|
105
|
+
},
|
|
80
106
|
/**
|
|
81
107
|
* @props { Object } compons 外部组件集合
|
|
82
108
|
*/
|
|
@@ -85,6 +111,22 @@ const dataProps = {
|
|
|
85
111
|
default() {
|
|
86
112
|
return {};
|
|
87
113
|
}
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* @props { String } interval='6px'
|
|
117
|
+
* 查询模式的上下间距
|
|
118
|
+
*/
|
|
119
|
+
interval: {
|
|
120
|
+
type: String,
|
|
121
|
+
default: "8px"
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* @props { String } intervalHorizon
|
|
125
|
+
* 查询模式的左右间距
|
|
126
|
+
*/
|
|
127
|
+
intervalHorizon: {
|
|
128
|
+
type: String,
|
|
129
|
+
default: "12px"
|
|
88
130
|
}
|
|
89
131
|
};
|
|
90
132
|
const dataEmits = [
|
|
@@ -93,6 +135,8 @@ const dataEmits = [
|
|
|
93
135
|
"scope-click",
|
|
94
136
|
"selection-list",
|
|
95
137
|
"list-events",
|
|
138
|
+
"row-click",
|
|
139
|
+
"cell-click",
|
|
96
140
|
"selection-change"
|
|
97
141
|
];
|
|
98
142
|
const dataExpose = {};
|