yuang-framework-ui-pc 1.1.5 → 1.1.7
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/README.md +1 -0
- package/es/ele-pro-table/index.d.ts +12 -0
- package/es/ele-pro-table/index.js +21 -21
- package/es/ele-pro-table/props.d.ts +5 -0
- package/lib/ele-pro-table/index.cjs +21 -21
- package/lib/ele-pro-table/index.d.ts +12 -0
- package/lib/ele-pro-table/props.d.ts +5 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -141,6 +141,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
141
141
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
142
142
|
flexible: BooleanConstructor;
|
|
143
143
|
showOverflowTooltip: import('vue').PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
|
|
144
|
+
appendFilterPanelTo: StringConstructor;
|
|
145
|
+
scrollbarTabindex: {
|
|
146
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
147
|
+
default: undefined;
|
|
148
|
+
};
|
|
144
149
|
columns: {
|
|
145
150
|
type: import('vue').PropType<Columns>;
|
|
146
151
|
required: boolean;
|
|
@@ -220,6 +225,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
220
225
|
setSelectedRowKeys: (keys?: import('../ele-data-table/types').DataKey[], rows? /** 当前页数据 */: DataItem[]) => void;
|
|
221
226
|
toggleRowExpansionAll: (expanded?: boolean) => void;
|
|
222
227
|
updateSelectedAndChecked: () => void;
|
|
228
|
+
updateKeyChildren: (key?: import('../ele-data-table/types').DataKey | null, rows?: DataItem[]) => void;
|
|
223
229
|
toolsSlotExcludes: string[];
|
|
224
230
|
tableSlotExcludes: string[];
|
|
225
231
|
pageSlotExcludes: string[];
|
|
@@ -388,6 +394,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
388
394
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
389
395
|
flexible: BooleanConstructor;
|
|
390
396
|
showOverflowTooltip: import('vue').PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
|
|
397
|
+
appendFilterPanelTo: StringConstructor;
|
|
398
|
+
scrollbarTabindex: {
|
|
399
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
400
|
+
default: undefined;
|
|
401
|
+
};
|
|
391
402
|
columns: {
|
|
392
403
|
type: import('vue').PropType<Columns>;
|
|
393
404
|
required: boolean;
|
|
@@ -457,6 +468,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
457
468
|
tableLayout: "fixed" | "auto";
|
|
458
469
|
scrollbarAlwaysOn: boolean;
|
|
459
470
|
flexible: boolean;
|
|
471
|
+
scrollbarTabindex: string | number;
|
|
460
472
|
sticky: boolean;
|
|
461
473
|
toolbar: boolean | EleToolbarProps;
|
|
462
474
|
tools: boolean | string[];
|
|
@@ -167,8 +167,8 @@ const _sfc_main = defineComponent({
|
|
|
167
167
|
if (!isFunctionSource.value) {
|
|
168
168
|
const { records, currentPage, totalCount } = reloadData(props.datasource, sorter, paginationProps.value ? tablePage.value : void 0, tableLimit.value);
|
|
169
169
|
cacheData.value = props.datasource;
|
|
170
|
-
tableData.value =
|
|
171
|
-
tablePage.value =
|
|
170
|
+
tableData.value = records;
|
|
171
|
+
tablePage.value = currentPage;
|
|
172
172
|
tableTotal.value = totalCount;
|
|
173
173
|
handleDone({ records, currentPage, totalCount, response: props.datasource });
|
|
174
174
|
return;
|
|
@@ -198,13 +198,13 @@ const _sfc_main = defineComponent({
|
|
|
198
198
|
resolve && console.error(e);
|
|
199
199
|
});
|
|
200
200
|
};
|
|
201
|
-
const requestCallback = (
|
|
201
|
+
const requestCallback = (data, totalCount, parent, response, resolve) => {
|
|
202
202
|
var _a;
|
|
203
|
-
if (!Array.isArray(
|
|
203
|
+
if (!Array.isArray(data)) {
|
|
204
204
|
tableData.value = [];
|
|
205
205
|
tableLoading.value = false;
|
|
206
|
-
if (typeof
|
|
207
|
-
errorText.value =
|
|
206
|
+
if (typeof data === "string" && data) {
|
|
207
|
+
errorText.value = data;
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
210
|
errorText.value = "获取数据失败";
|
|
@@ -213,11 +213,11 @@ const _sfc_main = defineComponent({
|
|
|
213
213
|
}
|
|
214
214
|
if (resolve) {
|
|
215
215
|
if (parent != null) {
|
|
216
|
-
parent[((_a = props.treeProps) == null ? void 0 : _a.children) || "children"] =
|
|
216
|
+
parent[((_a = props.treeProps) == null ? void 0 : _a.children) || "children"] = data;
|
|
217
217
|
}
|
|
218
|
-
resolve(
|
|
218
|
+
resolve(data);
|
|
219
219
|
} else {
|
|
220
|
-
if (isAutoAmend(props.pagination, globalProps.value.pagination) && !
|
|
220
|
+
if (isAutoAmend(props.pagination, globalProps.value.pagination) && !data.length && totalCount && "*" !== totalCount && tablePage.value && tableLimit.value) {
|
|
221
221
|
const maxPage = Math.ceil(totalCount / tableLimit.value);
|
|
222
222
|
if (maxPage && tablePage.value > maxPage) {
|
|
223
223
|
tablePage.value = maxPage;
|
|
@@ -225,8 +225,8 @@ const _sfc_main = defineComponent({
|
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
|
-
tableData.value =
|
|
229
|
-
tableTotal.value = totalCount ||
|
|
228
|
+
tableData.value = data;
|
|
229
|
+
tableTotal.value = totalCount || data.length;
|
|
230
230
|
}
|
|
231
231
|
tableLoading.value = false;
|
|
232
232
|
const result = {
|
|
@@ -286,9 +286,9 @@ const _sfc_main = defineComponent({
|
|
|
286
286
|
reload();
|
|
287
287
|
}
|
|
288
288
|
};
|
|
289
|
-
const handlePageCurrentChange = (
|
|
290
|
-
if (tablePage.value !==
|
|
291
|
-
tablePage.value =
|
|
289
|
+
const handlePageCurrentChange = (page) => {
|
|
290
|
+
if (tablePage.value !== page) {
|
|
291
|
+
tablePage.value = page;
|
|
292
292
|
reload();
|
|
293
293
|
}
|
|
294
294
|
};
|
|
@@ -337,19 +337,19 @@ const _sfc_main = defineComponent({
|
|
|
337
337
|
const getData = () => {
|
|
338
338
|
return tableData.value;
|
|
339
339
|
};
|
|
340
|
-
const setData = (
|
|
341
|
-
tableData.value =
|
|
340
|
+
const setData = (data) => {
|
|
341
|
+
tableData.value = data;
|
|
342
342
|
};
|
|
343
343
|
const goPageByRowKey = (key) => {
|
|
344
344
|
if (!paginationProps.value || tableLimit.value == null || isFunctionSource.value) {
|
|
345
345
|
return;
|
|
346
346
|
}
|
|
347
347
|
const rowKey = tableRowKey.value;
|
|
348
|
-
const
|
|
349
|
-
const index2 =
|
|
350
|
-
const
|
|
351
|
-
if (tablePage.value !==
|
|
352
|
-
reload({ page
|
|
348
|
+
const data = sortData(props.datasource, tableState.sorter);
|
|
349
|
+
const index2 = data.findIndex((d) => getValue(d, rowKey) === key);
|
|
350
|
+
const page = Math.floor(index2 / tableLimit.value) + 1;
|
|
351
|
+
if (tablePage.value !== page) {
|
|
352
|
+
reload({ page });
|
|
353
353
|
}
|
|
354
354
|
};
|
|
355
355
|
const fetch = (callback) => {
|
|
@@ -173,6 +173,11 @@ export declare const proTableProps: {
|
|
|
173
173
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
174
174
|
flexible: BooleanConstructor;
|
|
175
175
|
showOverflowTooltip: PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
|
|
176
|
+
appendFilterPanelTo: StringConstructor;
|
|
177
|
+
scrollbarTabindex: {
|
|
178
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
179
|
+
default: undefined;
|
|
180
|
+
};
|
|
176
181
|
columns: {
|
|
177
182
|
type: PropType<Columns>;
|
|
178
183
|
required: boolean;
|
|
@@ -168,8 +168,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
168
168
|
if (!isFunctionSource.value) {
|
|
169
169
|
const { records, currentPage, totalCount } = util$1.reloadData(props2.datasource, sorter, paginationProps.value ? tablePage.value : void 0, tableLimit.value);
|
|
170
170
|
cacheData.value = props2.datasource;
|
|
171
|
-
tableData.value =
|
|
172
|
-
tablePage.value =
|
|
171
|
+
tableData.value = records;
|
|
172
|
+
tablePage.value = currentPage;
|
|
173
173
|
tableTotal.value = totalCount;
|
|
174
174
|
handleDone({ records, currentPage, totalCount, response: props2.datasource });
|
|
175
175
|
return;
|
|
@@ -199,13 +199,13 @@ const _sfc_main = vue.defineComponent({
|
|
|
199
199
|
resolve && console.error(e);
|
|
200
200
|
});
|
|
201
201
|
};
|
|
202
|
-
const requestCallback = (
|
|
202
|
+
const requestCallback = (data, totalCount, parent, response, resolve) => {
|
|
203
203
|
var _a;
|
|
204
|
-
if (!Array.isArray(
|
|
204
|
+
if (!Array.isArray(data)) {
|
|
205
205
|
tableData.value = [];
|
|
206
206
|
tableLoading.value = false;
|
|
207
|
-
if (typeof
|
|
208
|
-
errorText.value =
|
|
207
|
+
if (typeof data === "string" && data) {
|
|
208
|
+
errorText.value = data;
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
211
|
errorText.value = "获取数据失败";
|
|
@@ -214,11 +214,11 @@ const _sfc_main = vue.defineComponent({
|
|
|
214
214
|
}
|
|
215
215
|
if (resolve) {
|
|
216
216
|
if (parent != null) {
|
|
217
|
-
parent[((_a = props2.treeProps) == null ? void 0 : _a.children) || "children"] =
|
|
217
|
+
parent[((_a = props2.treeProps) == null ? void 0 : _a.children) || "children"] = data;
|
|
218
218
|
}
|
|
219
|
-
resolve(
|
|
219
|
+
resolve(data);
|
|
220
220
|
} else {
|
|
221
|
-
if (util$1.isAutoAmend(props2.pagination, globalProps.value.pagination) && !
|
|
221
|
+
if (util$1.isAutoAmend(props2.pagination, globalProps.value.pagination) && !data.length && totalCount && "*" !== totalCount && tablePage.value && tableLimit.value) {
|
|
222
222
|
const maxPage = Math.ceil(totalCount / tableLimit.value);
|
|
223
223
|
if (maxPage && tablePage.value > maxPage) {
|
|
224
224
|
tablePage.value = maxPage;
|
|
@@ -226,8 +226,8 @@ const _sfc_main = vue.defineComponent({
|
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
tableData.value =
|
|
230
|
-
tableTotal.value = totalCount ||
|
|
229
|
+
tableData.value = data;
|
|
230
|
+
tableTotal.value = totalCount || data.length;
|
|
231
231
|
}
|
|
232
232
|
tableLoading.value = false;
|
|
233
233
|
const result = {
|
|
@@ -287,9 +287,9 @@ const _sfc_main = vue.defineComponent({
|
|
|
287
287
|
reload();
|
|
288
288
|
}
|
|
289
289
|
};
|
|
290
|
-
const handlePageCurrentChange = (
|
|
291
|
-
if (tablePage.value !==
|
|
292
|
-
tablePage.value =
|
|
290
|
+
const handlePageCurrentChange = (page) => {
|
|
291
|
+
if (tablePage.value !== page) {
|
|
292
|
+
tablePage.value = page;
|
|
293
293
|
reload();
|
|
294
294
|
}
|
|
295
295
|
};
|
|
@@ -338,19 +338,19 @@ const _sfc_main = vue.defineComponent({
|
|
|
338
338
|
const getData = () => {
|
|
339
339
|
return tableData.value;
|
|
340
340
|
};
|
|
341
|
-
const setData = (
|
|
342
|
-
tableData.value =
|
|
341
|
+
const setData = (data) => {
|
|
342
|
+
tableData.value = data;
|
|
343
343
|
};
|
|
344
344
|
const goPageByRowKey = (key) => {
|
|
345
345
|
if (!paginationProps.value || tableLimit.value == null || isFunctionSource.value) {
|
|
346
346
|
return;
|
|
347
347
|
}
|
|
348
348
|
const rowKey = tableRowKey.value;
|
|
349
|
-
const
|
|
350
|
-
const index2 =
|
|
351
|
-
const
|
|
352
|
-
if (tablePage.value !==
|
|
353
|
-
reload({ page
|
|
349
|
+
const data = util$1.sortData(props2.datasource, tableState.sorter);
|
|
350
|
+
const index2 = data.findIndex((d) => core.getValue(d, rowKey) === key);
|
|
351
|
+
const page = Math.floor(index2 / tableLimit.value) + 1;
|
|
352
|
+
if (tablePage.value !== page) {
|
|
353
|
+
reload({ page });
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
356
|
const fetch = (callback) => {
|
|
@@ -141,6 +141,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
141
141
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
142
142
|
flexible: BooleanConstructor;
|
|
143
143
|
showOverflowTooltip: import('vue').PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
|
|
144
|
+
appendFilterPanelTo: StringConstructor;
|
|
145
|
+
scrollbarTabindex: {
|
|
146
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
147
|
+
default: undefined;
|
|
148
|
+
};
|
|
144
149
|
columns: {
|
|
145
150
|
type: import('vue').PropType<Columns>;
|
|
146
151
|
required: boolean;
|
|
@@ -220,6 +225,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
220
225
|
setSelectedRowKeys: (keys?: import('../ele-data-table/types').DataKey[], rows? /** 当前页数据 */: DataItem[]) => void;
|
|
221
226
|
toggleRowExpansionAll: (expanded?: boolean) => void;
|
|
222
227
|
updateSelectedAndChecked: () => void;
|
|
228
|
+
updateKeyChildren: (key?: import('../ele-data-table/types').DataKey | null, rows?: DataItem[]) => void;
|
|
223
229
|
toolsSlotExcludes: string[];
|
|
224
230
|
tableSlotExcludes: string[];
|
|
225
231
|
pageSlotExcludes: string[];
|
|
@@ -388,6 +394,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
388
394
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
389
395
|
flexible: BooleanConstructor;
|
|
390
396
|
showOverflowTooltip: import('vue').PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
|
|
397
|
+
appendFilterPanelTo: StringConstructor;
|
|
398
|
+
scrollbarTabindex: {
|
|
399
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
400
|
+
default: undefined;
|
|
401
|
+
};
|
|
391
402
|
columns: {
|
|
392
403
|
type: import('vue').PropType<Columns>;
|
|
393
404
|
required: boolean;
|
|
@@ -457,6 +468,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
457
468
|
tableLayout: "fixed" | "auto";
|
|
458
469
|
scrollbarAlwaysOn: boolean;
|
|
459
470
|
flexible: boolean;
|
|
471
|
+
scrollbarTabindex: string | number;
|
|
460
472
|
sticky: boolean;
|
|
461
473
|
toolbar: boolean | EleToolbarProps;
|
|
462
474
|
tools: boolean | string[];
|
|
@@ -173,6 +173,11 @@ export declare const proTableProps: {
|
|
|
173
173
|
scrollbarAlwaysOn: BooleanConstructor;
|
|
174
174
|
flexible: BooleanConstructor;
|
|
175
175
|
showOverflowTooltip: PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "offset" | "transition" | "placement" | "effect" | "showAfter" | "hideAfter" | "popperOptions" | "enterable" | "popperClass" | "appendTo" | "showArrow">> | undefined>;
|
|
176
|
+
appendFilterPanelTo: StringConstructor;
|
|
177
|
+
scrollbarTabindex: {
|
|
178
|
+
type: (NumberConstructor | StringConstructor)[];
|
|
179
|
+
default: undefined;
|
|
180
|
+
};
|
|
176
181
|
columns: {
|
|
177
182
|
type: PropType<Columns>;
|
|
178
183
|
required: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yuang-framework-ui-pc",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite --host --config vite.global.ts --mode dev",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dayjs": "^1.11.13",
|
|
42
42
|
"echarts": "^5.5.1",
|
|
43
43
|
"echarts-wordcloud": "^2.1.0",
|
|
44
|
-
"element-plus": "^2.8.
|
|
44
|
+
"element-plus": "^2.8.4",
|
|
45
45
|
"eslint": "^8.57.0",
|
|
46
46
|
"eslint-config-prettier": "^9.1.0",
|
|
47
47
|
"eslint-plugin-prettier": "^5.2.1",
|
|
@@ -188,6 +188,6 @@
|
|
|
188
188
|
"repository": "",
|
|
189
189
|
"license": "",
|
|
190
190
|
"dependencies": {
|
|
191
|
-
"yuang-framework-ui-common": "^1.0.
|
|
191
|
+
"yuang-framework-ui-common": "^1.0.29"
|
|
192
192
|
}
|
|
193
193
|
}
|