@fangzhongya/fang-ui 0.0.53 → 0.0.55
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/common/use.cjs +2 -0
- package/dist/components/common/use.js +2 -0
- package/dist/components/index.cjs +84 -80
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.js +5 -1
- package/dist/components/index.scss +3 -1
- package/dist/components/index2.scss +3 -1
- package/dist/components/list/index.cjs +9 -0
- package/dist/components/list/index.css +96 -0
- package/dist/components/list/index.d.ts +2 -0
- package/dist/components/list/index.js +9 -0
- package/dist/components/list/index.scss +110 -0
- package/dist/components/list/src/data.cjs +97 -0
- package/dist/components/list/src/data.d.ts +100 -0
- package/dist/components/list/src/data.js +97 -0
- package/dist/components/list/src/index.cjs +4 -0
- package/dist/components/list/src/index.js +4 -0
- package/dist/components/list/src/index2.cjs +337 -0
- package/dist/components/list/src/index2.js +337 -0
- package/dist/components/lists/index.cjs +2 -2
- package/dist/components/lists/index.css +27 -72
- package/dist/components/lists/index.scss +30 -98
- package/dist/components/lists/src/data.cjs +80 -49
- package/dist/components/lists/src/data.d.ts +103 -48
- package/dist/components/lists/src/data.js +81 -50
- package/dist/components/lists/src/index.cjs +2 -2
- package/dist/components/lists/src/index2.cjs +237 -303
- package/dist/components/lists/src/index2.js +237 -303
- package/dist/components/listsp/index.cjs +9 -0
- package/dist/components/listsp/index.css +86 -0
- package/dist/components/listsp/index.d.ts +2 -0
- package/dist/components/listsp/index.js +9 -0
- package/dist/components/listsp/index.scss +23 -0
- package/dist/components/listsp/src/data.d.ts +14 -0
- package/dist/components/listsp/src/index.cjs +4 -0
- package/dist/components/listsp/src/index.js +4 -0
- package/dist/components/listsp/src/index2.cjs +98 -0
- package/dist/components/listsp/src/index2.js +98 -0
- package/dist/components/listsp/style/index2.scss +4 -0
- package/dist/components/page/index.css +35 -38
- package/dist/components/page/index.scss +1 -1
- package/dist/components/page/src/index2.cjs +2 -2
- package/dist/components/page/src/index2.js +2 -2
- package/dist/components/page/style/index2.scss +1 -1
- package/dist/components/scss/function.scss +1 -1
- package/dist/components/tables/common/pagin.cjs +23 -7
- package/dist/components/tables/common/pagin.d.ts +8 -1
- package/dist/components/tables/common/pagin.js +23 -7
- package/dist/components/tables/index.css +1 -4
- package/dist/components/tables/index.scss +1 -4
- package/dist/components/tablesp/index.css +1 -4
- package/dist/css/index.css +100 -46
- package/dist/css/list.css +96 -0
- package/dist/css/lists.css +27 -72
- package/dist/css/listsp.css +86 -0
- package/dist/css/page.css +35 -38
- package/dist/css/tables.css +1 -4
- package/dist/css/tablesp.css +1 -4
- package/dist/directives/scroll/index.cjs +36 -11
- package/dist/directives/scroll/index.js +36 -11
- package/dist/expand/{chunk-LSKJOV4K.cjs → chunk-S7R2FI5L.cjs} +6 -2
- package/dist/expand/{chunk-ZS2GF6MH.js → chunk-VCOMWNQB.js} +6 -2
- 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/icons/index.css +32 -32
- package/dist/icons/index.json +10 -10
- package/dist/index.cjs +102 -98
- package/dist/index.css +100 -46
- package/dist/index.js +5 -1
- package/dist/type.d.ts +7 -0
- package/package.json +4 -4
- /package/dist/components/{forms-item → forms-items}/index.css +0 -0
- /package/dist/components/{cascader-panel → keep-com}/index.css +0 -0
- /package/dist/components/{lists → list}/src/setup.d.ts +0 -0
- /package/dist/components/{lists → list}/src/util.cjs +0 -0
- /package/dist/components/{lists → list}/src/util.d.ts +0 -0
- /package/dist/components/{lists → list}/src/util.js +0 -0
- /package/dist/components/{lists → tables}/common/img.cjs +0 -0
- /package/dist/components/{lists → tables}/common/img.js +0 -0
- /package/dist/components/{lists → tables}/common/img2.cjs +0 -0
- /package/dist/components/{lists → tables}/common/img2.js +0 -0
- /package/dist/css/{forms-item.css → forms-items.css} +0 -0
- /package/dist/css/{cascader-panel.css → keep-com.css} +0 -0
|
@@ -1,335 +1,269 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { ElLoadingDirective } from "element-plus/es";
|
|
2
|
+
import "element-plus/es/components/base/style/css";
|
|
3
|
+
import "element-plus/es/components/loading/style/css";
|
|
4
|
+
import { defineComponent, useSlots, useAttrs, ref, watch, createElementBlock, openBlock, mergeProps, unref, withDirectives, normalizeStyle, normalizeClass, renderSlot, Fragment, renderList, createVNode, createSlots, withCtx, createElementVNode } from "vue";
|
|
5
|
+
import { dataExpose, dataSlot, dataEmits, dataProps } from "./data.js";
|
|
6
|
+
import { ElCard } from "element-plus/es/components/card/index";
|
|
6
7
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import "
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const _sfc_main = defineComponent({
|
|
14
|
-
|
|
15
|
-
components: Components,
|
|
16
|
-
expose: dataExpose,
|
|
8
|
+
import { useLocale } from "../../../hooks/locale/index.js";
|
|
9
|
+
import { useInherit } from "../../../hooks/inherit/index.js";
|
|
10
|
+
import { List } from "../../list/index.js";
|
|
11
|
+
import "../../../utils/css.js";
|
|
12
|
+
import { setObjStyle } from "@fangzhongya/utils/css/setObjStyle";
|
|
13
|
+
const _hoisted_1 = ["onClick"];
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
|
+
__name: "index",
|
|
17
16
|
props: dataProps,
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
emits: dataEmits,
|
|
18
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
19
|
+
const slots = useSlots();
|
|
20
|
+
const attrs = useInherit(useAttrs());
|
|
21
|
+
const { getLocale } = useLocale();
|
|
20
22
|
const cs = useCssName("lists");
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return true;
|
|
23
|
+
const props = __props;
|
|
24
|
+
const emit = __emit;
|
|
25
|
+
const header = ref([]);
|
|
26
|
+
const footer = ref([]);
|
|
27
|
+
const dataList = ref([]);
|
|
28
|
+
const setList = () => {
|
|
29
|
+
const list = props.list || [];
|
|
30
|
+
list.forEach((obj) => {
|
|
31
|
+
const fixed = obj.fixed;
|
|
32
|
+
if (fixed) {
|
|
33
|
+
if (typeof fixed === "boolean") {
|
|
34
|
+
header.value.push({ ...obj });
|
|
35
|
+
} else if (fixed == "right") {
|
|
36
|
+
footer.value.push({ ...obj });
|
|
36
37
|
} else {
|
|
37
|
-
|
|
38
|
+
header.value.push({ ...obj });
|
|
38
39
|
}
|
|
39
40
|
} else {
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
} else {
|
|
43
|
-
return true;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
const getLists = (arrs, listobj) => {
|
|
47
|
-
let arr = [], trs = [], lin = 0;
|
|
48
|
-
arrs.forEach((obj, index) => {
|
|
49
|
-
if (listobj) {
|
|
50
|
-
obj.father = obj.father ?? listobj;
|
|
51
|
-
}
|
|
52
|
-
if (!useHide(obj, props.value)) {
|
|
53
|
-
let is = false;
|
|
54
|
-
if (obj.whole) {
|
|
55
|
-
lin = props.column;
|
|
56
|
-
is = true;
|
|
57
|
-
} else {
|
|
58
|
-
let k = (obj.column || 1) + lin;
|
|
59
|
-
if (k > props.column) {
|
|
60
|
-
lin = obj.column || 1;
|
|
61
|
-
is = true;
|
|
62
|
-
} else {
|
|
63
|
-
lin = k;
|
|
64
|
-
is = false;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
if (is) {
|
|
68
|
-
arr.push(h("tr", {}, trs));
|
|
69
|
-
trs = [];
|
|
70
|
-
}
|
|
71
|
-
trs.push(...getTd(obj, index));
|
|
72
|
-
if (lin >= props.column) {
|
|
73
|
-
arr.push(h("tr", {}, trs));
|
|
74
|
-
trs = [];
|
|
75
|
-
lin = 0;
|
|
76
|
-
}
|
|
41
|
+
dataList.value.push({ ...obj });
|
|
77
42
|
}
|
|
78
43
|
});
|
|
79
|
-
if (trs.length > 0) {
|
|
80
|
-
arr.push(h("tr", {}, trs));
|
|
81
|
-
}
|
|
82
|
-
return arr;
|
|
83
44
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
45
|
+
watch(
|
|
46
|
+
[() => props.list, () => {
|
|
47
|
+
var _a;
|
|
48
|
+
return (_a = props.list) == null ? void 0 : _a.length;
|
|
49
|
+
}],
|
|
50
|
+
() => {
|
|
51
|
+
setList();
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
immediate: true,
|
|
55
|
+
deep: true
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
const setListValue = (list, index) => {
|
|
59
|
+
const arr = [];
|
|
60
|
+
for (let i = 0; i < list.length; i++) {
|
|
61
|
+
const obj = list[i];
|
|
62
|
+
if (obj.type == "index") {
|
|
63
|
+
let value = "";
|
|
64
|
+
const paginat = attrs.assem.paginat;
|
|
65
|
+
if (obj.index) {
|
|
66
|
+
value = obj.index(index, paginat);
|
|
95
67
|
} else {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
lin = obj.column || 1;
|
|
99
|
-
is = true;
|
|
68
|
+
if (paginat && paginat.current && paginat.pageSize) {
|
|
69
|
+
value = (paginat.current - 1) * paginat.pageSize + index + 1;
|
|
100
70
|
} else {
|
|
101
|
-
|
|
102
|
-
is = false;
|
|
71
|
+
value = index + 1;
|
|
103
72
|
}
|
|
104
73
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
arr.push(h("tr", {}, trvs));
|
|
109
|
-
trvs = [];
|
|
110
|
-
}
|
|
111
|
-
if (obj.isdiv) {
|
|
112
|
-
trls.push(getValue(obj, index, true));
|
|
113
|
-
} else {
|
|
114
|
-
trls.push(getlabel(obj, index));
|
|
115
|
-
trvs.push(getValue(obj, index));
|
|
116
|
-
}
|
|
117
|
-
if (lin >= props.column) {
|
|
118
|
-
arr.push(h("tr", {}, trls));
|
|
119
|
-
arr.push(h("tr", {}, trvs));
|
|
120
|
-
trls = [];
|
|
121
|
-
trvs = [];
|
|
122
|
-
lin = 0;
|
|
123
|
-
}
|
|
74
|
+
arr.push({ ...obj, value });
|
|
75
|
+
} else {
|
|
76
|
+
arr.push({ ...obj });
|
|
124
77
|
}
|
|
125
|
-
});
|
|
126
|
-
if (trls.length > 0) {
|
|
127
|
-
arr.push(h("tr", {}, trls));
|
|
128
|
-
arr.push(h("tr", {}, trvs));
|
|
129
78
|
}
|
|
130
79
|
return arr;
|
|
131
80
|
};
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
obj.class ?? ""
|
|
143
|
-
].join(" "),
|
|
144
|
-
colspan: props.labelPosition == "top" ? setColspan(obj) : void 0,
|
|
145
|
-
onClick: (event) => {
|
|
146
|
-
isfocus.value = true;
|
|
147
|
-
rowObj.value = obj;
|
|
148
|
-
event.stopPropagation();
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
[
|
|
153
|
-
h(
|
|
154
|
-
"span",
|
|
155
|
-
{
|
|
156
|
-
class: cs.z("table-label")
|
|
157
|
-
},
|
|
158
|
-
[
|
|
159
|
-
setLabel(
|
|
160
|
-
obj,
|
|
161
|
-
props,
|
|
162
|
-
compons,
|
|
163
|
-
emit,
|
|
164
|
-
slots,
|
|
165
|
-
isComponSelected,
|
|
166
|
-
index
|
|
167
|
-
)
|
|
168
|
-
]
|
|
169
|
-
)
|
|
170
|
-
]
|
|
171
|
-
);
|
|
172
|
-
};
|
|
173
|
-
const getChildrenValue = (obj, index) => {
|
|
174
|
-
if (obj.children) {
|
|
175
|
-
return [
|
|
176
|
-
h(
|
|
177
|
-
"div",
|
|
178
|
-
{
|
|
179
|
-
class: cs.z("table-children")
|
|
180
|
-
},
|
|
181
|
-
[
|
|
182
|
-
props.labelPosition == "top" ? getListTops(obj.children, obj) : getLists(obj.children, obj)
|
|
183
|
-
]
|
|
184
|
-
)
|
|
185
|
-
];
|
|
81
|
+
const rows = ref();
|
|
82
|
+
const onClick = (item, index) => {
|
|
83
|
+
if (attrs.assem.ischecked) {
|
|
84
|
+
const i = selections.value.indexOf(item);
|
|
85
|
+
if (i != -1) {
|
|
86
|
+
selections.value.splice(i, 1);
|
|
87
|
+
} else {
|
|
88
|
+
selections.value.push(item);
|
|
89
|
+
}
|
|
90
|
+
emit("selection-change", selections.value);
|
|
186
91
|
} else {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
"span",
|
|
190
|
-
{
|
|
191
|
-
class: cs.z("table-value")
|
|
192
|
-
},
|
|
193
|
-
[
|
|
194
|
-
setSslot(
|
|
195
|
-
obj,
|
|
196
|
-
props.value,
|
|
197
|
-
props,
|
|
198
|
-
compons,
|
|
199
|
-
emit,
|
|
200
|
-
slots,
|
|
201
|
-
isComponSelected,
|
|
202
|
-
index
|
|
203
|
-
)
|
|
204
|
-
]
|
|
205
|
-
)
|
|
206
|
-
];
|
|
92
|
+
rows.value = item;
|
|
93
|
+
emit("row-click", item, index);
|
|
207
94
|
}
|
|
208
95
|
};
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
class: [
|
|
215
|
-
cs.z("table-td"),
|
|
216
|
-
cs.is("whole", obj.whole),
|
|
217
|
-
obj.class ?? ""
|
|
218
|
-
].join(" "),
|
|
219
|
-
colspan: setColspan(obj),
|
|
220
|
-
rowspan: isRow ? 2 : void 0,
|
|
221
|
-
onClick: (event) => {
|
|
222
|
-
isfocus.value = true;
|
|
223
|
-
rowObj.value = obj;
|
|
224
|
-
event.stopPropagation();
|
|
225
|
-
return false;
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
[...getChildrenValue(obj, index)]
|
|
229
|
-
);
|
|
230
|
-
};
|
|
231
|
-
const getTd = (obj, index) => {
|
|
232
|
-
const arr = [getValue(obj, index)];
|
|
233
|
-
if (!obj.isdiv) {
|
|
234
|
-
arr.unshift(getlabel(obj, index));
|
|
235
|
-
}
|
|
236
|
-
if (props.labelPosition == "auto") {
|
|
237
|
-
return [
|
|
238
|
-
h(
|
|
239
|
-
"td",
|
|
240
|
-
{
|
|
241
|
-
colspan: setColspan(obj),
|
|
242
|
-
class: cs.is("whole", obj.whole)
|
|
243
|
-
},
|
|
244
|
-
[
|
|
245
|
-
h(
|
|
246
|
-
"div",
|
|
247
|
-
{
|
|
248
|
-
class: cs.z("table-auto")
|
|
249
|
-
},
|
|
250
|
-
arr
|
|
251
|
-
)
|
|
252
|
-
]
|
|
253
|
-
)
|
|
254
|
-
];
|
|
96
|
+
function setStyles(v) {
|
|
97
|
+
const style = v.style || {};
|
|
98
|
+
let vst;
|
|
99
|
+
if (typeof style === "function") {
|
|
100
|
+
vst = style(v, props) || {};
|
|
255
101
|
} else {
|
|
256
|
-
|
|
102
|
+
vst = style;
|
|
257
103
|
}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
} else if (obj.column) {
|
|
264
|
-
return obj.column;
|
|
265
|
-
} else {
|
|
266
|
-
return "";
|
|
267
|
-
}
|
|
104
|
+
const obj = {};
|
|
105
|
+
const minWidth = v.minWidth ?? props.rowMinWidth;
|
|
106
|
+
const width = v.width ?? props.rowWidth;
|
|
107
|
+
if (width) {
|
|
108
|
+
obj.width = width;
|
|
268
109
|
} else {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
return (props.column - 1) * 2 + 1 + j;
|
|
272
|
-
} else if (obj.column) {
|
|
273
|
-
return (obj.column - 1) * 2 + 1 + j;
|
|
274
|
-
} else {
|
|
275
|
-
return 1 + j;
|
|
110
|
+
if (props.rowColumn > 1) {
|
|
111
|
+
obj.width = "calc(" + Number((100 / props.rowColumn).toFixed(2)) + "% - " + props.interval + " * 2)";
|
|
276
112
|
}
|
|
277
113
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
if (props.list && props.list.length > 0) {
|
|
281
|
-
return h(
|
|
282
|
-
"div",
|
|
283
|
-
{
|
|
284
|
-
class: cs.z("div"),
|
|
285
|
-
style: cs.vdo({
|
|
286
|
-
borderColor: borderColor.value
|
|
287
|
-
})
|
|
288
|
-
// onClick(event: Event) {
|
|
289
|
-
// isfocus.value = true;
|
|
290
|
-
// event.stopPropagation();
|
|
291
|
-
// return false;
|
|
292
|
-
// },
|
|
293
|
-
},
|
|
294
|
-
[
|
|
295
|
-
h(
|
|
296
|
-
"table",
|
|
297
|
-
{
|
|
298
|
-
class: [
|
|
299
|
-
cs.z("table"),
|
|
300
|
-
props.labelPosition ?? "",
|
|
301
|
-
cs.is(
|
|
302
|
-
"border",
|
|
303
|
-
props.border ? true : false
|
|
304
|
-
),
|
|
305
|
-
cs.is("aliquots", props.aliquots)
|
|
306
|
-
].join(" "),
|
|
307
|
-
cellspacing: "0",
|
|
308
|
-
cellpadding: "0",
|
|
309
|
-
border: "0"
|
|
310
|
-
},
|
|
311
|
-
props.labelPosition == "top" ? getListTops(props.list) : getLists(props.list)
|
|
312
|
-
)
|
|
313
|
-
]
|
|
314
|
-
);
|
|
315
|
-
} else {
|
|
316
|
-
return "";
|
|
114
|
+
if (minWidth) {
|
|
115
|
+
obj.minWidth = minWidth;
|
|
317
116
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
117
|
+
if (v.whole) {
|
|
118
|
+
obj.display = "block";
|
|
119
|
+
obj.width = "100%";
|
|
120
|
+
}
|
|
121
|
+
return setObjStyle(vst, obj);
|
|
122
|
+
}
|
|
123
|
+
const selections = ref([]);
|
|
124
|
+
function toggleRowSelection(item, is) {
|
|
125
|
+
if (is) {
|
|
126
|
+
selections.value.push(item);
|
|
127
|
+
} else {
|
|
128
|
+
const i = selections.value.indexOf(item);
|
|
129
|
+
if (i != -1) {
|
|
130
|
+
selections.value.splice(i, 1);
|
|
131
|
+
}
|
|
324
132
|
}
|
|
133
|
+
}
|
|
134
|
+
function clearSelection() {
|
|
135
|
+
selections.value = [];
|
|
136
|
+
}
|
|
137
|
+
function getSelections() {
|
|
138
|
+
return selections.value;
|
|
139
|
+
}
|
|
140
|
+
__expose({
|
|
141
|
+
...dataExpose,
|
|
142
|
+
clearSelection,
|
|
143
|
+
getSelections,
|
|
144
|
+
toggleRowSelection
|
|
325
145
|
});
|
|
326
|
-
return {
|
|
327
|
-
|
|
328
|
-
|
|
146
|
+
return (_ctx, _cache) => {
|
|
147
|
+
const _directive_loading = ElLoadingDirective;
|
|
148
|
+
return openBlock(), createElementBlock("div", mergeProps({
|
|
149
|
+
class: unref(cs).z(),
|
|
150
|
+
style: unref(cs).vdo({
|
|
151
|
+
interval: props.interval
|
|
152
|
+
})
|
|
153
|
+
}, unref(attrs).root), [
|
|
154
|
+
withDirectives((openBlock(), createElementBlock("div", {
|
|
155
|
+
class: normalizeClass([
|
|
156
|
+
unref(cs).z("list"),
|
|
157
|
+
unref(cs).is("absolute", props.adaptive),
|
|
158
|
+
unref(cs).zis("list", "column", props.rowColumn > 1)
|
|
159
|
+
]),
|
|
160
|
+
style: normalizeStyle({
|
|
161
|
+
height: props.height
|
|
162
|
+
})
|
|
163
|
+
}, [
|
|
164
|
+
props.value && props.value.length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.value, (item, index) => {
|
|
165
|
+
return openBlock(), createElementBlock("div", {
|
|
166
|
+
class: normalizeClass([
|
|
167
|
+
unref(cs).z("list-item"),
|
|
168
|
+
unref(cs).is("active", rows.value === item),
|
|
169
|
+
unref(cs).is("selected", selections.value.includes(item))
|
|
170
|
+
]),
|
|
171
|
+
style: normalizeStyle(setStyles(item)),
|
|
172
|
+
onClick: ($event) => onClick(item, index)
|
|
173
|
+
}, [
|
|
174
|
+
renderSlot(_ctx.$slots, unref(dataSlot).default, {
|
|
175
|
+
config: unref(attrs).assem,
|
|
176
|
+
value: item,
|
|
177
|
+
index,
|
|
178
|
+
list: props.list,
|
|
179
|
+
active: rows.value === item,
|
|
180
|
+
selected: selections.value.includes(item),
|
|
181
|
+
options: props.options,
|
|
182
|
+
compons: props.compons
|
|
183
|
+
}, () => [
|
|
184
|
+
createVNode(unref(ElCard), null, createSlots({
|
|
185
|
+
default: withCtx(() => [
|
|
186
|
+
createVNode(unref(List), mergeProps({ ref_for: true }, unref(attrs).assem, {
|
|
187
|
+
value: item,
|
|
188
|
+
list: setListValue(dataList.value, index),
|
|
189
|
+
options: props.options,
|
|
190
|
+
compons: props.compons
|
|
191
|
+
}), createSlots({ _: 2 }, [
|
|
192
|
+
renderList(Object.keys(unref(slots)).filter(
|
|
193
|
+
(v) => !["no-data"].includes(v)
|
|
194
|
+
), (k) => {
|
|
195
|
+
return {
|
|
196
|
+
name: k,
|
|
197
|
+
fn: withCtx((scope) => [
|
|
198
|
+
renderSlot(_ctx.$slots, k, mergeProps({ ref_for: true }, scope))
|
|
199
|
+
])
|
|
200
|
+
};
|
|
201
|
+
})
|
|
202
|
+
]), 1040, ["value", "list", "options", "compons"])
|
|
203
|
+
]),
|
|
204
|
+
_: 2
|
|
205
|
+
}, [
|
|
206
|
+
header.value.length > 0 ? {
|
|
207
|
+
name: "header",
|
|
208
|
+
fn: withCtx(() => [
|
|
209
|
+
createVNode(unref(List), mergeProps({ ref_for: true }, unref(attrs).assem, {
|
|
210
|
+
value: item,
|
|
211
|
+
list: setListValue(header.value, index),
|
|
212
|
+
options: props.options,
|
|
213
|
+
compons: props.compons
|
|
214
|
+
}), createSlots({ _: 2 }, [
|
|
215
|
+
renderList(Object.keys(unref(slots)).filter(
|
|
216
|
+
(v) => !["no-data"].includes(v)
|
|
217
|
+
), (k) => {
|
|
218
|
+
return {
|
|
219
|
+
name: k,
|
|
220
|
+
fn: withCtx((scope) => [
|
|
221
|
+
renderSlot(_ctx.$slots, k, mergeProps({ ref_for: true }, scope))
|
|
222
|
+
])
|
|
223
|
+
};
|
|
224
|
+
})
|
|
225
|
+
]), 1040, ["value", "list", "options", "compons"])
|
|
226
|
+
]),
|
|
227
|
+
key: "0"
|
|
228
|
+
} : void 0,
|
|
229
|
+
footer.value.length > 0 ? {
|
|
230
|
+
name: "footer",
|
|
231
|
+
fn: withCtx(() => [
|
|
232
|
+
createVNode(unref(List), mergeProps({ ref_for: true }, unref(attrs).assem, {
|
|
233
|
+
value: item,
|
|
234
|
+
list: setListValue(footer.value, index),
|
|
235
|
+
options: props.options,
|
|
236
|
+
compons: props.compons
|
|
237
|
+
}), createSlots({ _: 2 }, [
|
|
238
|
+
renderList(Object.keys(unref(slots)).filter(
|
|
239
|
+
(v) => !["no-data"].includes(v)
|
|
240
|
+
), (k) => {
|
|
241
|
+
return {
|
|
242
|
+
name: k,
|
|
243
|
+
fn: withCtx((scope) => [
|
|
244
|
+
renderSlot(_ctx.$slots, k, mergeProps({ ref_for: true }, scope))
|
|
245
|
+
])
|
|
246
|
+
};
|
|
247
|
+
})
|
|
248
|
+
]), 1040, ["value", "list", "options", "compons"])
|
|
249
|
+
]),
|
|
250
|
+
key: "1"
|
|
251
|
+
} : void 0
|
|
252
|
+
]), 1024)
|
|
253
|
+
])
|
|
254
|
+
], 14, _hoisted_1);
|
|
255
|
+
}), 256)) : renderSlot(_ctx.$slots, unref(dataSlot).noData, { key: 1 }, () => [
|
|
256
|
+
createElementVNode("div", {
|
|
257
|
+
class: normalizeClass(unref(cs).z("no-data"))
|
|
258
|
+
}, _cache[0] || (_cache[0] = [
|
|
259
|
+
createElementVNode("span", null, "暂无数据", -1)
|
|
260
|
+
]), 2)
|
|
261
|
+
])
|
|
262
|
+
], 6)), [
|
|
263
|
+
[_directive_loading, props.loading]
|
|
264
|
+
])
|
|
265
|
+
], 16);
|
|
329
266
|
};
|
|
330
|
-
},
|
|
331
|
-
render(props) {
|
|
332
|
-
return props.renderValue();
|
|
333
267
|
}
|
|
334
268
|
});
|
|
335
269
|
export {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
const withInstall = require("../../utils/vues/withInstall.cjs");
|
|
5
|
+
require("./src/index.cjs");
|
|
6
|
+
const index_vue_vue_type_script_setup_true_lang = require("./src/index2.cjs");
|
|
7
|
+
const Listsp = withInstall.withInstall(index_vue_vue_type_script_setup_true_lang.default, "Listsp");
|
|
8
|
+
exports.Listsp = Listsp;
|
|
9
|
+
exports.default = Listsp;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--on: rgb(91, 189, 246);
|
|
3
|
+
--color-primary: #409eff;
|
|
4
|
+
--bag-primary: #409eff;
|
|
5
|
+
--bag-primary-text: #fff;
|
|
6
|
+
--border: #eee;
|
|
7
|
+
--layout-panel-gap: 10px;
|
|
8
|
+
--layout-panel-padding: 20px;
|
|
9
|
+
--layout-form-item-padding-right: var(
|
|
10
|
+
--layout-panel-gap
|
|
11
|
+
);
|
|
12
|
+
--g-main-bg: var(--bg-color-page);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.lists {
|
|
16
|
+
width: 100%;
|
|
17
|
+
min-height: 100px;
|
|
18
|
+
position: relative;
|
|
19
|
+
flex: 1;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
background-color: #eee;
|
|
23
|
+
}
|
|
24
|
+
.lists-list {
|
|
25
|
+
padding: 0 var(--lists-interval);
|
|
26
|
+
}
|
|
27
|
+
.lists-list.is-absolute {
|
|
28
|
+
position: absolute;
|
|
29
|
+
inset: 0;
|
|
30
|
+
overflow-y: auto;
|
|
31
|
+
}
|
|
32
|
+
.lists-list--column .lists-list-item {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
}
|
|
35
|
+
.lists-list-item {
|
|
36
|
+
background-color: #fff;
|
|
37
|
+
margin: 0 var(--lists-interval);
|
|
38
|
+
margin-top: calc(var(--lists-interval) * 2);
|
|
39
|
+
}
|
|
40
|
+
.lists-list-item:last-child {
|
|
41
|
+
margin-bottom: calc(var(--lists-interval) * 2);
|
|
42
|
+
}
|
|
43
|
+
.lists-list-item.is-active {
|
|
44
|
+
background-color: rgb(250, 235, 215);
|
|
45
|
+
}
|
|
46
|
+
.lists-list-item.is-selected {
|
|
47
|
+
background-color: rgb(215, 250, 224);
|
|
48
|
+
}
|
|
49
|
+
.lists-list-item .el-card {
|
|
50
|
+
background-color: transparent;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.paging {
|
|
54
|
+
padding: 10px;
|
|
55
|
+
}
|
|
56
|
+
.paging-slot {
|
|
57
|
+
padding-left: 10px;
|
|
58
|
+
font-size: 14px;
|
|
59
|
+
font-weight: 400;
|
|
60
|
+
color: #9b9b9b;
|
|
61
|
+
white-space: pre-wrap;
|
|
62
|
+
}
|
|
63
|
+
.paging .el-pagination__total {
|
|
64
|
+
font-size: 14px;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
color: #9b9b9b;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.listsp {
|
|
70
|
+
width: 100%;
|
|
71
|
+
height: var(--listsp-height);
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
}
|
|
75
|
+
.listsp-main {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
flex: 1;
|
|
79
|
+
width: 100%;
|
|
80
|
+
}
|
|
81
|
+
.listsp-paginat {
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
}
|
|
84
|
+
.listsp-paginat .el-pagination {
|
|
85
|
+
justify-content: flex-end;
|
|
86
|
+
}
|