@fangzhongya/fang-ui 0.0.54 → 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/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/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/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/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/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/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/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/icons/index.css +43 -43
- package/dist/icons/index.json +14 -14
- 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
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* @title {h2} TablesPagin 输入框
|
|
4
|
+
* @text 目前完全继承 element-plus 中 el-tables-pagin
|
|
5
|
+
*/
|
|
6
|
+
export declare const dataProps: {};
|
|
7
|
+
export type DataProps = ExtractPublicPropTypes<typeof dataProps>;
|
|
8
|
+
export declare const dataEmits: never[];
|
|
9
|
+
export type DataEmits = typeof dataEmits;
|
|
10
|
+
export declare const dataSlot: {};
|
|
11
|
+
/**
|
|
12
|
+
* @expose refEl 获取当前组件在element-plus中暴露的方法
|
|
13
|
+
*/
|
|
14
|
+
export declare const dataExpose: {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const index$1 = require("../../lists/index.cjs");
|
|
5
|
+
const index$3 = require("../../paging/index.cjs");
|
|
6
|
+
const index$2 = require("../../../directives/scroll/index.cjs");
|
|
7
|
+
const pagin = require("../../tables/common/pagin.cjs");
|
|
8
|
+
const index = require("../../../hooks/cssname/index.cjs");
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
10
|
+
__name: "index",
|
|
11
|
+
props: pagin.dataProps,
|
|
12
|
+
emits: pagin.dataEmit,
|
|
13
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
14
|
+
const cs = index.useCssName("listsp");
|
|
15
|
+
const slots = vue.useSlots();
|
|
16
|
+
const props = __props;
|
|
17
|
+
const emit = __emit;
|
|
18
|
+
const refTable = vue.ref();
|
|
19
|
+
const {
|
|
20
|
+
height,
|
|
21
|
+
getSelection,
|
|
22
|
+
initData,
|
|
23
|
+
getData,
|
|
24
|
+
empty,
|
|
25
|
+
loading,
|
|
26
|
+
tableList,
|
|
27
|
+
tableConfig,
|
|
28
|
+
onScroll,
|
|
29
|
+
onSortChange,
|
|
30
|
+
onListEvents,
|
|
31
|
+
onSelect,
|
|
32
|
+
onRowClick,
|
|
33
|
+
onChange,
|
|
34
|
+
pagconfig,
|
|
35
|
+
formEvent,
|
|
36
|
+
onSizeChange,
|
|
37
|
+
onCurrentChange,
|
|
38
|
+
paginat,
|
|
39
|
+
data
|
|
40
|
+
} = pagin.useInit(props, emit, refTable, true);
|
|
41
|
+
__expose({
|
|
42
|
+
getSelection,
|
|
43
|
+
initData,
|
|
44
|
+
getData,
|
|
45
|
+
getList: initData,
|
|
46
|
+
empty
|
|
47
|
+
});
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
var _a, _b;
|
|
50
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
51
|
+
class: vue.normalizeClass(vue.unref(cs).z()),
|
|
52
|
+
style: vue.normalizeStyle(vue.unref(cs).vdo({ height: vue.unref(height) }))
|
|
53
|
+
}, [
|
|
54
|
+
vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(index$1.Lists), vue.mergeProps(vue.unref(tableConfig).config, vue.toHandlers(vue.unref(formEvent)), {
|
|
55
|
+
height: vue.unref(height),
|
|
56
|
+
ref_key: "refTable",
|
|
57
|
+
ref: refTable,
|
|
58
|
+
class: [vue.unref(cs).z("main"), vue.unref(cs).is("scroll", vue.unref(paginat).scroll)],
|
|
59
|
+
value: vue.unref(data).list,
|
|
60
|
+
list: vue.unref(tableList),
|
|
61
|
+
size: (_a = vue.unref(tableConfig).config) == null ? void 0 : _a.size,
|
|
62
|
+
paginat: vue.unref(paginat),
|
|
63
|
+
loading: vue.unref(loading),
|
|
64
|
+
options: props.options,
|
|
65
|
+
compons: props.compons,
|
|
66
|
+
onSortChange: vue.unref(onSortChange),
|
|
67
|
+
onListEvents: vue.unref(onListEvents),
|
|
68
|
+
onSelect: vue.unref(onSelect),
|
|
69
|
+
onRowClick: vue.unref(onRowClick),
|
|
70
|
+
onSelectionChange: vue.unref(onChange)
|
|
71
|
+
}), vue.createSlots({ _: 2 }, [
|
|
72
|
+
vue.renderList(Object.keys(vue.unref(slots)), (k) => {
|
|
73
|
+
return {
|
|
74
|
+
name: k,
|
|
75
|
+
fn: vue.withCtx((scope) => [
|
|
76
|
+
vue.renderSlot(_ctx.$slots, k, vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
77
|
+
])
|
|
78
|
+
};
|
|
79
|
+
})
|
|
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
|
+
}]
|
|
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), {
|
|
88
|
+
class: vue.unref(cs).z("paginat"),
|
|
89
|
+
paginat: vue.unref(paginat),
|
|
90
|
+
total: vue.unref(data).total,
|
|
91
|
+
onSizeChange: vue.unref(onSizeChange),
|
|
92
|
+
onCurrentChange: vue.unref(onCurrentChange)
|
|
93
|
+
}), null, 16, ["class", "paginat", "total", "onSizeChange", "onCurrentChange"])) : vue.createCommentVNode("", true)
|
|
94
|
+
], 6);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { defineComponent, useSlots, ref, createElementBlock, openBlock, normalizeStyle, unref, normalizeClass, withDirectives, createBlock, createCommentVNode, mergeProps, toHandlers, createSlots, renderList, withCtx, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
+
import { Lists } from "../../lists/index.js";
|
|
3
|
+
import { Paging } from "../../paging/index.js";
|
|
4
|
+
import vScroll from "../../../directives/scroll/index.js";
|
|
5
|
+
import { useInit, dataEmit, dataProps } from "../../tables/common/pagin.js";
|
|
6
|
+
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "index",
|
|
9
|
+
props: dataProps,
|
|
10
|
+
emits: dataEmit,
|
|
11
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
12
|
+
const cs = useCssName("listsp");
|
|
13
|
+
const slots = useSlots();
|
|
14
|
+
const props = __props;
|
|
15
|
+
const emit = __emit;
|
|
16
|
+
const refTable = ref();
|
|
17
|
+
const {
|
|
18
|
+
height,
|
|
19
|
+
getSelection,
|
|
20
|
+
initData,
|
|
21
|
+
getData,
|
|
22
|
+
empty,
|
|
23
|
+
loading,
|
|
24
|
+
tableList,
|
|
25
|
+
tableConfig,
|
|
26
|
+
onScroll,
|
|
27
|
+
onSortChange,
|
|
28
|
+
onListEvents,
|
|
29
|
+
onSelect,
|
|
30
|
+
onRowClick,
|
|
31
|
+
onChange,
|
|
32
|
+
pagconfig,
|
|
33
|
+
formEvent,
|
|
34
|
+
onSizeChange,
|
|
35
|
+
onCurrentChange,
|
|
36
|
+
paginat,
|
|
37
|
+
data
|
|
38
|
+
} = useInit(props, emit, refTable, true);
|
|
39
|
+
__expose({
|
|
40
|
+
getSelection,
|
|
41
|
+
initData,
|
|
42
|
+
getData,
|
|
43
|
+
getList: initData,
|
|
44
|
+
empty
|
|
45
|
+
});
|
|
46
|
+
return (_ctx, _cache) => {
|
|
47
|
+
var _a, _b;
|
|
48
|
+
return openBlock(), createElementBlock("div", {
|
|
49
|
+
class: normalizeClass(unref(cs).z()),
|
|
50
|
+
style: normalizeStyle(unref(cs).vdo({ height: unref(height) }))
|
|
51
|
+
}, [
|
|
52
|
+
withDirectives((openBlock(), createBlock(unref(Lists), mergeProps(unref(tableConfig).config, toHandlers(unref(formEvent)), {
|
|
53
|
+
height: unref(height),
|
|
54
|
+
ref_key: "refTable",
|
|
55
|
+
ref: refTable,
|
|
56
|
+
class: [unref(cs).z("main"), unref(cs).is("scroll", unref(paginat).scroll)],
|
|
57
|
+
value: unref(data).list,
|
|
58
|
+
list: unref(tableList),
|
|
59
|
+
size: (_a = unref(tableConfig).config) == null ? void 0 : _a.size,
|
|
60
|
+
paginat: unref(paginat),
|
|
61
|
+
loading: unref(loading),
|
|
62
|
+
options: props.options,
|
|
63
|
+
compons: props.compons,
|
|
64
|
+
onSortChange: unref(onSortChange),
|
|
65
|
+
onListEvents: unref(onListEvents),
|
|
66
|
+
onSelect: unref(onSelect),
|
|
67
|
+
onRowClick: unref(onRowClick),
|
|
68
|
+
onSelectionChange: unref(onChange)
|
|
69
|
+
}), createSlots({ _: 2 }, [
|
|
70
|
+
renderList(Object.keys(unref(slots)), (k) => {
|
|
71
|
+
return {
|
|
72
|
+
name: k,
|
|
73
|
+
fn: withCtx((scope) => [
|
|
74
|
+
renderSlot(_ctx.$slots, k, normalizeProps(guardReactiveProps(scope)))
|
|
75
|
+
])
|
|
76
|
+
};
|
|
77
|
+
})
|
|
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
|
+
}]
|
|
84
|
+
]),
|
|
85
|
+
((_b = unref(tableConfig).paginat) == null ? void 0 : _b.is) && !unref(paginat).scroll ? (openBlock(), createBlock(unref(Paging), mergeProps({ key: 0 }, unref(pagconfig), {
|
|
86
|
+
class: unref(cs).z("paginat"),
|
|
87
|
+
paginat: unref(paginat),
|
|
88
|
+
total: unref(data).total,
|
|
89
|
+
onSizeChange: unref(onSizeChange),
|
|
90
|
+
onCurrentChange: unref(onCurrentChange)
|
|
91
|
+
}), null, 16, ["class", "paginat", "total", "onSizeChange", "onCurrentChange"])) : createCommentVNode("", true)
|
|
92
|
+
], 6);
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
export {
|
|
97
|
+
_sfc_main as default
|
|
98
|
+
};
|
|
@@ -103,85 +103,85 @@
|
|
|
103
103
|
height: inherit;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.
|
|
106
|
+
.list-div .list-table {
|
|
107
107
|
width: 100%;
|
|
108
108
|
height: 100%;
|
|
109
109
|
}
|
|
110
|
-
.
|
|
110
|
+
.list-div .list-table td {
|
|
111
111
|
text-align: left;
|
|
112
112
|
}
|
|
113
|
-
.
|
|
113
|
+
.list-div .list-table th {
|
|
114
114
|
font-weight: initial;
|
|
115
115
|
}
|
|
116
|
-
.
|
|
116
|
+
.list-div .list-table .is-whole .list-table-auto {
|
|
117
117
|
width: 100%;
|
|
118
118
|
}
|
|
119
|
-
.
|
|
119
|
+
.list-div .list-table .is-whole .list-table-value {
|
|
120
120
|
width: 100%;
|
|
121
121
|
display: block;
|
|
122
122
|
}
|
|
123
|
-
.
|
|
124
|
-
.
|
|
123
|
+
.list-div .list-table .list-table-td,
|
|
124
|
+
.list-div .list-table .list-table-th {
|
|
125
125
|
padding: 6px;
|
|
126
126
|
}
|
|
127
|
-
.
|
|
127
|
+
.list-div .list-table .list-table-auto {
|
|
128
128
|
display: inline-flex;
|
|
129
129
|
align-items: center;
|
|
130
130
|
}
|
|
131
|
-
.
|
|
131
|
+
.list-div .list-table .list-table-auto .list-table-label {
|
|
132
132
|
white-space: nowrap;
|
|
133
133
|
}
|
|
134
|
-
.
|
|
134
|
+
.list-div .list-table .list-table-th {
|
|
135
135
|
text-align: left;
|
|
136
136
|
}
|
|
137
|
-
.
|
|
137
|
+
.list-div .list-table.right .list-table-th {
|
|
138
138
|
text-align: right;
|
|
139
139
|
}
|
|
140
|
-
.
|
|
140
|
+
.list-div .list-table.center .list-table-th {
|
|
141
141
|
text-align: center;
|
|
142
142
|
}
|
|
143
|
-
.
|
|
143
|
+
.list-div .list-table.auto .list-table-th {
|
|
144
144
|
padding-right: 0;
|
|
145
145
|
}
|
|
146
|
-
.
|
|
146
|
+
.list-div .list-table.top .list-table-th {
|
|
147
147
|
padding-bottom: 0;
|
|
148
148
|
}
|
|
149
|
-
.
|
|
149
|
+
.list-div .list-table.is-aliquots {
|
|
150
150
|
table-layout: fixed;
|
|
151
151
|
}
|
|
152
|
-
.
|
|
153
|
-
border-right: 1px solid var(--
|
|
154
|
-
border-top: 1px solid var(--
|
|
155
|
-
border-bottom: 1px solid var(--
|
|
152
|
+
.list-div .list-table.is-border {
|
|
153
|
+
border-right: 1px solid var(--list-border-color);
|
|
154
|
+
border-top: 1px solid var(--list-border-color);
|
|
155
|
+
border-bottom: 1px solid var(--list-border-color);
|
|
156
156
|
}
|
|
157
|
-
.
|
|
158
|
-
border-bottom: 1px solid var(--
|
|
159
|
-
border-left: 1px solid var(--
|
|
157
|
+
.list-div .list-table.is-border > tr > td {
|
|
158
|
+
border-bottom: 1px solid var(--list-border-color);
|
|
159
|
+
border-left: 1px solid var(--list-border-color);
|
|
160
160
|
}
|
|
161
|
-
.
|
|
162
|
-
border-right: 1px solid var(--
|
|
161
|
+
.list-div .list-table.is-border > tr > td:last-child {
|
|
162
|
+
border-right: 1px solid var(--list-border-color);
|
|
163
163
|
}
|
|
164
|
-
.
|
|
165
|
-
border-left: 1px solid var(--
|
|
166
|
-
border-bottom: 1px solid var(--
|
|
164
|
+
.list-div .list-table.is-border > tr > th {
|
|
165
|
+
border-left: 1px solid var(--list-border-color);
|
|
166
|
+
border-bottom: 1px solid var(--list-border-color);
|
|
167
167
|
}
|
|
168
|
-
.
|
|
169
|
-
border-right: 1px solid var(--
|
|
168
|
+
.list-div .list-table.is-border > tr > th:last-child {
|
|
169
|
+
border-right: 1px solid var(--list-border-color);
|
|
170
170
|
}
|
|
171
|
-
.
|
|
171
|
+
.list-div .list-table.is-border > tr:last-child > td {
|
|
172
172
|
border-bottom: 0;
|
|
173
173
|
}
|
|
174
|
-
.
|
|
174
|
+
.list-div .list-table.is-border > tr:last-child > th {
|
|
175
175
|
border-bottom: 0;
|
|
176
176
|
}
|
|
177
|
-
.
|
|
177
|
+
.list-div .list-table.is-border.top > tr > th {
|
|
178
178
|
border-bottom: 0;
|
|
179
179
|
}
|
|
180
|
-
.
|
|
180
|
+
.list-div .list-table .list-com {
|
|
181
181
|
display: flex;
|
|
182
182
|
align-items: center;
|
|
183
183
|
}
|
|
184
|
-
.
|
|
184
|
+
.list-div .list-table .list-com-img {
|
|
185
185
|
width: 50px;
|
|
186
186
|
height: 50px;
|
|
187
187
|
}
|
|
@@ -200,10 +200,7 @@
|
|
|
200
200
|
}
|
|
201
201
|
.tables-table.is-absolute {
|
|
202
202
|
position: absolute;
|
|
203
|
-
|
|
204
|
-
right: 0;
|
|
205
|
-
bottom: 0;
|
|
206
|
-
left: 0;
|
|
203
|
+
inset: 0;
|
|
207
204
|
}
|
|
208
205
|
|
|
209
206
|
.paging {
|
|
@@ -4,7 +4,7 @@ const vue = require("vue");
|
|
|
4
4
|
const index = require("../../../hooks/cssname/index.cjs");
|
|
5
5
|
const index$4 = require("../../forms/index.cjs");
|
|
6
6
|
const index$7 = require("../../tablesp/index.cjs");
|
|
7
|
-
const index$5 = require("../../
|
|
7
|
+
const index$5 = require("../../list/index.cjs");
|
|
8
8
|
const index$3 = require("../../dialogs/index.cjs");
|
|
9
9
|
const index$6 = require("element-plus/es/components/button/index");
|
|
10
10
|
const index$2 = require("element-plus/es/components/message/index");
|
|
@@ -644,7 +644,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
644
644
|
default: vue.withCtx(() => {
|
|
645
645
|
var _a2;
|
|
646
646
|
return [
|
|
647
|
-
vue.createVNode(vue.unref(index$5.
|
|
647
|
+
vue.createVNode(vue.unref(index$5.List), vue.mergeProps((_a2 = props.config.details) == null ? void 0 : _a2.config, {
|
|
648
648
|
value: details.value,
|
|
649
649
|
options: props.options,
|
|
650
650
|
compons: props.compons,
|
|
@@ -2,7 +2,7 @@ import { defineComponent, useSlots, ref, computed, reactive, watch, createElemen
|
|
|
2
2
|
import { useCssName } from "../../../hooks/cssname/index.js";
|
|
3
3
|
import { Forms } from "../../forms/index.js";
|
|
4
4
|
import { Tablesp } from "../../tablesp/index.js";
|
|
5
|
-
import {
|
|
5
|
+
import { List } from "../../list/index.js";
|
|
6
6
|
import { Dialogs } from "../../dialogs/index.js";
|
|
7
7
|
import { ElButton } from "element-plus/es/components/button/index";
|
|
8
8
|
import { ElMessage } from "element-plus/es/components/message/index";
|
|
@@ -642,7 +642,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
642
642
|
default: withCtx(() => {
|
|
643
643
|
var _a2;
|
|
644
644
|
return [
|
|
645
|
-
createVNode(unref(
|
|
645
|
+
createVNode(unref(List), mergeProps((_a2 = props.config.details) == null ? void 0 : _a2.config, {
|
|
646
646
|
value: details.value,
|
|
647
647
|
options: props.options,
|
|
648
648
|
compons: props.compons,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@use 'element-plus/theme-chalk/src/message-box.scss' as *;
|
|
4
4
|
|
|
5
5
|
@use '../../forms/style/index2.scss' as *;
|
|
6
|
-
// @use '../../
|
|
6
|
+
// @use '../../list/style/index2.scss' as *;
|
|
7
7
|
@use '../../dialog/style/index2.scss' as *;
|
|
8
8
|
@use '../../tablesp/style/index2.scss' as *;
|
|
9
9
|
@use '../index.scss' as *;
|
|
@@ -72,6 +72,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
72
72
|
const pagconfig = vue.ref(mpagconfig);
|
|
73
73
|
const paginat = vue.reactive({
|
|
74
74
|
front: false,
|
|
75
|
+
scroll: false,
|
|
75
76
|
current: 1,
|
|
76
77
|
pageSize: mpagconfig.pageSize,
|
|
77
78
|
order: "",
|
|
@@ -81,6 +82,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
81
82
|
total: 0,
|
|
82
83
|
list: [],
|
|
83
84
|
front: false,
|
|
85
|
+
scroll: false,
|
|
84
86
|
current: 1,
|
|
85
87
|
pageSize: mpagconfig.pageSize,
|
|
86
88
|
order: "",
|
|
@@ -169,6 +171,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
169
171
|
}
|
|
170
172
|
const pagin = config.paginat ?? {};
|
|
171
173
|
paginat.front = pagin.front || false;
|
|
174
|
+
paginat.scroll = pagin.scroll || false;
|
|
172
175
|
paginat.pageSize = pagin.size || mpagconfig.pageSize;
|
|
173
176
|
pagconfig.value = Object.assign({}, mpagconfig, pagin.config || {});
|
|
174
177
|
tableConfig.value = config;
|
|
@@ -287,9 +290,9 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
287
290
|
}
|
|
288
291
|
function toggleCrossPage() {
|
|
289
292
|
var _a2;
|
|
290
|
-
const datas = data.list;
|
|
291
293
|
const cross = (_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage;
|
|
292
|
-
if (cross) {
|
|
294
|
+
if (cross && !paginat.scroll) {
|
|
295
|
+
const datas = data.list;
|
|
293
296
|
const vs = getCrossPageValue();
|
|
294
297
|
if (typeof cross == "string") {
|
|
295
298
|
const iss = vs.map((o) => o[cross]);
|
|
@@ -316,7 +319,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
316
319
|
}
|
|
317
320
|
function getSelectionValue(arr, i) {
|
|
318
321
|
var _a2;
|
|
319
|
-
if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage) {
|
|
322
|
+
if (((_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage) && !paginat.scroll) {
|
|
320
323
|
return getCrossPageValue(arr, i);
|
|
321
324
|
} else {
|
|
322
325
|
return arr;
|
|
@@ -332,13 +335,13 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
332
335
|
emit("selection", getSelectionValue(arr, paginat.current));
|
|
333
336
|
}
|
|
334
337
|
}
|
|
335
|
-
function onRowClick(row
|
|
338
|
+
function onRowClick(row) {
|
|
336
339
|
var _a2, _b2, _c, _d;
|
|
337
340
|
if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.noRowSelect)) {
|
|
338
341
|
const selectable = (_b2 = tableConfig.value.config) == null ? void 0 : _b2.selectable;
|
|
339
342
|
if (selectable) {
|
|
340
|
-
const index = data.list.findIndex((
|
|
341
|
-
|
|
343
|
+
const index = data.list.findIndex((obj) => {
|
|
344
|
+
obj === row;
|
|
342
345
|
});
|
|
343
346
|
if (selectable(row, index)) {
|
|
344
347
|
if ((_c = tableConfig.value.config) == null ? void 0 : _c.isradio) {
|
|
@@ -526,7 +529,11 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
526
529
|
if (((_a3 = tableConfig.value.paginat) == null ? void 0 : _a3.is) && dlist.length > paginat.pageSize) {
|
|
527
530
|
dlist = dlist.slice(0, paginat.pageSize);
|
|
528
531
|
}
|
|
529
|
-
|
|
532
|
+
if (paginat.current != 1 && paginat.scroll) {
|
|
533
|
+
data.list.push(...dlist);
|
|
534
|
+
} else {
|
|
535
|
+
data.list = defaultSort(dlist);
|
|
536
|
+
}
|
|
530
537
|
data.total = (list == null ? void 0 : list.total) || dlist.length;
|
|
531
538
|
toggleCrossPage();
|
|
532
539
|
loading.value = false;
|
|
@@ -580,6 +587,14 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
580
587
|
var _a2;
|
|
581
588
|
return ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.height) ?? "auto";
|
|
582
589
|
});
|
|
590
|
+
const onScroll = () => {
|
|
591
|
+
if (paginat.scroll) {
|
|
592
|
+
if (data.total && data.pageSize * data.current < data.total) {
|
|
593
|
+
paginat.current++;
|
|
594
|
+
getData();
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
};
|
|
583
598
|
return {
|
|
584
599
|
height,
|
|
585
600
|
tableConfig,
|
|
@@ -591,6 +606,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
591
606
|
clean,
|
|
592
607
|
empty,
|
|
593
608
|
loading,
|
|
609
|
+
onScroll,
|
|
594
610
|
onSortChange,
|
|
595
611
|
onListEvents,
|
|
596
612
|
onSelect,
|
|
@@ -102,6 +102,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
102
102
|
paginat?: {
|
|
103
103
|
is?: boolean | undefined;
|
|
104
104
|
size?: number | undefined;
|
|
105
|
+
scroll?: boolean | undefined;
|
|
105
106
|
front?: boolean | undefined;
|
|
106
107
|
config?: {
|
|
107
108
|
[key: string]: any;
|
|
@@ -157,6 +158,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
157
158
|
paginat?: {
|
|
158
159
|
is?: boolean | undefined;
|
|
159
160
|
size?: number | undefined;
|
|
161
|
+
scroll?: boolean | undefined;
|
|
160
162
|
front?: boolean | undefined;
|
|
161
163
|
config?: {
|
|
162
164
|
[key: string]: any;
|
|
@@ -186,6 +188,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
186
188
|
orig?: boolean | undefined;
|
|
187
189
|
compon?: string | object | undefined;
|
|
188
190
|
default?: any;
|
|
191
|
+
value?: any;
|
|
189
192
|
label?: string | /*elided*/ any | undefined;
|
|
190
193
|
hideLabel?: boolean | undefined;
|
|
191
194
|
prop?: string | undefined;
|
|
@@ -217,6 +220,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
217
220
|
orig?: boolean | undefined;
|
|
218
221
|
compon?: string | object | undefined;
|
|
219
222
|
default?: any;
|
|
223
|
+
value?: any;
|
|
220
224
|
label?: string | /*elided*/ any | undefined;
|
|
221
225
|
hideLabel?: boolean | undefined;
|
|
222
226
|
prop?: string | undefined;
|
|
@@ -250,10 +254,11 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
250
254
|
clean: () => void;
|
|
251
255
|
empty: () => void;
|
|
252
256
|
loading: Ref<boolean, boolean>;
|
|
257
|
+
onScroll: () => void;
|
|
253
258
|
onSortChange: (obj: ObjAny) => void;
|
|
254
259
|
onListEvents: (...arr: any) => void;
|
|
255
260
|
onSelect: (s: ObjAny, row: ObjStr) => void;
|
|
256
|
-
onRowClick: (row: ObjAny
|
|
261
|
+
onRowClick: (row: ObjAny) => void;
|
|
257
262
|
onChange: (arr: ObjStr[]) => void;
|
|
258
263
|
pagconfig: Ref<{
|
|
259
264
|
pageSize: number;
|
|
@@ -299,6 +304,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
299
304
|
onCurrentChange: () => void;
|
|
300
305
|
paginat: {
|
|
301
306
|
front: boolean;
|
|
307
|
+
scroll: boolean;
|
|
302
308
|
current: number;
|
|
303
309
|
pageSize: number;
|
|
304
310
|
order: string;
|
|
@@ -306,6 +312,7 @@ export declare const useInit: (props: ExtractPropTypes<typeof dataProps>, emit:
|
|
|
306
312
|
};
|
|
307
313
|
data: {
|
|
308
314
|
front: boolean;
|
|
315
|
+
scroll: boolean;
|
|
309
316
|
current: number;
|
|
310
317
|
pageSize: number;
|
|
311
318
|
order: string;
|
|
@@ -70,6 +70,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
70
70
|
const pagconfig = ref(mpagconfig);
|
|
71
71
|
const paginat = reactive({
|
|
72
72
|
front: false,
|
|
73
|
+
scroll: false,
|
|
73
74
|
current: 1,
|
|
74
75
|
pageSize: mpagconfig.pageSize,
|
|
75
76
|
order: "",
|
|
@@ -79,6 +80,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
79
80
|
total: 0,
|
|
80
81
|
list: [],
|
|
81
82
|
front: false,
|
|
83
|
+
scroll: false,
|
|
82
84
|
current: 1,
|
|
83
85
|
pageSize: mpagconfig.pageSize,
|
|
84
86
|
order: "",
|
|
@@ -167,6 +169,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
167
169
|
}
|
|
168
170
|
const pagin = config.paginat ?? {};
|
|
169
171
|
paginat.front = pagin.front || false;
|
|
172
|
+
paginat.scroll = pagin.scroll || false;
|
|
170
173
|
paginat.pageSize = pagin.size || mpagconfig.pageSize;
|
|
171
174
|
pagconfig.value = Object.assign({}, mpagconfig, pagin.config || {});
|
|
172
175
|
tableConfig.value = config;
|
|
@@ -285,9 +288,9 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
285
288
|
}
|
|
286
289
|
function toggleCrossPage() {
|
|
287
290
|
var _a2;
|
|
288
|
-
const datas = data.list;
|
|
289
291
|
const cross = (_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage;
|
|
290
|
-
if (cross) {
|
|
292
|
+
if (cross && !paginat.scroll) {
|
|
293
|
+
const datas = data.list;
|
|
291
294
|
const vs = getCrossPageValue();
|
|
292
295
|
if (typeof cross == "string") {
|
|
293
296
|
const iss = vs.map((o) => o[cross]);
|
|
@@ -314,7 +317,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
314
317
|
}
|
|
315
318
|
function getSelectionValue(arr, i) {
|
|
316
319
|
var _a2;
|
|
317
|
-
if ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage) {
|
|
320
|
+
if (((_a2 = tableConfig.value.config) == null ? void 0 : _a2.crossPage) && !paginat.scroll) {
|
|
318
321
|
return getCrossPageValue(arr, i);
|
|
319
322
|
} else {
|
|
320
323
|
return arr;
|
|
@@ -330,13 +333,13 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
330
333
|
emit("selection", getSelectionValue(arr, paginat.current));
|
|
331
334
|
}
|
|
332
335
|
}
|
|
333
|
-
function onRowClick(row
|
|
336
|
+
function onRowClick(row) {
|
|
334
337
|
var _a2, _b2, _c, _d;
|
|
335
338
|
if (!((_a2 = tableConfig.value.config) == null ? void 0 : _a2.noRowSelect)) {
|
|
336
339
|
const selectable = (_b2 = tableConfig.value.config) == null ? void 0 : _b2.selectable;
|
|
337
340
|
if (selectable) {
|
|
338
|
-
const index = data.list.findIndex((
|
|
339
|
-
|
|
341
|
+
const index = data.list.findIndex((obj) => {
|
|
342
|
+
obj === row;
|
|
340
343
|
});
|
|
341
344
|
if (selectable(row, index)) {
|
|
342
345
|
if ((_c = tableConfig.value.config) == null ? void 0 : _c.isradio) {
|
|
@@ -524,7 +527,11 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
524
527
|
if (((_a3 = tableConfig.value.paginat) == null ? void 0 : _a3.is) && dlist.length > paginat.pageSize) {
|
|
525
528
|
dlist = dlist.slice(0, paginat.pageSize);
|
|
526
529
|
}
|
|
527
|
-
|
|
530
|
+
if (paginat.current != 1 && paginat.scroll) {
|
|
531
|
+
data.list.push(...dlist);
|
|
532
|
+
} else {
|
|
533
|
+
data.list = defaultSort(dlist);
|
|
534
|
+
}
|
|
528
535
|
data.total = (list == null ? void 0 : list.total) || dlist.length;
|
|
529
536
|
toggleCrossPage();
|
|
530
537
|
loading.value = false;
|
|
@@ -578,6 +585,14 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
578
585
|
var _a2;
|
|
579
586
|
return ((_a2 = tableConfig.value.config) == null ? void 0 : _a2.height) ?? "auto";
|
|
580
587
|
});
|
|
588
|
+
const onScroll = () => {
|
|
589
|
+
if (paginat.scroll) {
|
|
590
|
+
if (data.total && data.pageSize * data.current < data.total) {
|
|
591
|
+
paginat.current++;
|
|
592
|
+
getData();
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
};
|
|
581
596
|
return {
|
|
582
597
|
height,
|
|
583
598
|
tableConfig,
|
|
@@ -589,6 +604,7 @@ const useInit = (props2, emit, refTable, isEl) => {
|
|
|
589
604
|
clean,
|
|
590
605
|
empty,
|
|
591
606
|
loading,
|
|
607
|
+
onScroll,
|
|
592
608
|
onSortChange,
|
|
593
609
|
onListEvents,
|
|
594
610
|
onSelect,
|