@fangzhongya/fang-ui 0.0.55 → 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.
Files changed (35) hide show
  1. package/dist/components/lists/index.css +3 -3
  2. package/dist/components/lists/index.scss +3 -3
  3. package/dist/components/lists/src/index2.cjs +1 -1
  4. package/dist/components/lists/src/index2.js +1 -1
  5. package/dist/components/listsp/index.css +8 -3
  6. package/dist/components/listsp/index.scss +7 -0
  7. package/dist/components/listsp/src/index2.cjs +10 -10
  8. package/dist/components/listsp/src/index2.js +10 -10
  9. package/dist/components/page/index.css +6 -0
  10. package/dist/components/tables/common/pagin.cjs +32 -15
  11. package/dist/components/tables/common/pagin.d.ts +12 -3
  12. package/dist/components/tables/common/pagin.js +32 -15
  13. package/dist/components/tables/src/column.cjs +2 -1
  14. package/dist/components/tables/src/column.js +2 -1
  15. package/dist/components/tablesp/index.css +6 -0
  16. package/dist/components/tablesp/index.scss +8 -0
  17. package/dist/components/tablesp/src/index2.cjs +15 -6
  18. package/dist/components/tablesp/src/index2.js +15 -6
  19. package/dist/components/tablesv/src/column.cjs +2 -1
  20. package/dist/components/tablesv/src/column.js +2 -1
  21. package/dist/css/index.css +14 -3
  22. package/dist/css/lists.css +3 -3
  23. package/dist/css/listsp.css +8 -3
  24. package/dist/css/page.css +6 -0
  25. package/dist/css/tablesp.css +6 -0
  26. package/dist/directives/scroll/index.cjs +59 -12
  27. package/dist/directives/scroll/index.js +59 -12
  28. package/dist/hooks/cssname/index.cjs +16 -0
  29. package/dist/hooks/cssname/index.d.ts +2 -0
  30. package/dist/hooks/cssname/index.js +16 -0
  31. package/dist/icons/index.css +29 -29
  32. package/dist/icons/index.json +7 -7
  33. package/dist/index.css +14 -3
  34. package/dist/type.d.ts +4 -2
  35. package/package.json +5 -5
@@ -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
- &:last-child {
26
- margin-bottom: calc(var(vdm('interval', $lists)) * 2);
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-top: calc(var(vdm('interval', $lists)) * 2);
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
  }
@@ -13,6 +13,13 @@ $listsp: 'listsp';
13
13
  flex-direction: column;
14
14
  flex: 1;
15
15
  width: 100%;
16
+ &.#{is('scroll')} {
17
+ .v-scroll-add {
18
+ text-align: center;
19
+ padding: 10px;
20
+ color: #999;
21
+ }
22
+ }
16
23
  }
17
24
  &-paginat {
18
25
  overflow: hidden;
@@ -25,7 +25,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
25
25
  loading,
26
26
  tableList,
27
27
  tableConfig,
28
- onScroll,
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: [vue.unref(cs).z("main"), vue.unref(cs).is("scroll", vue.unref(paginat).scroll)],
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,14 +81,10 @@ 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
- ((_b = vue.unref(tableConfig).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), {
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"),
89
89
  paginat: vue.unref(paginat),
90
90
  total: vue.unref(data).total,
@@ -23,7 +23,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  loading,
24
24
  tableList,
25
25
  tableConfig,
26
- onScroll,
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: [unref(cs).z("main"), unref(cs).is("scroll", unref(paginat).scroll)],
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,14 +79,10 @@ 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
- ((_b = unref(tableConfig).paginat) == null ? void 0 : _b.is) && !unref(paginat).scroll ? (openBlock(), createBlock(unref(Paging), mergeProps({ key: 0 }, unref(pagconfig), {
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"),
87
87
  paginat: unref(paginat),
88
88
  total: unref(data).total,
@@ -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
  }
@@ -71,6 +71,8 @@ const useInit = (props2, emit, refTable, isEl) => {
71
71
  };
72
72
  const pagconfig = vue.ref(mpagconfig);
73
73
  const paginat = vue.reactive({
74
+ is: false,
75
+ cross: false,
74
76
  front: false,
75
77
  scroll: false,
76
78
  current: 1,
@@ -81,10 +83,12 @@ const useInit = (props2, emit, refTable, isEl) => {
81
83
  const data = vue.reactive({
82
84
  total: 0,
83
85
  list: [],
86
+ is: false,
87
+ cross: false,
84
88
  front: false,
85
89
  scroll: false,
86
- current: 1,
87
- pageSize: mpagconfig.pageSize,
90
+ current: 0,
91
+ pageSize: 0,
88
92
  order: "",
89
93
  prop: ""
90
94
  });
@@ -170,8 +174,10 @@ const useInit = (props2, emit, refTable, isEl) => {
170
174
  paginat.prop = v.prop;
171
175
  }
172
176
  const pagin = config.paginat ?? {};
177
+ paginat.is = pagin.is || false;
173
178
  paginat.front = pagin.front || false;
174
179
  paginat.scroll = pagin.scroll || false;
180
+ paginat.cross = pagin.cross || false;
175
181
  paginat.pageSize = pagin.size || mpagconfig.pageSize;
176
182
  pagconfig.value = Object.assign({}, mpagconfig, pagin.config || {});
177
183
  tableConfig.value = config;
@@ -213,8 +219,7 @@ const useInit = (props2, emit, refTable, isEl) => {
213
219
  console.log("crossPageData", crossPageData);
214
220
  }
215
221
  function getCrossPageValue(sarr, index) {
216
- var _a2;
217
- const cross = (_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage;
222
+ const cross = paginat.cross;
218
223
  if (cross) {
219
224
  if (typeof cross === "string") {
220
225
  const sv = /* @__PURE__ */ new Set();
@@ -289,9 +294,8 @@ const useInit = (props2, emit, refTable, isEl) => {
289
294
  }
290
295
  }
291
296
  function toggleCrossPage() {
292
- var _a2;
293
- const cross = (_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage;
294
- if (cross && !paginat.scroll) {
297
+ const cross = paginat.cross;
298
+ if (paginat.is && cross && !paginat.scroll) {
295
299
  const datas = data.list;
296
300
  const vs = getCrossPageValue();
297
301
  if (typeof cross == "string") {
@@ -318,8 +322,7 @@ const useInit = (props2, emit, refTable, isEl) => {
318
322
  }
319
323
  }
320
324
  function getSelectionValue(arr, i) {
321
- var _a2;
322
- if (((_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage) && !paginat.scroll) {
325
+ if (paginat.is && paginat.cross && !paginat.scroll) {
323
326
  return getCrossPageValue(arr, i);
324
327
  } else {
325
328
  return arr;
@@ -435,9 +438,8 @@ const useInit = (props2, emit, refTable, isEl) => {
435
438
  getData();
436
439
  }
437
440
  function onCurrentChange() {
438
- var _a2;
439
441
  console.log("onCurrentChange");
440
- if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage) {
442
+ if (paginat.cross) {
441
443
  setCrossPage();
442
444
  } else {
443
445
  clean();
@@ -475,7 +477,7 @@ const useInit = (props2, emit, refTable, isEl) => {
475
477
  }
476
478
  function getFrontPaginatValue(obj) {
477
479
  var _a2;
478
- if (paginat.front) {
480
+ if (paginat.is && paginat.front) {
479
481
  const list = obj.value;
480
482
  const total = list.length;
481
483
  const c = paginat.current;
@@ -504,7 +506,6 @@ const useInit = (props2, emit, refTable, isEl) => {
504
506
  } else {
505
507
  ajax = ajax ?? tableConfig.value.ajax;
506
508
  }
507
- Object.assign(data, paginat);
508
509
  const propsParame = {
509
510
  onRequestBefore: inParamFilter,
510
511
  onRequestAfter: inDataFilter,
@@ -522,6 +523,7 @@ const useInit = (props2, emit, refTable, isEl) => {
522
523
  })
523
524
  ).then((list) => {
524
525
  var _a3;
526
+ Object.assign(data, paginat);
525
527
  let dlist = (list == null ? void 0 : list.list) || [];
526
528
  if (dlist instanceof Array === false) {
527
529
  dlist = [dlist];
@@ -541,6 +543,7 @@ const useInit = (props2, emit, refTable, isEl) => {
541
543
  callback(data);
542
544
  }
543
545
  }).catch(() => {
546
+ Object.assign(data, paginat);
544
547
  loading.value = false;
545
548
  if (callback) {
546
549
  callback();
@@ -588,13 +591,27 @@ const useInit = (props2, emit, refTable, isEl) => {
588
591
  return ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.height) ?? "auto";
589
592
  });
590
593
  const onScroll = () => {
591
- if (paginat.scroll) {
594
+ console.log("onScroll");
595
+ if (paginat.is && paginat.scroll) {
592
596
  if (data.total && data.pageSize * data.current < data.total) {
593
597
  paginat.current++;
594
598
  getData();
595
599
  }
596
600
  }
597
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
+ });
598
615
  return {
599
616
  height,
600
617
  tableConfig,
@@ -606,7 +623,7 @@ const useInit = (props2, emit, refTable, isEl) => {
606
623
  clean,
607
624
  empty,
608
625
  loading,
609
- onScroll,
626
+ scroll,
610
627
  onSortChange,
611
628
  onListEvents,
612
629
  onSelect,
@@ -79,7 +79,6 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
79
79
  nocustomize?: boolean | undefined;
80
80
  isradio?: boolean | undefined;
81
81
  ischecked?: boolean | undefined;
82
- crossPage?: boolean | string | undefined;
83
82
  border?: boolean | undefined;
84
83
  align?: string | undefined;
85
84
  resizable?: boolean | undefined;
@@ -104,6 +103,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
104
103
  size?: number | undefined;
105
104
  scroll?: boolean | undefined;
106
105
  front?: boolean | undefined;
106
+ cross?: boolean | string | undefined;
107
107
  config?: {
108
108
  [key: string]: any;
109
109
  } | undefined;
@@ -135,7 +135,6 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
135
135
  nocustomize?: boolean | undefined;
136
136
  isradio?: boolean | undefined;
137
137
  ischecked?: boolean | undefined;
138
- crossPage?: boolean | string | undefined;
139
138
  border?: boolean | undefined;
140
139
  align?: string | undefined;
141
140
  resizable?: boolean | undefined;
@@ -160,6 +159,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
160
159
  size?: number | undefined;
161
160
  scroll?: boolean | undefined;
162
161
  front?: boolean | undefined;
162
+ cross?: boolean | string | undefined;
163
163
  config?: {
164
164
  [key: string]: any;
165
165
  } | undefined;
@@ -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
- onScroll: () => void;
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;
@@ -303,6 +308,8 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
303
308
  onSizeChange: () => void;
304
309
  onCurrentChange: () => void;
305
310
  paginat: {
311
+ is: boolean;
312
+ cross: boolean | string;
306
313
  front: boolean;
307
314
  scroll: boolean;
308
315
  current: number;
@@ -311,6 +318,8 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
311
318
  prop: string;
312
319
  };
313
320
  data: {
321
+ is: boolean;
322
+ cross: boolean | string;
314
323
  front: boolean;
315
324
  scroll: boolean;
316
325
  current: number;
@@ -69,6 +69,8 @@ const useInit = (props2, emit, refTable, isEl) => {
69
69
  };
70
70
  const pagconfig = ref(mpagconfig);
71
71
  const paginat = reactive({
72
+ is: false,
73
+ cross: false,
72
74
  front: false,
73
75
  scroll: false,
74
76
  current: 1,
@@ -79,10 +81,12 @@ const useInit = (props2, emit, refTable, isEl) => {
79
81
  const data = reactive({
80
82
  total: 0,
81
83
  list: [],
84
+ is: false,
85
+ cross: false,
82
86
  front: false,
83
87
  scroll: false,
84
- current: 1,
85
- pageSize: mpagconfig.pageSize,
88
+ current: 0,
89
+ pageSize: 0,
86
90
  order: "",
87
91
  prop: ""
88
92
  });
@@ -168,8 +172,10 @@ const useInit = (props2, emit, refTable, isEl) => {
168
172
  paginat.prop = v.prop;
169
173
  }
170
174
  const pagin = config.paginat ?? {};
175
+ paginat.is = pagin.is || false;
171
176
  paginat.front = pagin.front || false;
172
177
  paginat.scroll = pagin.scroll || false;
178
+ paginat.cross = pagin.cross || false;
173
179
  paginat.pageSize = pagin.size || mpagconfig.pageSize;
174
180
  pagconfig.value = Object.assign({}, mpagconfig, pagin.config || {});
175
181
  tableConfig.value = config;
@@ -211,8 +217,7 @@ const useInit = (props2, emit, refTable, isEl) => {
211
217
  console.log("crossPageData", crossPageData);
212
218
  }
213
219
  function getCrossPageValue(sarr, index) {
214
- var _a2;
215
- const cross = (_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage;
220
+ const cross = paginat.cross;
216
221
  if (cross) {
217
222
  if (typeof cross === "string") {
218
223
  const sv = /* @__PURE__ */ new Set();
@@ -287,9 +292,8 @@ const useInit = (props2, emit, refTable, isEl) => {
287
292
  }
288
293
  }
289
294
  function toggleCrossPage() {
290
- var _a2;
291
- const cross = (_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage;
292
- if (cross && !paginat.scroll) {
295
+ const cross = paginat.cross;
296
+ if (paginat.is && cross && !paginat.scroll) {
293
297
  const datas = data.list;
294
298
  const vs = getCrossPageValue();
295
299
  if (typeof cross == "string") {
@@ -316,8 +320,7 @@ const useInit = (props2, emit, refTable, isEl) => {
316
320
  }
317
321
  }
318
322
  function getSelectionValue(arr, i) {
319
- var _a2;
320
- if (((_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage) && !paginat.scroll) {
323
+ if (paginat.is && paginat.cross && !paginat.scroll) {
321
324
  return getCrossPageValue(arr, i);
322
325
  } else {
323
326
  return arr;
@@ -433,9 +436,8 @@ const useInit = (props2, emit, refTable, isEl) => {
433
436
  getData();
434
437
  }
435
438
  function onCurrentChange() {
436
- var _a2;
437
439
  console.log("onCurrentChange");
438
- if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage) {
440
+ if (paginat.cross) {
439
441
  setCrossPage();
440
442
  } else {
441
443
  clean();
@@ -473,7 +475,7 @@ const useInit = (props2, emit, refTable, isEl) => {
473
475
  }
474
476
  function getFrontPaginatValue(obj) {
475
477
  var _a2;
476
- if (paginat.front) {
478
+ if (paginat.is && paginat.front) {
477
479
  const list = obj.value;
478
480
  const total = list.length;
479
481
  const c = paginat.current;
@@ -502,7 +504,6 @@ const useInit = (props2, emit, refTable, isEl) => {
502
504
  } else {
503
505
  ajax = ajax ?? tableConfig.value.ajax;
504
506
  }
505
- Object.assign(data, paginat);
506
507
  const propsParame = {
507
508
  onRequestBefore: inParamFilter,
508
509
  onRequestAfter: inDataFilter,
@@ -520,6 +521,7 @@ const useInit = (props2, emit, refTable, isEl) => {
520
521
  })
521
522
  ).then((list) => {
522
523
  var _a3;
524
+ Object.assign(data, paginat);
523
525
  let dlist = (list == null ? void 0 : list.list) || [];
524
526
  if (dlist instanceof Array === false) {
525
527
  dlist = [dlist];
@@ -539,6 +541,7 @@ const useInit = (props2, emit, refTable, isEl) => {
539
541
  callback(data);
540
542
  }
541
543
  }).catch(() => {
544
+ Object.assign(data, paginat);
542
545
  loading.value = false;
543
546
  if (callback) {
544
547
  callback();
@@ -586,13 +589,27 @@ const useInit = (props2, emit, refTable, isEl) => {
586
589
  return ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.height) ?? "auto";
587
590
  });
588
591
  const onScroll = () => {
589
- if (paginat.scroll) {
592
+ console.log("onScroll");
593
+ if (paginat.is && paginat.scroll) {
590
594
  if (data.total && data.pageSize * data.current < data.total) {
591
595
  paginat.current++;
592
596
  getData();
593
597
  }
594
598
  }
595
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
+ });
596
613
  return {
597
614
  height,
598
615
  tableConfig,
@@ -604,7 +621,7 @@ const useInit = (props2, emit, refTable, isEl) => {
604
621
  clean,
605
622
  empty,
606
623
  loading,
607
- onScroll,
624
+ scroll,
608
625
  onSortChange,
609
626
  onListEvents,
610
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
  }
@@ -22,6 +22,14 @@ $tablesp: 'tablesp';
22
22
  }
23
23
  }
24
24
  }
25
+ &.#{is('scroll')} {
26
+ .v-scroll-add {
27
+ text-align: center;
28
+ padding: 10px;
29
+ color: #999;
30
+ background-color: #eee;
31
+ }
32
+ }
25
33
  }
26
34
  &-paginat {
27
35
  overflow: hidden;
@@ -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$2 = require("../../paging/index.cjs");
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.createVNode(vue.unref(index$1.Tables), vue.mergeProps(vue.unref(tableConfig).config, vue.toHandlers(vue.unref(formEvent)), {
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: [vue.unref(cs).z("main"), vue.unref(cs).is("radio", (_a = vue.unref(tableConfig).config) == null ? void 0 : _a.isradio)],
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
- ((_c = vue.unref(tableConfig).paginat) == null ? void 0 : _c.is) ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.Paging), vue.mergeProps({ key: 0 }, vue.unref(pagconfig), {
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,