@fangzhongya/fang-ui 0.0.56 → 0.0.57
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/index.scss +2 -2
- package/dist/components/index2.scss +2 -2
- package/dist/components/lists/index.css +3 -3
- package/dist/components/lists/index.scss +3 -3
- package/dist/components/lists/src/index2.cjs +1 -1
- package/dist/components/lists/src/index2.js +1 -1
- package/dist/components/listsp/index.css +8 -3
- package/dist/components/listsp/index.scss +7 -0
- package/dist/components/listsp/src/index2.cjs +9 -9
- package/dist/components/listsp/src/index2.js +9 -9
- package/dist/components/page/index.css +6 -0
- package/dist/components/tables/common/pagin.cjs +19 -4
- package/dist/components/tables/common/pagin.d.ts +6 -1
- package/dist/components/tables/common/pagin.js +19 -4
- package/dist/components/tables/src/column.cjs +2 -1
- package/dist/components/tables/src/column.js +2 -1
- package/dist/components/tablesp/index.css +6 -0
- package/dist/components/tablesp/index.scss +8 -0
- package/dist/components/tablesp/src/index2.cjs +15 -6
- package/dist/components/tablesp/src/index2.js +15 -6
- package/dist/components/tablesv/src/column.cjs +2 -1
- package/dist/components/tablesv/src/column.js +2 -1
- package/dist/css/index.css +14 -25
- package/dist/css/lists.css +3 -3
- package/dist/css/listsp.css +8 -3
- package/dist/css/page.css +6 -0
- package/dist/css/tablesp.css +6 -0
- package/dist/directives/scroll/index.cjs +59 -12
- package/dist/directives/scroll/index.js +59 -12
- package/dist/hooks/cssname/index.cjs +16 -0
- package/dist/hooks/cssname/index.d.ts +2 -0
- package/dist/hooks/cssname/index.js +16 -0
- package/dist/icons/index.css +19 -19
- package/dist/icons/index.json +7 -7
- package/dist/index.css +14 -25
- package/package.json +5 -5
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
@use './inputs/index.scss' as *;
|
|
77
77
|
@use './selects/index.scss' as *;
|
|
78
78
|
@use './switchs/index.scss' as *;
|
|
79
|
+
@use './text/index.scss' as *;
|
|
79
80
|
@use './list/index.scss' as *;
|
|
80
81
|
@use './lists/index.scss' as *;
|
|
81
82
|
@use './listsp/index.scss' as *;
|
|
@@ -83,5 +84,4 @@
|
|
|
83
84
|
@use './tables/index.scss' as *;
|
|
84
85
|
@use './tablesp/index.scss' as *;
|
|
85
86
|
@use './tabless/index.scss' as *;
|
|
86
|
-
@use './tablesv/index.scss' as *;
|
|
87
|
-
@use './tablesvp/index.scss' as *;
|
|
87
|
+
@use './tablesv/index.scss' as *;
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
@use './inputs/style/index2.scss' as *;
|
|
77
77
|
@use './selects/style/index2.scss' as *;
|
|
78
78
|
@use './switchs/style/index2.scss' as *;
|
|
79
|
+
@use './text/style/index.scss' as *;
|
|
79
80
|
@use './list/style/index.scss' as *;
|
|
80
81
|
@use './lists/style/index.scss' as *;
|
|
81
82
|
@use './listsp/style/index2.scss' as *;
|
|
@@ -83,5 +84,4 @@
|
|
|
83
84
|
@use './tables/style/index2.scss' as *;
|
|
84
85
|
@use './tablesp/style/index2.scss' as *;
|
|
85
86
|
@use './tabless/style/index2.scss' as *;
|
|
86
|
-
@use './tablesv/style/index2.scss' as *;
|
|
87
|
-
@use './tablesvp/style/index2.scss' as *;
|
|
87
|
+
@use './tablesv/style/index2.scss' as *;
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
.lists-list-item {
|
|
36
36
|
background-color: #fff;
|
|
37
37
|
margin: 0 var(--lists-interval);
|
|
38
|
-
margin-top: calc(var(--lists-interval) * 2);
|
|
39
|
-
}
|
|
40
|
-
.lists-list-item:last-child {
|
|
41
38
|
margin-bottom: calc(var(--lists-interval) * 2);
|
|
42
39
|
}
|
|
40
|
+
.lists-list-item:first-child {
|
|
41
|
+
margin-top: calc(var(--lists-interval) * 2);
|
|
42
|
+
}
|
|
43
43
|
.lists-list-item.is-active {
|
|
44
44
|
background-color: rgb(250, 235, 215);
|
|
45
45
|
}
|
|
@@ -22,12 +22,12 @@ $lists: 'lists';
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
&-item {
|
|
25
|
-
&:
|
|
26
|
-
margin-
|
|
25
|
+
&:first-child {
|
|
26
|
+
margin-top: calc(var(vdm('interval', $lists)) * 2);
|
|
27
27
|
}
|
|
28
28
|
background-color: #fff;
|
|
29
29
|
margin: 0 var(vdm('interval', $lists));
|
|
30
|
-
margin-
|
|
30
|
+
margin-bottom: calc(var(vdm('interval', $lists)) * 2);
|
|
31
31
|
&.#{is('active')} {
|
|
32
32
|
background-color: rgb(250, 235, 215);
|
|
33
33
|
}
|
|
@@ -67,7 +67,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
67
67
|
if (obj.index) {
|
|
68
68
|
value = obj.index(index2, paginat);
|
|
69
69
|
} else {
|
|
70
|
-
if (paginat && paginat.current && paginat.pageSize) {
|
|
70
|
+
if ((paginat == null ? void 0 : paginat.is) && !paginat.scroll && paginat.current && paginat.pageSize) {
|
|
71
71
|
value = (paginat.current - 1) * paginat.pageSize + index2 + 1;
|
|
72
72
|
} else {
|
|
73
73
|
value = index2 + 1;
|
|
@@ -65,7 +65,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
65
65
|
if (obj.index) {
|
|
66
66
|
value = obj.index(index, paginat);
|
|
67
67
|
} else {
|
|
68
|
-
if (paginat && paginat.current && paginat.pageSize) {
|
|
68
|
+
if ((paginat == null ? void 0 : paginat.is) && !paginat.scroll && paginat.current && paginat.pageSize) {
|
|
69
69
|
value = (paginat.current - 1) * paginat.pageSize + index + 1;
|
|
70
70
|
} else {
|
|
71
71
|
value = index + 1;
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
.lists-list-item {
|
|
36
36
|
background-color: #fff;
|
|
37
37
|
margin: 0 var(--lists-interval);
|
|
38
|
-
margin-top: calc(var(--lists-interval) * 2);
|
|
39
|
-
}
|
|
40
|
-
.lists-list-item:last-child {
|
|
41
38
|
margin-bottom: calc(var(--lists-interval) * 2);
|
|
42
39
|
}
|
|
40
|
+
.lists-list-item:first-child {
|
|
41
|
+
margin-top: calc(var(--lists-interval) * 2);
|
|
42
|
+
}
|
|
43
43
|
.lists-list-item.is-active {
|
|
44
44
|
background-color: rgb(250, 235, 215);
|
|
45
45
|
}
|
|
@@ -78,6 +78,11 @@
|
|
|
78
78
|
flex: 1;
|
|
79
79
|
width: 100%;
|
|
80
80
|
}
|
|
81
|
+
.listsp-main.is-scroll .v-scroll-add {
|
|
82
|
+
text-align: center;
|
|
83
|
+
padding: 10px;
|
|
84
|
+
color: #999;
|
|
85
|
+
}
|
|
81
86
|
.listsp-paginat {
|
|
82
87
|
overflow: hidden;
|
|
83
88
|
}
|
|
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
loading,
|
|
26
26
|
tableList,
|
|
27
27
|
tableConfig,
|
|
28
|
-
|
|
28
|
+
scroll,
|
|
29
29
|
onSortChange,
|
|
30
30
|
onListEvents,
|
|
31
31
|
onSelect,
|
|
@@ -55,12 +55,16 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
55
55
|
height: vue.unref(height),
|
|
56
56
|
ref_key: "refTable",
|
|
57
57
|
ref: refTable,
|
|
58
|
-
class: [
|
|
58
|
+
class: [
|
|
59
|
+
vue.unref(cs).z("main"),
|
|
60
|
+
vue.unref(cs).is("scroll", vue.unref(paginat).is && vue.unref(paginat).scroll)
|
|
61
|
+
],
|
|
62
|
+
"scroll-selector": "." + vue.unref(cs).c("lists", "list"),
|
|
59
63
|
value: vue.unref(data).list,
|
|
60
64
|
list: vue.unref(tableList),
|
|
61
65
|
size: (_a = vue.unref(tableConfig).config) == null ? void 0 : _a.size,
|
|
62
66
|
paginat: vue.unref(paginat),
|
|
63
|
-
loading: vue.unref(loading),
|
|
67
|
+
loading: vue.unref(paginat).scroll && vue.unref(paginat).current > 1 ? false : vue.unref(loading),
|
|
64
68
|
options: props.options,
|
|
65
69
|
compons: props.compons,
|
|
66
70
|
onSortChange: vue.unref(onSortChange),
|
|
@@ -77,12 +81,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
77
81
|
])
|
|
78
82
|
};
|
|
79
83
|
})
|
|
80
|
-
]), 1040, ["height", "class", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
81
|
-
[vue.unref(index$2.default),
|
|
82
|
-
is: vue.unref(paginat).scroll,
|
|
83
|
-
dom: ".lists-list",
|
|
84
|
-
onChange: vue.unref(onScroll)
|
|
85
|
-
}]
|
|
84
|
+
]), 1040, ["height", "class", "scroll-selector", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
85
|
+
[vue.unref(index$2.default), vue.unref(scroll)]
|
|
86
86
|
]),
|
|
87
87
|
((_b = vue.unref(paginat)) == null ? void 0 : _b.is) && !vue.unref(paginat).scroll ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.Paging), vue.mergeProps({ key: 0 }, vue.unref(pagconfig), {
|
|
88
88
|
class: vue.unref(cs).z("paginat"),
|
|
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
23
23
|
loading,
|
|
24
24
|
tableList,
|
|
25
25
|
tableConfig,
|
|
26
|
-
|
|
26
|
+
scroll,
|
|
27
27
|
onSortChange,
|
|
28
28
|
onListEvents,
|
|
29
29
|
onSelect,
|
|
@@ -53,12 +53,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
53
53
|
height: unref(height),
|
|
54
54
|
ref_key: "refTable",
|
|
55
55
|
ref: refTable,
|
|
56
|
-
class: [
|
|
56
|
+
class: [
|
|
57
|
+
unref(cs).z("main"),
|
|
58
|
+
unref(cs).is("scroll", unref(paginat).is && unref(paginat).scroll)
|
|
59
|
+
],
|
|
60
|
+
"scroll-selector": "." + unref(cs).c("lists", "list"),
|
|
57
61
|
value: unref(data).list,
|
|
58
62
|
list: unref(tableList),
|
|
59
63
|
size: (_a = unref(tableConfig).config) == null ? void 0 : _a.size,
|
|
60
64
|
paginat: unref(paginat),
|
|
61
|
-
loading: unref(loading),
|
|
65
|
+
loading: unref(paginat).scroll && unref(paginat).current > 1 ? false : unref(loading),
|
|
62
66
|
options: props.options,
|
|
63
67
|
compons: props.compons,
|
|
64
68
|
onSortChange: unref(onSortChange),
|
|
@@ -75,12 +79,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75
79
|
])
|
|
76
80
|
};
|
|
77
81
|
})
|
|
78
|
-
]), 1040, ["height", "class", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
79
|
-
[unref(vScroll),
|
|
80
|
-
is: unref(paginat).scroll,
|
|
81
|
-
dom: ".lists-list",
|
|
82
|
-
onChange: unref(onScroll)
|
|
83
|
-
}]
|
|
82
|
+
]), 1040, ["height", "class", "scroll-selector", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
83
|
+
[unref(vScroll), unref(scroll)]
|
|
84
84
|
]),
|
|
85
85
|
((_b = unref(paginat)) == null ? void 0 : _b.is) && !unref(paginat).scroll ? (openBlock(), createBlock(unref(Paging), mergeProps({ key: 0 }, unref(pagconfig), {
|
|
86
86
|
class: unref(cs).z("paginat"),
|
|
@@ -234,6 +234,12 @@
|
|
|
234
234
|
.tablesp-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
|
|
235
235
|
display: none;
|
|
236
236
|
}
|
|
237
|
+
.tablesp-main.is-scroll .v-scroll-add {
|
|
238
|
+
text-align: center;
|
|
239
|
+
padding: 10px;
|
|
240
|
+
color: #999;
|
|
241
|
+
background-color: #eee;
|
|
242
|
+
}
|
|
237
243
|
.tablesp-paginat {
|
|
238
244
|
overflow: hidden;
|
|
239
245
|
}
|
|
@@ -87,8 +87,8 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
87
87
|
cross: false,
|
|
88
88
|
front: false,
|
|
89
89
|
scroll: false,
|
|
90
|
-
current:
|
|
91
|
-
pageSize:
|
|
90
|
+
current: 0,
|
|
91
|
+
pageSize: 0,
|
|
92
92
|
order: "",
|
|
93
93
|
prop: ""
|
|
94
94
|
});
|
|
@@ -506,7 +506,6 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
506
506
|
} else {
|
|
507
507
|
ajax = ajax ?? tableConfig.value.ajax;
|
|
508
508
|
}
|
|
509
|
-
Object.assign(data, paginat);
|
|
510
509
|
const propsParame = {
|
|
511
510
|
onRequestBefore: inParamFilter,
|
|
512
511
|
onRequestAfter: inDataFilter,
|
|
@@ -524,6 +523,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
524
523
|
})
|
|
525
524
|
).then((list) => {
|
|
526
525
|
var _a3;
|
|
526
|
+
Object.assign(data, paginat);
|
|
527
527
|
let dlist = (list == null ? void 0 : list.list) || [];
|
|
528
528
|
if (dlist instanceof Array === false) {
|
|
529
529
|
dlist = [dlist];
|
|
@@ -543,6 +543,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
543
543
|
callback(data);
|
|
544
544
|
}
|
|
545
545
|
}).catch(() => {
|
|
546
|
+
Object.assign(data, paginat);
|
|
546
547
|
loading.value = false;
|
|
547
548
|
if (callback) {
|
|
548
549
|
callback();
|
|
@@ -590,6 +591,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
590
591
|
return ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.height) ?? "auto";
|
|
591
592
|
});
|
|
592
593
|
const onScroll = () => {
|
|
594
|
+
console.log("onScroll");
|
|
593
595
|
if (paginat.is && paginat.scroll) {
|
|
594
596
|
if (data.total && data.pageSize * data.current < data.total) {
|
|
595
597
|
paginat.current++;
|
|
@@ -597,6 +599,19 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
597
599
|
}
|
|
598
600
|
}
|
|
599
601
|
};
|
|
602
|
+
const scroll = vue.computed(() => {
|
|
603
|
+
const end = vue.computed(
|
|
604
|
+
() => Boolean(
|
|
605
|
+
data.total > 0 && data.pageSize * data.current >= data.total
|
|
606
|
+
)
|
|
607
|
+
);
|
|
608
|
+
return {
|
|
609
|
+
is: paginat.is && paginat.scroll,
|
|
610
|
+
load: loading,
|
|
611
|
+
end,
|
|
612
|
+
onChange: onScroll
|
|
613
|
+
};
|
|
614
|
+
});
|
|
600
615
|
return {
|
|
601
616
|
height,
|
|
602
617
|
tableConfig,
|
|
@@ -608,7 +623,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
608
623
|
clean,
|
|
609
624
|
empty,
|
|
610
625
|
loading,
|
|
611
|
-
|
|
626
|
+
scroll,
|
|
612
627
|
onSortChange,
|
|
613
628
|
onListEvents,
|
|
614
629
|
onSelect,
|
|
@@ -254,7 +254,12 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
254
254
|
clean: () => void;
|
|
255
255
|
empty: () => void;
|
|
256
256
|
loading: Ref<boolean, boolean>;
|
|
257
|
-
|
|
257
|
+
scroll: ComputedRef<{
|
|
258
|
+
is: boolean;
|
|
259
|
+
load: Ref<boolean, boolean>;
|
|
260
|
+
end: ComputedRef<boolean>;
|
|
261
|
+
onChange: () => void;
|
|
262
|
+
}>;
|
|
258
263
|
onSortChange: (obj: ObjAny) => void;
|
|
259
264
|
onListEvents: (...arr: any) => void;
|
|
260
265
|
onSelect: (s: ObjAny, row: ObjStr) => void;
|
|
@@ -85,8 +85,8 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
85
85
|
cross: false,
|
|
86
86
|
front: false,
|
|
87
87
|
scroll: false,
|
|
88
|
-
current:
|
|
89
|
-
pageSize:
|
|
88
|
+
current: 0,
|
|
89
|
+
pageSize: 0,
|
|
90
90
|
order: "",
|
|
91
91
|
prop: ""
|
|
92
92
|
});
|
|
@@ -504,7 +504,6 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
504
504
|
} else {
|
|
505
505
|
ajax = ajax ?? tableConfig.value.ajax;
|
|
506
506
|
}
|
|
507
|
-
Object.assign(data, paginat);
|
|
508
507
|
const propsParame = {
|
|
509
508
|
onRequestBefore: inParamFilter,
|
|
510
509
|
onRequestAfter: inDataFilter,
|
|
@@ -522,6 +521,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
522
521
|
})
|
|
523
522
|
).then((list) => {
|
|
524
523
|
var _a3;
|
|
524
|
+
Object.assign(data, paginat);
|
|
525
525
|
let dlist = (list == null ? void 0 : list.list) || [];
|
|
526
526
|
if (dlist instanceof Array === false) {
|
|
527
527
|
dlist = [dlist];
|
|
@@ -541,6 +541,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
541
541
|
callback(data);
|
|
542
542
|
}
|
|
543
543
|
}).catch(() => {
|
|
544
|
+
Object.assign(data, paginat);
|
|
544
545
|
loading.value = false;
|
|
545
546
|
if (callback) {
|
|
546
547
|
callback();
|
|
@@ -588,6 +589,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
588
589
|
return ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.height) ?? "auto";
|
|
589
590
|
});
|
|
590
591
|
const onScroll = () => {
|
|
592
|
+
console.log("onScroll");
|
|
591
593
|
if (paginat.is && paginat.scroll) {
|
|
592
594
|
if (data.total && data.pageSize * data.current < data.total) {
|
|
593
595
|
paginat.current++;
|
|
@@ -595,6 +597,19 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
595
597
|
}
|
|
596
598
|
}
|
|
597
599
|
};
|
|
600
|
+
const scroll = computed(() => {
|
|
601
|
+
const end = computed(
|
|
602
|
+
() => Boolean(
|
|
603
|
+
data.total > 0 && data.pageSize * data.current >= data.total
|
|
604
|
+
)
|
|
605
|
+
);
|
|
606
|
+
return {
|
|
607
|
+
is: paginat.is && paginat.scroll,
|
|
608
|
+
load: loading,
|
|
609
|
+
end,
|
|
610
|
+
onChange: onScroll
|
|
611
|
+
};
|
|
612
|
+
});
|
|
598
613
|
return {
|
|
599
614
|
height,
|
|
600
615
|
tableConfig,
|
|
@@ -606,7 +621,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
606
621
|
clean,
|
|
607
622
|
empty,
|
|
608
623
|
loading,
|
|
609
|
-
|
|
624
|
+
scroll,
|
|
610
625
|
onSortChange,
|
|
611
626
|
onListEvents,
|
|
612
627
|
onSelect,
|
|
@@ -53,13 +53,14 @@ function setSslot(obj, scope, emit, slots, props, index2) {
|
|
|
53
53
|
return defaultDom(obj, scope, props, index2);
|
|
54
54
|
}
|
|
55
55
|
function defaultDom(obj, scope, props, index2) {
|
|
56
|
+
var _a;
|
|
56
57
|
const table = props.table;
|
|
57
58
|
let domValue = "";
|
|
58
59
|
if (obj.type == "index") {
|
|
59
60
|
if (obj.index) {
|
|
60
61
|
domValue = obj.index(scope.$index, table.paginat);
|
|
61
62
|
} else {
|
|
62
|
-
if (table.paginat && table.paginat.current && table.paginat.pageSize) {
|
|
63
|
+
if (((_a = table.paginat) == null ? void 0 : _a.is) && !table.paginat.scroll && table.paginat.current && table.paginat.pageSize) {
|
|
63
64
|
domValue = (table.paginat.current - 1) * table.paginat.pageSize + scope.$index + 1;
|
|
64
65
|
} else {
|
|
65
66
|
domValue = scope.$index + 1;
|
|
@@ -51,13 +51,14 @@ function setSslot(obj, scope, emit, slots, props, index) {
|
|
|
51
51
|
return defaultDom(obj, scope, props, index);
|
|
52
52
|
}
|
|
53
53
|
function defaultDom(obj, scope, props, index) {
|
|
54
|
+
var _a;
|
|
54
55
|
const table = props.table;
|
|
55
56
|
let domValue = "";
|
|
56
57
|
if (obj.type == "index") {
|
|
57
58
|
if (obj.index) {
|
|
58
59
|
domValue = obj.index(scope.$index, table.paginat);
|
|
59
60
|
} else {
|
|
60
|
-
if (table.paginat && table.paginat.current && table.paginat.pageSize) {
|
|
61
|
+
if (((_a = table.paginat) == null ? void 0 : _a.is) && !table.paginat.scroll && table.paginat.current && table.paginat.pageSize) {
|
|
61
62
|
domValue = (table.paginat.current - 1) * table.paginat.pageSize + scope.$index + 1;
|
|
62
63
|
} else {
|
|
63
64
|
domValue = scope.$index + 1;
|
|
@@ -60,6 +60,12 @@
|
|
|
60
60
|
.tablesp-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
|
|
61
61
|
display: none;
|
|
62
62
|
}
|
|
63
|
+
.tablesp-main.is-scroll .v-scroll-add {
|
|
64
|
+
text-align: center;
|
|
65
|
+
padding: 10px;
|
|
66
|
+
color: #999;
|
|
67
|
+
background-color: #eee;
|
|
68
|
+
}
|
|
63
69
|
.tablesp-paginat {
|
|
64
70
|
overflow: hidden;
|
|
65
71
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
4
|
const index$1 = require("../../tables/index.cjs");
|
|
5
|
-
const index$
|
|
5
|
+
const index$3 = require("../../paging/index.cjs");
|
|
6
|
+
const index$2 = require("../../../directives/scroll/index.cjs");
|
|
6
7
|
const pagin = require("../../tables/common/pagin.cjs");
|
|
7
8
|
const index = require("../../../hooks/cssname/index.cjs");
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -24,6 +25,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
24
25
|
loading,
|
|
25
26
|
tableList,
|
|
26
27
|
tableConfig,
|
|
28
|
+
scroll,
|
|
27
29
|
onSortChange,
|
|
28
30
|
onListEvents,
|
|
29
31
|
onSelect,
|
|
@@ -49,16 +51,21 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
49
51
|
class: vue.normalizeClass(vue.unref(cs).z()),
|
|
50
52
|
style: vue.normalizeStyle(vue.unref(cs).vdo({ height: vue.unref(height) }))
|
|
51
53
|
}, [
|
|
52
|
-
vue.
|
|
54
|
+
vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$1.Tables), vue.mergeProps(vue.unref(tableConfig).config, vue.toHandlers(vue.unref(formEvent)), {
|
|
53
55
|
height: vue.unref(height),
|
|
54
56
|
ref_key: "refTable",
|
|
55
57
|
ref: refTable,
|
|
56
|
-
class: [
|
|
58
|
+
class: [
|
|
59
|
+
vue.unref(cs).z("main"),
|
|
60
|
+
vue.unref(cs).is("radio", (_a = vue.unref(tableConfig).config) == null ? void 0 : _a.isradio),
|
|
61
|
+
vue.unref(cs).is("scroll", vue.unref(paginat).is && vue.unref(paginat).scroll)
|
|
62
|
+
],
|
|
63
|
+
"scroll-selector": "." + vue.unref(cs).ec("scrollbar") + " ." + vue.unref(cs).ec("scrollbar", "", "wrap"),
|
|
57
64
|
value: vue.unref(data).list,
|
|
58
65
|
list: vue.unref(tableList),
|
|
59
66
|
size: (_b = vue.unref(tableConfig).config) == null ? void 0 : _b.size,
|
|
60
67
|
paginat: vue.unref(paginat),
|
|
61
|
-
loading: vue.unref(loading),
|
|
68
|
+
loading: vue.unref(paginat).scroll && vue.unref(paginat).current > 1 ? false : vue.unref(loading),
|
|
62
69
|
options: props.options,
|
|
63
70
|
compons: props.compons,
|
|
64
71
|
onSortChange: vue.unref(onSortChange),
|
|
@@ -75,8 +82,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
75
82
|
])
|
|
76
83
|
};
|
|
77
84
|
})
|
|
78
|
-
]), 1040, ["height", "class", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"]),
|
|
79
|
-
|
|
85
|
+
]), 1040, ["height", "class", "scroll-selector", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
86
|
+
[vue.unref(index$2.default), vue.unref(scroll)]
|
|
87
|
+
]),
|
|
88
|
+
((_c = vue.unref(paginat)) == null ? void 0 : _c.is) && !vue.unref(paginat).scroll ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.Paging), vue.mergeProps({ key: 0 }, vue.unref(pagconfig), {
|
|
80
89
|
class: vue.unref(cs).z("paginat"),
|
|
81
90
|
paginat: vue.unref(paginat),
|
|
82
91
|
total: vue.unref(data).total,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent, useSlots, ref, createElementBlock, openBlock, normalizeStyle, unref, normalizeClass,
|
|
1
|
+
import { defineComponent, useSlots, ref, createElementBlock, openBlock, normalizeStyle, unref, normalizeClass, withDirectives, createBlock, createCommentVNode, mergeProps, toHandlers, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
2
2
|
import { Tables } from "../../tables/index.js";
|
|
3
3
|
import { Paging } from "../../paging/index.js";
|
|
4
|
+
import vScroll from "../../../directives/scroll/index.js";
|
|
4
5
|
import { useInit, dataEmit, dataProps } from "../../tables/common/pagin.js";
|
|
5
6
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -22,6 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
23
|
loading,
|
|
23
24
|
tableList,
|
|
24
25
|
tableConfig,
|
|
26
|
+
scroll,
|
|
25
27
|
onSortChange,
|
|
26
28
|
onListEvents,
|
|
27
29
|
onSelect,
|
|
@@ -47,16 +49,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
49
|
class: normalizeClass(unref(cs).z()),
|
|
48
50
|
style: normalizeStyle(unref(cs).vdo({ height: unref(height) }))
|
|
49
51
|
}, [
|
|
50
|
-
|
|
52
|
+
withDirectives((openBlock(), createBlock(unref(Tables), mergeProps(unref(tableConfig).config, toHandlers(unref(formEvent)), {
|
|
51
53
|
height: unref(height),
|
|
52
54
|
ref_key: "refTable",
|
|
53
55
|
ref: refTable,
|
|
54
|
-
class: [
|
|
56
|
+
class: [
|
|
57
|
+
unref(cs).z("main"),
|
|
58
|
+
unref(cs).is("radio", (_a = unref(tableConfig).config) == null ? void 0 : _a.isradio),
|
|
59
|
+
unref(cs).is("scroll", unref(paginat).is && unref(paginat).scroll)
|
|
60
|
+
],
|
|
61
|
+
"scroll-selector": "." + unref(cs).ec("scrollbar") + " ." + unref(cs).ec("scrollbar", "", "wrap"),
|
|
55
62
|
value: unref(data).list,
|
|
56
63
|
list: unref(tableList),
|
|
57
64
|
size: (_b = unref(tableConfig).config) == null ? void 0 : _b.size,
|
|
58
65
|
paginat: unref(paginat),
|
|
59
|
-
loading: unref(loading),
|
|
66
|
+
loading: unref(paginat).scroll && unref(paginat).current > 1 ? false : unref(loading),
|
|
60
67
|
options: props.options,
|
|
61
68
|
compons: props.compons,
|
|
62
69
|
onSortChange: unref(onSortChange),
|
|
@@ -73,8 +80,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
73
80
|
])
|
|
74
81
|
};
|
|
75
82
|
})
|
|
76
|
-
]), 1040, ["height", "class", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"]),
|
|
77
|
-
|
|
83
|
+
]), 1040, ["height", "class", "scroll-selector", "value", "list", "size", "paginat", "loading", "options", "compons", "onSortChange", "onListEvents", "onSelect", "onRowClick", "onSelectionChange"])), [
|
|
84
|
+
[unref(vScroll), unref(scroll)]
|
|
85
|
+
]),
|
|
86
|
+
((_c = unref(paginat)) == null ? void 0 : _c.is) && !unref(paginat).scroll ? (openBlock(), createBlock(unref(Paging), mergeProps({ key: 0 }, unref(pagconfig), {
|
|
78
87
|
class: unref(cs).z("paginat"),
|
|
79
88
|
paginat: unref(paginat),
|
|
80
89
|
total: unref(data).total,
|
|
@@ -192,13 +192,14 @@ function setSslot(obj, scope, emit, slots, props, index2) {
|
|
|
192
192
|
return defaultDom(obj, scope, props, index2);
|
|
193
193
|
}
|
|
194
194
|
function defaultDom(obj, scope, props, index2) {
|
|
195
|
+
var _a;
|
|
195
196
|
const table = props.table;
|
|
196
197
|
let domValue = "";
|
|
197
198
|
if (obj.type == "index") {
|
|
198
199
|
if (obj.index) {
|
|
199
200
|
domValue = obj.index(scope.$rowIndex, table.paginat);
|
|
200
201
|
} else {
|
|
201
|
-
if (table.paginat && table.paginat.current && table.paginat.pageSize) {
|
|
202
|
+
if (((_a = table.paginat) == null ? void 0 : _a.is) && !table.paginat.scroll && table.paginat.current && table.paginat.pageSize) {
|
|
202
203
|
domValue = (table.paginat.current - 1) * table.paginat.pageSize + scope.$rowIndex + 1;
|
|
203
204
|
} else {
|
|
204
205
|
domValue = scope.$rowIndex + 1;
|
|
@@ -190,13 +190,14 @@ function setSslot(obj, scope, emit, slots, props, index) {
|
|
|
190
190
|
return defaultDom(obj, scope, props, index);
|
|
191
191
|
}
|
|
192
192
|
function defaultDom(obj, scope, props, index) {
|
|
193
|
+
var _a;
|
|
193
194
|
const table = props.table;
|
|
194
195
|
let domValue = "";
|
|
195
196
|
if (obj.type == "index") {
|
|
196
197
|
if (obj.index) {
|
|
197
198
|
domValue = obj.index(scope.$rowIndex, table.paginat);
|
|
198
199
|
} else {
|
|
199
|
-
if (table.paginat && table.paginat.current && table.paginat.pageSize) {
|
|
200
|
+
if (((_a = table.paginat) == null ? void 0 : _a.is) && !table.paginat.scroll && table.paginat.current && table.paginat.pageSize) {
|
|
200
201
|
domValue = (table.paginat.current - 1) * table.paginat.pageSize + scope.$rowIndex + 1;
|
|
201
202
|
} else {
|
|
202
203
|
domValue = scope.$rowIndex + 1;
|
package/dist/css/index.css
CHANGED
|
@@ -540,6 +540,12 @@
|
|
|
540
540
|
.tablesp-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
|
|
541
541
|
display: none;
|
|
542
542
|
}
|
|
543
|
+
.tablesp-main.is-scroll .v-scroll-add {
|
|
544
|
+
text-align: center;
|
|
545
|
+
padding: 10px;
|
|
546
|
+
color: #999;
|
|
547
|
+
background-color: #eee;
|
|
548
|
+
}
|
|
543
549
|
.tablesp-paginat {
|
|
544
550
|
overflow: hidden;
|
|
545
551
|
}
|
|
@@ -912,11 +918,11 @@
|
|
|
912
918
|
.lists-list-item {
|
|
913
919
|
background-color: #fff;
|
|
914
920
|
margin: 0 var(--lists-interval);
|
|
915
|
-
margin-top: calc(var(--lists-interval) * 2);
|
|
916
|
-
}
|
|
917
|
-
.lists-list-item:last-child {
|
|
918
921
|
margin-bottom: calc(var(--lists-interval) * 2);
|
|
919
922
|
}
|
|
923
|
+
.lists-list-item:first-child {
|
|
924
|
+
margin-top: calc(var(--lists-interval) * 2);
|
|
925
|
+
}
|
|
920
926
|
.lists-list-item.is-active {
|
|
921
927
|
background-color: rgb(250, 235, 215);
|
|
922
928
|
}
|
|
@@ -939,6 +945,11 @@
|
|
|
939
945
|
flex: 1;
|
|
940
946
|
width: 100%;
|
|
941
947
|
}
|
|
948
|
+
.listsp-main.is-scroll .v-scroll-add {
|
|
949
|
+
text-align: center;
|
|
950
|
+
padding: 10px;
|
|
951
|
+
color: #999;
|
|
952
|
+
}
|
|
942
953
|
.listsp-paginat {
|
|
943
954
|
overflow: hidden;
|
|
944
955
|
}
|
|
@@ -1046,26 +1057,4 @@
|
|
|
1046
1057
|
left: 0;
|
|
1047
1058
|
z-index: 1;
|
|
1048
1059
|
opacity: 0;
|
|
1049
|
-
}
|
|
1050
|
-
|
|
1051
|
-
.tablesvp {
|
|
1052
|
-
width: 100%;
|
|
1053
|
-
height: var(--tablesvp-height);
|
|
1054
|
-
display: flex;
|
|
1055
|
-
flex-direction: column;
|
|
1056
|
-
}
|
|
1057
|
-
.tablesvp-main {
|
|
1058
|
-
display: flex;
|
|
1059
|
-
flex-direction: column;
|
|
1060
|
-
flex: 1;
|
|
1061
|
-
width: 100%;
|
|
1062
|
-
}
|
|
1063
|
-
.tablesvp-main.is-radio .el-table__header .el-table-column--selection .el-checkbox {
|
|
1064
|
-
display: none;
|
|
1065
|
-
}
|
|
1066
|
-
.tablesvp-paginat {
|
|
1067
|
-
overflow: hidden;
|
|
1068
|
-
}
|
|
1069
|
-
.tablesvp-paginat .el-pagination {
|
|
1070
|
-
justify-content: flex-end;
|
|
1071
1060
|
}
|