ele-admin-plus 1.2.0 → 1.2.1-beta.2
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/es/ele-admin-layout/index.d.ts +30 -11
- package/es/ele-admin-layout/index.js +53 -47
- package/es/ele-admin-layout/props.d.ts +14 -1
- package/es/ele-admin-layout/props.js +14 -1
- package/es/ele-admin-layout/style/index.scss +7 -2
- package/es/ele-admin-layout/style/sidebar.scss +2 -0
- package/es/ele-alert/index.d.ts +1 -1
- package/es/ele-alert/index.js +3 -3
- package/es/ele-app/components/message-body.d.ts +7 -1
- package/es/ele-app/components/message-body.js +12 -6
- package/es/ele-app/components/message-box-icon.d.ts +30 -0
- package/es/ele-app/components/message-box-icon.js +63 -0
- package/es/ele-app/el.d.ts +7 -0
- package/es/ele-app/plus.d.ts +3 -0
- package/es/ele-app/style/overwrite/message-box/index.scss +19 -0
- package/es/ele-avatar-group/index.d.ts +4 -4
- package/es/ele-avatar-group/index.js +15 -15
- package/es/ele-basic-select/index.d.ts +5 -5
- package/es/ele-basic-select/index.js +16 -16
- package/es/ele-card/index.js +1 -1
- package/es/ele-check-card/index.d.ts +1 -1
- package/es/ele-check-card/index.js +4 -4
- package/es/ele-copyable/index.d.ts +2 -2
- package/es/ele-copyable/index.js +6 -6
- package/es/ele-cropper/components/cropper-tools.d.ts +3 -3
- package/es/ele-cropper/components/cropper-tools.js +10 -10
- package/es/ele-cropper/index.d.ts +13 -13
- package/es/ele-cropper/index.js +39 -39
- package/es/ele-cropper-modal/index.d.ts +1 -1
- package/es/ele-cropper-modal/index.js +3 -3
- package/es/ele-data-table/util.js +1 -1
- package/es/ele-drawer/index.d.ts +8 -8
- package/es/ele-drawer/index.js +18 -18
- package/es/ele-dropdown/index.d.ts +3 -3
- package/es/ele-dropdown/index.js +9 -9
- package/es/ele-ellipsis/index.d.ts +1 -1
- package/es/ele-ellipsis/index.js +3 -3
- package/es/ele-file-list/components/file-grid-item.d.ts +5 -5
- package/es/ele-file-list/components/file-grid-item.js +15 -15
- package/es/ele-file-list/components/file-grid.d.ts +6 -6
- package/es/ele-file-list/components/file-grid.js +15 -15
- package/es/ele-file-list/components/file-table-item.d.ts +5 -5
- package/es/ele-file-list/components/file-table-item.js +15 -15
- package/es/ele-file-list/components/file-table.d.ts +7 -7
- package/es/ele-file-list/components/file-table.js +19 -19
- package/es/ele-file-list/index.d.ts +6 -6
- package/es/ele-file-list/index.js +22 -22
- package/es/ele-file-list-tool/index.d.ts +1 -1
- package/es/ele-file-list-tool/index.js +2 -2
- package/es/ele-icon-select/components/icon-grid.d.ts +2 -2
- package/es/ele-icon-select/components/icon-grid.js +6 -6
- package/es/ele-icon-select/index.d.ts +7 -7
- package/es/ele-icon-select/index.js +23 -23
- package/es/ele-menus/index.js +15 -15
- package/es/ele-menus/style/index.scss +1 -0
- package/es/ele-menus/util.d.ts +7 -0
- package/es/ele-menus/util.js +49 -26
- package/es/ele-modal/index.d.ts +6 -6
- package/es/ele-modal/index.js +18 -18
- package/es/ele-pagination/index.d.ts +2 -2
- package/es/ele-pagination/index.js +6 -6
- package/es/ele-popconfirm/index.d.ts +7 -17
- package/es/ele-popconfirm/index.js +15 -15
- package/es/ele-popconfirm/props.d.ts +2 -7
- package/es/ele-popover/index.d.ts +7 -17
- package/es/ele-popover/index.js +15 -15
- package/es/ele-popover/props.d.ts +1 -6
- package/es/ele-popover/props.js +1 -0
- package/es/ele-printer/index.d.ts +1 -1
- package/es/ele-printer/index.js +19 -22
- package/es/ele-printer/style/index.scss +2 -2
- package/es/ele-printer/types.d.ts +0 -2
- package/es/ele-printer/util.d.ts +9 -30
- package/es/ele-printer/util.js +118 -109
- package/es/ele-pro-layout/index.d.ts +31 -21
- package/es/ele-pro-layout/index.js +8 -3
- package/es/ele-pro-layout/props.d.ts +11 -1
- package/es/ele-pro-layout/props.js +11 -1
- package/es/ele-pro-table/components/table-tools.d.ts +3 -3
- package/es/ele-pro-table/components/table-tools.js +6 -13
- package/es/ele-pro-table/components/tool-column-list.d.ts +9 -9
- package/es/ele-pro-table/components/tool-column-list.js +33 -33
- package/es/ele-pro-table/components/tool-column.d.ts +24 -38
- package/es/ele-pro-table/components/tool-column.js +80 -102
- package/es/ele-pro-table/components/tool-export.d.ts +4 -4
- package/es/ele-pro-table/components/tool-export.js +28 -40
- package/es/ele-pro-table/components/tool-print.d.ts +10 -7
- package/es/ele-pro-table/components/tool-print.js +36 -46
- package/es/ele-pro-table/index.d.ts +16 -13
- package/es/ele-pro-table/index.js +41 -64
- package/es/ele-pro-table/props.d.ts +2 -2
- package/es/ele-pro-table/props.js +1 -1
- package/es/ele-pro-table/style/index.scss +1 -0
- package/es/ele-pro-table/types.d.ts +3 -3
- package/es/ele-pro-table/util.d.ts +38 -30
- package/es/ele-pro-table/util.js +111 -80
- package/es/ele-qr-code/qrcodegen.js +34 -70
- package/es/ele-segmented/index.d.ts +1 -1
- package/es/ele-segmented/index.js +3 -3
- package/es/ele-split-panel/index.d.ts +1 -1
- package/es/ele-split-panel/index.js +3 -3
- package/es/ele-tab-wrap/components/tab-dropdown.d.ts +1 -1
- package/es/ele-tab-wrap/components/tab-dropdown.js +3 -3
- package/es/ele-table-select/index.d.ts +19 -19
- package/es/ele-table-select/index.js +42 -37
- package/es/ele-tool/index.d.ts +6 -3
- package/es/ele-tool/index.js +35 -32
- package/es/ele-tool/style/index.js +0 -1
- package/es/ele-tool/style/index.scss +0 -13
- package/es/ele-toolbar/index.d.ts +3247 -1
- package/es/ele-toolbar/index.js +44 -5
- package/es/ele-toolbar/props.d.ts +6 -2
- package/es/ele-toolbar/props.js +2 -0
- package/es/ele-toolbar/style/index.js +1 -0
- package/es/ele-toolbar/types.d.ts +15 -0
- package/es/ele-tooltip/index.d.ts +9 -9
- package/es/ele-tooltip/index.js +25 -25
- package/es/ele-tour/index.d.ts +3 -3
- package/es/ele-tour/index.js +10 -10
- package/es/ele-tree-select/index.d.ts +9 -9
- package/es/ele-tree-select/index.js +28 -28
- package/es/ele-upload-list/components/list-item.d.ts +3 -3
- package/es/ele-upload-list/components/list-item.js +7 -7
- package/es/ele-upload-list/index.d.ts +4 -4
- package/es/ele-upload-list/index.js +13 -13
- package/es/ele-virtual-table/components/body-cell.d.ts +8 -8
- package/es/ele-virtual-table/components/body-cell.js +24 -24
- package/es/ele-virtual-table/components/body-row.d.ts +7 -7
- package/es/ele-virtual-table/components/body-row.js +21 -21
- package/es/ele-virtual-table/components/cell-checkbox.d.ts +1 -1
- package/es/ele-virtual-table/components/cell-checkbox.js +3 -3
- package/es/ele-virtual-table/components/cell-filter.d.ts +5 -5
- package/es/ele-virtual-table/components/cell-filter.js +18 -18
- package/es/ele-virtual-table/components/footer-row.d.ts +1 -1
- package/es/ele-virtual-table/components/footer-row.js +3 -3
- package/es/ele-virtual-table/components/header-cell.d.ts +5 -5
- package/es/ele-virtual-table/components/header-cell.js +15 -15
- package/es/ele-virtual-table/components/header-row.d.ts +5 -5
- package/es/ele-virtual-table/components/header-row.js +15 -15
- package/es/ele-virtual-table/index.d.ts +23 -21
- package/es/ele-virtual-table/index.js +50 -48
- package/es/ele-virtual-table/util.js +3 -3
- package/es/ele-watermark/index.js +1 -0
- package/es/icons/MenuOutlined.d.ts +2 -0
- package/es/icons/MenuOutlined.js +32 -0
- package/es/icons/index.d.ts +1 -0
- package/es/icons/index.js +84 -82
- package/es/style/themes/default.scss +8 -8
- package/es/style/themes/rounded.scss +1 -7
- package/es/utils/core.d.ts +7 -1
- package/es/utils/message-box.js +28 -2
- package/es/utils/message.js +36 -13
- package/lib/components.cjs +4 -5
- package/lib/core-export.cjs +28 -35
- package/lib/core.cjs +8 -10
- package/lib/ele-admin-layout/index.cjs +53 -47
- package/lib/ele-admin-layout/index.d.ts +30 -11
- package/lib/ele-admin-layout/props.cjs +14 -1
- package/lib/ele-admin-layout/props.d.ts +14 -1
- package/lib/ele-admin-layout/style/index.scss +7 -2
- package/lib/ele-admin-layout/style/sidebar.scss +2 -0
- package/lib/ele-alert/index.cjs +3 -3
- package/lib/ele-alert/index.d.ts +1 -1
- package/lib/ele-app/components/message-body.cjs +11 -5
- package/lib/ele-app/components/message-body.d.ts +7 -1
- package/lib/ele-app/components/message-box-icon.cjs +62 -0
- package/lib/ele-app/components/message-box-icon.d.ts +30 -0
- package/lib/ele-app/el.d.ts +7 -0
- package/lib/ele-app/plus.d.ts +3 -0
- package/lib/ele-app/style/overwrite/message-box/index.scss +19 -0
- package/lib/ele-avatar-group/index.cjs +15 -15
- package/lib/ele-avatar-group/index.d.ts +4 -4
- package/lib/ele-basic-select/index.cjs +16 -16
- package/lib/ele-basic-select/index.d.ts +5 -5
- package/lib/ele-card/index.cjs +1 -1
- package/lib/ele-check-card/index.cjs +4 -4
- package/lib/ele-check-card/index.d.ts +1 -1
- package/lib/ele-copyable/index.cjs +6 -6
- package/lib/ele-copyable/index.d.ts +2 -2
- package/lib/ele-cropper/components/cropper-tools.cjs +10 -10
- package/lib/ele-cropper/components/cropper-tools.d.ts +3 -3
- package/lib/ele-cropper/index.cjs +39 -39
- package/lib/ele-cropper/index.d.ts +13 -13
- package/lib/ele-cropper-modal/index.cjs +3 -3
- package/lib/ele-cropper-modal/index.d.ts +1 -1
- package/lib/ele-data-table/util.cjs +1 -1
- package/lib/ele-drawer/index.cjs +18 -18
- package/lib/ele-drawer/index.d.ts +8 -8
- package/lib/ele-dropdown/index.cjs +9 -9
- package/lib/ele-dropdown/index.d.ts +3 -3
- package/lib/ele-ellipsis/index.cjs +3 -3
- package/lib/ele-ellipsis/index.d.ts +1 -1
- package/lib/ele-file-list/components/file-grid-item.cjs +15 -15
- package/lib/ele-file-list/components/file-grid-item.d.ts +5 -5
- package/lib/ele-file-list/components/file-grid.cjs +15 -15
- package/lib/ele-file-list/components/file-grid.d.ts +6 -6
- package/lib/ele-file-list/components/file-table-item.cjs +15 -15
- package/lib/ele-file-list/components/file-table-item.d.ts +5 -5
- package/lib/ele-file-list/components/file-table.cjs +19 -19
- package/lib/ele-file-list/components/file-table.d.ts +7 -7
- package/lib/ele-file-list/index.cjs +22 -22
- package/lib/ele-file-list/index.d.ts +6 -6
- package/lib/ele-file-list-tool/index.cjs +2 -2
- package/lib/ele-file-list-tool/index.d.ts +1 -1
- package/lib/ele-icon-select/components/icon-grid.cjs +6 -6
- package/lib/ele-icon-select/components/icon-grid.d.ts +2 -2
- package/lib/ele-icon-select/index.cjs +23 -23
- package/lib/ele-icon-select/index.d.ts +7 -7
- package/lib/ele-menus/index.cjs +15 -15
- package/lib/ele-menus/style/index.scss +1 -0
- package/lib/ele-menus/util.cjs +49 -26
- package/lib/ele-menus/util.d.ts +7 -0
- package/lib/ele-modal/index.cjs +18 -18
- package/lib/ele-modal/index.d.ts +6 -6
- package/lib/ele-pagination/index.cjs +6 -6
- package/lib/ele-pagination/index.d.ts +2 -2
- package/lib/ele-popconfirm/index.cjs +15 -15
- package/lib/ele-popconfirm/index.d.ts +7 -17
- package/lib/ele-popconfirm/props.d.ts +2 -7
- package/lib/ele-popover/index.cjs +15 -15
- package/lib/ele-popover/index.d.ts +7 -17
- package/lib/ele-popover/props.cjs +1 -0
- package/lib/ele-popover/props.d.ts +1 -6
- package/lib/ele-printer/index.cjs +17 -20
- package/lib/ele-printer/index.d.ts +1 -1
- package/lib/ele-printer/style/index.scss +2 -2
- package/lib/ele-printer/types.d.ts +0 -2
- package/lib/ele-printer/util.cjs +118 -109
- package/lib/ele-printer/util.d.ts +9 -30
- package/lib/ele-pro-layout/index.cjs +8 -3
- package/lib/ele-pro-layout/index.d.ts +31 -21
- package/lib/ele-pro-layout/props.cjs +11 -1
- package/lib/ele-pro-layout/props.d.ts +11 -1
- package/lib/ele-pro-table/components/table-tools.cjs +6 -13
- package/lib/ele-pro-table/components/table-tools.d.ts +3 -3
- package/lib/ele-pro-table/components/tool-column-list.cjs +33 -33
- package/lib/ele-pro-table/components/tool-column-list.d.ts +9 -9
- package/lib/ele-pro-table/components/tool-column.cjs +79 -101
- package/lib/ele-pro-table/components/tool-column.d.ts +24 -38
- package/lib/ele-pro-table/components/tool-export.cjs +28 -40
- package/lib/ele-pro-table/components/tool-export.d.ts +4 -4
- package/lib/ele-pro-table/components/tool-print.cjs +36 -46
- package/lib/ele-pro-table/components/tool-print.d.ts +10 -7
- package/lib/ele-pro-table/index.cjs +41 -64
- package/lib/ele-pro-table/index.d.ts +16 -13
- package/lib/ele-pro-table/props.cjs +1 -1
- package/lib/ele-pro-table/props.d.ts +2 -2
- package/lib/ele-pro-table/style/index.scss +1 -0
- package/lib/ele-pro-table/types.d.ts +3 -3
- package/lib/ele-pro-table/util.cjs +111 -80
- package/lib/ele-pro-table/util.d.ts +38 -30
- package/lib/ele-qr-code/qrcodegen.cjs +34 -70
- package/lib/ele-segmented/index.cjs +3 -3
- package/lib/ele-segmented/index.d.ts +1 -1
- package/lib/ele-split-panel/index.cjs +3 -3
- package/lib/ele-split-panel/index.d.ts +1 -1
- package/lib/ele-tab-wrap/components/tab-dropdown.cjs +3 -3
- package/lib/ele-tab-wrap/components/tab-dropdown.d.ts +1 -1
- package/lib/ele-table-select/index.cjs +42 -37
- package/lib/ele-table-select/index.d.ts +19 -19
- package/lib/ele-tool/index.cjs +34 -31
- package/lib/ele-tool/index.d.ts +6 -3
- package/lib/ele-tool/style/index.cjs +0 -1
- package/lib/ele-tool/style/index.scss +0 -13
- package/lib/ele-toolbar/index.cjs +42 -3
- package/lib/ele-toolbar/index.d.ts +3247 -1
- package/lib/ele-toolbar/props.cjs +2 -0
- package/lib/ele-toolbar/props.d.ts +6 -2
- package/lib/ele-toolbar/style/index.cjs +1 -0
- package/lib/ele-toolbar/types.d.ts +15 -0
- package/lib/ele-tooltip/index.cjs +25 -25
- package/lib/ele-tooltip/index.d.ts +9 -9
- package/lib/ele-tour/index.cjs +10 -10
- package/lib/ele-tour/index.d.ts +3 -3
- package/lib/ele-tree-select/index.cjs +28 -28
- package/lib/ele-tree-select/index.d.ts +9 -9
- package/lib/ele-upload-list/components/list-item.cjs +7 -7
- package/lib/ele-upload-list/components/list-item.d.ts +3 -3
- package/lib/ele-upload-list/index.cjs +13 -13
- package/lib/ele-upload-list/index.d.ts +4 -4
- package/lib/ele-virtual-table/components/body-cell.cjs +24 -24
- package/lib/ele-virtual-table/components/body-cell.d.ts +8 -8
- package/lib/ele-virtual-table/components/body-row.cjs +21 -21
- package/lib/ele-virtual-table/components/body-row.d.ts +7 -7
- package/lib/ele-virtual-table/components/cell-checkbox.cjs +3 -3
- package/lib/ele-virtual-table/components/cell-checkbox.d.ts +1 -1
- package/lib/ele-virtual-table/components/cell-filter.cjs +18 -18
- package/lib/ele-virtual-table/components/cell-filter.d.ts +5 -5
- package/lib/ele-virtual-table/components/footer-row.cjs +3 -3
- package/lib/ele-virtual-table/components/footer-row.d.ts +1 -1
- package/lib/ele-virtual-table/components/header-cell.cjs +15 -15
- package/lib/ele-virtual-table/components/header-cell.d.ts +5 -5
- package/lib/ele-virtual-table/components/header-row.cjs +15 -15
- package/lib/ele-virtual-table/components/header-row.d.ts +5 -5
- package/lib/ele-virtual-table/index.cjs +50 -48
- package/lib/ele-virtual-table/index.d.ts +23 -21
- package/lib/ele-virtual-table/util.cjs +3 -3
- package/lib/ele-watermark/index.cjs +1 -0
- package/lib/icons/MenuOutlined.cjs +31 -0
- package/lib/icons/MenuOutlined.d.ts +2 -0
- package/lib/icons/index.cjs +2 -0
- package/lib/icons/index.d.ts +1 -0
- package/lib/index.cjs +8 -10
- package/lib/style/themes/default.scss +8 -8
- package/lib/style/themes/rounded.scss +1 -7
- package/lib/utils/core.d.ts +7 -1
- package/lib/utils/message-box.cjs +27 -1
- package/lib/utils/message.cjs +35 -12
- package/package.json +11 -11
|
@@ -9,6 +9,7 @@ import BodyRow from "./components/body-row";
|
|
|
9
9
|
import ExpandRow from "./components/expand-row";
|
|
10
10
|
import FooterRow from "./components/footer-row";
|
|
11
11
|
import { virtualTableProps, virtualTableEmits } from "./props";
|
|
12
|
+
const ownSlots = ["default", "empty", "append"];
|
|
12
13
|
const _sfc_main = defineComponent({
|
|
13
14
|
name: "EleVirtualTable",
|
|
14
15
|
components: {
|
|
@@ -265,20 +266,20 @@ const _sfc_main = defineComponent({
|
|
|
265
266
|
tableTooltipProps.visible = false;
|
|
266
267
|
tableTooltipProps.disabled = true;
|
|
267
268
|
};
|
|
268
|
-
const
|
|
269
|
+
const handleTableFilterChange = (params) => {
|
|
269
270
|
const key = getColKey(params.column);
|
|
270
271
|
if (key) {
|
|
271
272
|
filtered[key] = params.value;
|
|
272
273
|
events.onFilterChange(filtered);
|
|
273
274
|
}
|
|
274
275
|
};
|
|
275
|
-
const
|
|
276
|
+
const handleCellCheckedChange = (row, checked) => {
|
|
276
277
|
toggleSelected(row.rowData, row.rowId, checked);
|
|
277
278
|
const selection = getSelectionRows();
|
|
278
279
|
events.onSelect(selection, row.rowData);
|
|
279
280
|
events.onSelectionChange(selection);
|
|
280
281
|
};
|
|
281
|
-
const
|
|
282
|
+
const handleCellExpandChange = (row, expanded, children) => {
|
|
282
283
|
if (expanded && children != null) {
|
|
283
284
|
const childs = transformTableData(
|
|
284
285
|
children,
|
|
@@ -305,7 +306,7 @@ const _sfc_main = defineComponent({
|
|
|
305
306
|
}
|
|
306
307
|
toggleRowExpansion(row, expanded);
|
|
307
308
|
};
|
|
308
|
-
const
|
|
309
|
+
const handleCellClick = (row, col, e) => {
|
|
309
310
|
const cell = e.currentTarget;
|
|
310
311
|
const rowData = row.rowData;
|
|
311
312
|
const rowDataKey = row.rowId;
|
|
@@ -330,26 +331,26 @@ const _sfc_main = defineComponent({
|
|
|
330
331
|
}
|
|
331
332
|
events.onRowClick(rowData, col, e);
|
|
332
333
|
};
|
|
333
|
-
const
|
|
334
|
+
const handleCellDblclick = (row, col, e) => {
|
|
334
335
|
const cell = e.currentTarget;
|
|
335
336
|
events.onCellDblclick(row.rowData, col, cell, e);
|
|
336
337
|
events.onRowDblclick(row.rowData, col, e);
|
|
337
338
|
};
|
|
338
|
-
const
|
|
339
|
+
const handleCellContextmenu = (row, col, e) => {
|
|
339
340
|
const cell = e.currentTarget;
|
|
340
341
|
events.onCellContextmenu(row.rowData, col, cell, e);
|
|
341
342
|
events.onRowContextmenu(row.rowData, col, e);
|
|
342
343
|
};
|
|
343
|
-
const
|
|
344
|
+
const handleCellMouseenter = (row, col, e) => {
|
|
344
345
|
const cell = e.currentTarget;
|
|
345
346
|
triggerTooltip(cell, col);
|
|
346
347
|
events.onCellMouseEnter(row.rowData, col, cell, e);
|
|
347
348
|
};
|
|
348
|
-
const
|
|
349
|
+
const handleCellMouseleave = (row, col, e) => {
|
|
349
350
|
const cell = e.currentTarget;
|
|
350
351
|
events.onCellMouseLeave(row.rowData, col, cell, e);
|
|
351
352
|
};
|
|
352
|
-
const
|
|
353
|
+
const handleHeaderCellClick = (col, e) => {
|
|
353
354
|
if (col && (col.sortable === true || col.sortable === "custom")) {
|
|
354
355
|
sortBy.value = getSortBy(sortBy.value, col);
|
|
355
356
|
events.onSortChange({
|
|
@@ -360,22 +361,22 @@ const _sfc_main = defineComponent({
|
|
|
360
361
|
}
|
|
361
362
|
events.onHeaderClick(col, e);
|
|
362
363
|
};
|
|
363
|
-
const
|
|
364
|
+
const handleHeaderCellContextmenu = (col, e) => {
|
|
364
365
|
events.onHeaderContextmenu(col, e);
|
|
365
366
|
};
|
|
366
|
-
const
|
|
367
|
+
const handleHeaderCellMouseenter = () => {
|
|
367
368
|
hideTooltip();
|
|
368
369
|
};
|
|
369
|
-
const
|
|
370
|
+
const handleFooterCellMouseenter = (e) => {
|
|
370
371
|
triggerTooltip(e.currentTarget, { showOverflowTooltip: true });
|
|
371
372
|
};
|
|
372
|
-
const
|
|
373
|
+
const handleExpandCellMouseenter = () => {
|
|
373
374
|
hideTooltip();
|
|
374
375
|
};
|
|
375
|
-
const
|
|
376
|
+
const handleTableMouseleave = () => {
|
|
376
377
|
hideTooltip();
|
|
377
378
|
};
|
|
378
|
-
const
|
|
379
|
+
const handleTableScroll = (option) => {
|
|
379
380
|
tableState.scrollTop = option.scrollTop;
|
|
380
381
|
const scrollLeft = option.scrollLeft;
|
|
381
382
|
if (tableScrollLeft.value !== scrollLeft) {
|
|
@@ -896,6 +897,7 @@ const _sfc_main = defineComponent({
|
|
|
896
897
|
}
|
|
897
898
|
);
|
|
898
899
|
return {
|
|
900
|
+
ownSlots,
|
|
899
901
|
rootRef,
|
|
900
902
|
tableRef,
|
|
901
903
|
tableKey,
|
|
@@ -928,21 +930,21 @@ const _sfc_main = defineComponent({
|
|
|
928
930
|
tableEmptyProps,
|
|
929
931
|
isLayoutFixedHead,
|
|
930
932
|
isLayoutMaximized,
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
933
|
+
handleTableFilterChange,
|
|
934
|
+
handleCellCheckedChange,
|
|
935
|
+
handleCellExpandChange,
|
|
936
|
+
handleCellClick,
|
|
937
|
+
handleCellDblclick,
|
|
938
|
+
handleCellContextmenu,
|
|
939
|
+
handleCellMouseenter,
|
|
940
|
+
handleCellMouseleave,
|
|
941
|
+
handleHeaderCellClick,
|
|
942
|
+
handleHeaderCellContextmenu,
|
|
943
|
+
handleHeaderCellMouseenter,
|
|
944
|
+
handleFooterCellMouseenter,
|
|
945
|
+
handleExpandCellMouseenter,
|
|
946
|
+
handleTableMouseleave,
|
|
947
|
+
handleTableScroll,
|
|
946
948
|
updateWrapSize,
|
|
947
949
|
updateTableData,
|
|
948
950
|
updateSelectedAndChecked,
|
|
@@ -1006,12 +1008,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1006
1008
|
{ "is-small": _ctx.size === "small" },
|
|
1007
1009
|
{ "is-large": _ctx.size === "large" }
|
|
1008
1010
|
]),
|
|
1009
|
-
onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.
|
|
1011
|
+
onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.handleTableMouseleave && _ctx.handleTableMouseleave(...args))
|
|
1010
1012
|
}, [
|
|
1011
1013
|
_ctx.tableProps.width ? (openBlock(), createBlock(_component_ElTableV2, mergeProps({ key: 0 }, _ctx.tableProps, {
|
|
1012
1014
|
key: _ctx.tableKey,
|
|
1013
1015
|
ref: "tableRef",
|
|
1014
|
-
onScroll: _ctx.
|
|
1016
|
+
onScroll: _ctx.handleTableScroll
|
|
1015
1017
|
}), createSlots({
|
|
1016
1018
|
header: withCtx((headerProps) => [
|
|
1017
1019
|
headerProps && _ctx.headerRows[headerProps.headerIndex] ? (openBlock(), createBlock(_component_HeaderRow, {
|
|
@@ -1030,13 +1032,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1030
1032
|
headerEllipsis: true,
|
|
1031
1033
|
rowHeight: _ctx.tableRowHeight,
|
|
1032
1034
|
onCheckedChange: _cache[0] || (_cache[0] = ($event) => _ctx.toggleAllSelection()),
|
|
1033
|
-
onFilterChange: _ctx.
|
|
1034
|
-
onCellClick: _ctx.
|
|
1035
|
-
onCellContextmenu: _ctx.
|
|
1036
|
-
onCellMouseenter: _ctx.
|
|
1035
|
+
onFilterChange: _ctx.handleTableFilterChange,
|
|
1036
|
+
onCellClick: _ctx.handleHeaderCellClick,
|
|
1037
|
+
onCellContextmenu: _ctx.handleHeaderCellContextmenu,
|
|
1038
|
+
onCellMouseenter: _ctx.handleHeaderCellMouseenter
|
|
1037
1039
|
}, createSlots({ _: 2 }, [
|
|
1038
1040
|
renderList(Object.keys(_ctx.$slots).filter(
|
|
1039
|
-
(k) => !
|
|
1041
|
+
(k) => !_ctx.ownSlots.includes(k)
|
|
1040
1042
|
), (name) => {
|
|
1041
1043
|
return {
|
|
1042
1044
|
name,
|
|
@@ -1055,10 +1057,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1055
1057
|
column: (_a = _ctx.tableExpandCol) == null ? void 0 : _a.originalCol,
|
|
1056
1058
|
rowIndex: rowProps.rowData.rowIndex,
|
|
1057
1059
|
rowData: rowProps.rowData.rowData,
|
|
1058
|
-
onMouseenter: _ctx.
|
|
1060
|
+
onMouseenter: _ctx.handleExpandCellMouseenter
|
|
1059
1061
|
}, createSlots({ _: 2 }, [
|
|
1060
1062
|
renderList(Object.keys(_ctx.$slots).filter(
|
|
1061
|
-
(k) => !
|
|
1063
|
+
(k) => !_ctx.ownSlots.includes(k)
|
|
1062
1064
|
), (name) => {
|
|
1063
1065
|
return {
|
|
1064
1066
|
name,
|
|
@@ -1090,16 +1092,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1090
1092
|
indent: _ctx.indent,
|
|
1091
1093
|
fixedCellHeight: _ctx.hasExpandCol,
|
|
1092
1094
|
autoRowHeight: _ctx.autoRowHeight,
|
|
1093
|
-
onCellCheckedChange: _ctx.
|
|
1094
|
-
onCellExpandChange: _ctx.
|
|
1095
|
-
onCellClick: _ctx.
|
|
1096
|
-
onCellDblclick: _ctx.
|
|
1097
|
-
onCellContextmenu: _ctx.
|
|
1098
|
-
onCellMouseenter: _ctx.
|
|
1099
|
-
onCellMouseleave: _ctx.
|
|
1095
|
+
onCellCheckedChange: _ctx.handleCellCheckedChange,
|
|
1096
|
+
onCellExpandChange: _ctx.handleCellExpandChange,
|
|
1097
|
+
onCellClick: _ctx.handleCellClick,
|
|
1098
|
+
onCellDblclick: _ctx.handleCellDblclick,
|
|
1099
|
+
onCellContextmenu: _ctx.handleCellContextmenu,
|
|
1100
|
+
onCellMouseenter: _ctx.handleCellMouseenter,
|
|
1101
|
+
onCellMouseleave: _ctx.handleCellMouseleave
|
|
1100
1102
|
}, createSlots({ _: 2 }, [
|
|
1101
1103
|
renderList(Object.keys(_ctx.$slots).filter(
|
|
1102
|
-
(k) => !
|
|
1104
|
+
(k) => !_ctx.ownSlots.includes(k)
|
|
1103
1105
|
), (name) => {
|
|
1104
1106
|
return {
|
|
1105
1107
|
name,
|
|
@@ -1132,7 +1134,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1132
1134
|
rowHeight: _ctx.tableRowHeight,
|
|
1133
1135
|
sumText: _ctx.tableSumText,
|
|
1134
1136
|
summaryMethod: _ctx.summaryMethod,
|
|
1135
|
-
onMouseenter: _ctx.
|
|
1137
|
+
onMouseenter: _ctx.handleFooterCellMouseenter
|
|
1136
1138
|
}, null, 8, ["bodyCols", "colSizes", "sumWidth", "tableData", "rowHeight", "sumText", "summaryMethod", "onMouseenter"])
|
|
1137
1139
|
]),
|
|
1138
1140
|
key: "0"
|
|
@@ -100,9 +100,9 @@ function analyseColumns(columns) {
|
|
|
100
100
|
return { cols, rows };
|
|
101
101
|
}
|
|
102
102
|
const sortedCols = [...columns];
|
|
103
|
-
sortedCols.sort(
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
sortedCols.sort(
|
|
104
|
+
(a, b) => getColFixedNumber(a.fixed) - getColFixedNumber(b.fixed)
|
|
105
|
+
);
|
|
106
106
|
generateRowCols(sortedCols, cols, rows, 0);
|
|
107
107
|
computeFixedCols(cols);
|
|
108
108
|
rows.forEach((row, i) => {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode } from "vue";
|
|
2
|
+
const _sfc_main = defineComponent({
|
|
3
|
+
name: "MenuOutlined"
|
|
4
|
+
});
|
|
5
|
+
const _export_sfc = (sfc, props) => {
|
|
6
|
+
const target = sfc.__vccOpts || sfc;
|
|
7
|
+
for (const [key, val] of props) {
|
|
8
|
+
target[key] = val;
|
|
9
|
+
}
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_1 = {
|
|
13
|
+
viewBox: "0 0 48 48",
|
|
14
|
+
fill: "none",
|
|
15
|
+
stroke: "currentColor",
|
|
16
|
+
"stroke-width": "4"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", { d: "M3 7H45" }, null, -1);
|
|
19
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", { d: "M3 24H44" }, null, -1);
|
|
20
|
+
const _hoisted_4 = /* @__PURE__ */ createElementVNode("path", { d: "M3 41H45" }, null, -1);
|
|
21
|
+
const _hoisted_5 = [
|
|
22
|
+
_hoisted_2,
|
|
23
|
+
_hoisted_3,
|
|
24
|
+
_hoisted_4
|
|
25
|
+
];
|
|
26
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
27
|
+
return openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_5);
|
|
28
|
+
}
|
|
29
|
+
const MenuOutlined = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
30
|
+
export {
|
|
31
|
+
MenuOutlined as default
|
|
32
|
+
};
|
package/es/icons/index.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export { default as LogOutlined } from './LogOutlined';
|
|
|
65
65
|
export { default as MailOutlined } from './MailOutlined';
|
|
66
66
|
export { default as LogoutOutlined } from './LogoutOutlined';
|
|
67
67
|
export { default as MenuFoldOutlined } from './MenuFoldOutlined';
|
|
68
|
+
export { default as MenuOutlined } from './MenuOutlined';
|
|
68
69
|
export { default as MenuUnfoldOutlined } from './MenuUnfoldOutlined';
|
|
69
70
|
export { default as MessageOutlined } from './MessageOutlined';
|
|
70
71
|
export { default as MinusCircleOutlined } from './MinusCircleOutlined';
|
package/es/icons/index.js
CHANGED
|
@@ -65,47 +65,48 @@ import { default as default65 } from "./LogOutlined";
|
|
|
65
65
|
import { default as default66 } from "./MailOutlined";
|
|
66
66
|
import { default as default67 } from "./LogoutOutlined";
|
|
67
67
|
import { default as default68 } from "./MenuFoldOutlined";
|
|
68
|
-
import { default as default69 } from "./
|
|
69
|
-
import { default as default70 } from "./
|
|
70
|
-
import { default as default71 } from "./
|
|
71
|
-
import { default as default72 } from "./
|
|
72
|
-
import { default as default73 } from "./
|
|
73
|
-
import { default as default74 } from "./
|
|
74
|
-
import { default as default75 } from "./
|
|
75
|
-
import { default as default76 } from "./
|
|
76
|
-
import { default as default77 } from "./
|
|
77
|
-
import { default as default78 } from "./
|
|
78
|
-
import { default as default79 } from "./
|
|
79
|
-
import { default as default80 } from "./
|
|
80
|
-
import { default as default81 } from "./
|
|
81
|
-
import { default as default82 } from "./
|
|
82
|
-
import { default as default83 } from "./
|
|
83
|
-
import { default as default84 } from "./
|
|
84
|
-
import { default as default85 } from "./
|
|
85
|
-
import { default as default86 } from "./
|
|
86
|
-
import { default as default87 } from "./
|
|
87
|
-
import { default as default88 } from "./
|
|
88
|
-
import { default as default89 } from "./
|
|
89
|
-
import { default as default90 } from "./
|
|
90
|
-
import { default as default91 } from "./
|
|
91
|
-
import { default as default92 } from "./
|
|
92
|
-
import { default as default93 } from "./
|
|
93
|
-
import { default as default94 } from "./
|
|
94
|
-
import { default as default95 } from "./
|
|
95
|
-
import { default as default96 } from "./
|
|
96
|
-
import { default as default97 } from "./
|
|
97
|
-
import { default as default98 } from "./
|
|
98
|
-
import { default as default99 } from "./
|
|
99
|
-
import { default as default100 } from "./
|
|
100
|
-
import { default as default101 } from "./
|
|
101
|
-
import { default as default102 } from "./
|
|
102
|
-
import { default as default103 } from "./
|
|
103
|
-
import { default as default104 } from "./
|
|
104
|
-
import { default as default105 } from "./
|
|
105
|
-
import { default as default106 } from "./
|
|
106
|
-
import { default as default107 } from "./
|
|
107
|
-
import { default as default108 } from "./
|
|
108
|
-
import { default as default109 } from "./
|
|
68
|
+
import { default as default69 } from "./MenuOutlined";
|
|
69
|
+
import { default as default70 } from "./MenuUnfoldOutlined";
|
|
70
|
+
import { default as default71 } from "./MessageOutlined";
|
|
71
|
+
import { default as default72 } from "./MinusCircleOutlined";
|
|
72
|
+
import { default as default73 } from "./MobileOutlined";
|
|
73
|
+
import { default as default74 } from "./MoonOutlined";
|
|
74
|
+
import { default as default75 } from "./MoreOutlined";
|
|
75
|
+
import { default as default76 } from "./PauseFilled";
|
|
76
|
+
import { default as default77 } from "./PieChartOutlined";
|
|
77
|
+
import { default as default78 } from "./PlayFilled";
|
|
78
|
+
import { default as default79 } from "./PlusCircleOutlined";
|
|
79
|
+
import { default as default80 } from "./PlusOutlined";
|
|
80
|
+
import { default as default81 } from "./PrinterOutlined";
|
|
81
|
+
import { default as default82 } from "./ProtectOutlined";
|
|
82
|
+
import { default as default83 } from "./QuestionCircleFilled";
|
|
83
|
+
import { default as default84 } from "./QuestionCircleOutlined";
|
|
84
|
+
import { default as default85 } from "./ReloadOutlined";
|
|
85
|
+
import { default as default86 } from "./ResizeOutlined";
|
|
86
|
+
import { default as default87 } from "./SearchOutlined";
|
|
87
|
+
import { default as default88 } from "./SettingOutlined";
|
|
88
|
+
import { default as default89 } from "./ShoppingOutlined";
|
|
89
|
+
import { default as default90 } from "./SortOutlined";
|
|
90
|
+
import { default as default91 } from "./StarFilled";
|
|
91
|
+
import { default as default92 } from "./StepBackwardFilled";
|
|
92
|
+
import { default as default93 } from "./StepForwardFilled";
|
|
93
|
+
import { default as default94 } from "./SuitcaseOutlined";
|
|
94
|
+
import { default as default95 } from "./SunOutlined";
|
|
95
|
+
import { default as default96 } from "./SwapOutlined";
|
|
96
|
+
import { default as default97 } from "./SyncOutlined";
|
|
97
|
+
import { default as default98 } from "./TableOutlined";
|
|
98
|
+
import { default as default99 } from "./TagOutlined";
|
|
99
|
+
import { default as default100 } from "./TimerOutlined";
|
|
100
|
+
import { default as default101 } from "./UndoOutlined";
|
|
101
|
+
import { default as default102 } from "./UnlockOutlined";
|
|
102
|
+
import { default as default103 } from "./UploadOutlined";
|
|
103
|
+
import { default as default104 } from "./UserOutlined";
|
|
104
|
+
import { default as default105 } from "./VerticalAlignMiddleOutlined";
|
|
105
|
+
import { default as default106 } from "./VerticalLeftOutlined";
|
|
106
|
+
import { default as default107 } from "./VerticalRightOutlined";
|
|
107
|
+
import { default as default108 } from "./WarningOutlined";
|
|
108
|
+
import { default as default109 } from "./ZoomInOutlined";
|
|
109
|
+
import { default as default110 } from "./ZoomOutOutlined";
|
|
109
110
|
export {
|
|
110
111
|
default2 as AnalysisOutlined,
|
|
111
112
|
default3 as ApplicationOutlined,
|
|
@@ -174,45 +175,46 @@ export {
|
|
|
174
175
|
default67 as LogoutOutlined,
|
|
175
176
|
default66 as MailOutlined,
|
|
176
177
|
default68 as MenuFoldOutlined,
|
|
177
|
-
default69 as
|
|
178
|
-
default70 as
|
|
179
|
-
default71 as
|
|
180
|
-
default72 as
|
|
181
|
-
default73 as
|
|
182
|
-
default74 as
|
|
183
|
-
default75 as
|
|
184
|
-
default76 as
|
|
185
|
-
default77 as
|
|
186
|
-
default78 as
|
|
187
|
-
default79 as
|
|
188
|
-
default80 as
|
|
189
|
-
default81 as
|
|
190
|
-
default82 as
|
|
191
|
-
default83 as
|
|
192
|
-
default84 as
|
|
193
|
-
default85 as
|
|
194
|
-
default86 as
|
|
195
|
-
default87 as
|
|
196
|
-
default88 as
|
|
197
|
-
default89 as
|
|
198
|
-
default90 as
|
|
199
|
-
default91 as
|
|
200
|
-
default92 as
|
|
201
|
-
default93 as
|
|
202
|
-
default94 as
|
|
203
|
-
default95 as
|
|
204
|
-
default96 as
|
|
205
|
-
default97 as
|
|
206
|
-
default98 as
|
|
207
|
-
default99 as
|
|
208
|
-
default100 as
|
|
209
|
-
default101 as
|
|
210
|
-
default102 as
|
|
211
|
-
default103 as
|
|
212
|
-
default104 as
|
|
213
|
-
default105 as
|
|
214
|
-
default106 as
|
|
215
|
-
default107 as
|
|
216
|
-
default108 as
|
|
217
|
-
default109 as
|
|
178
|
+
default69 as MenuOutlined,
|
|
179
|
+
default70 as MenuUnfoldOutlined,
|
|
180
|
+
default71 as MessageOutlined,
|
|
181
|
+
default72 as MinusCircleOutlined,
|
|
182
|
+
default73 as MobileOutlined,
|
|
183
|
+
default74 as MoonOutlined,
|
|
184
|
+
default75 as MoreOutlined,
|
|
185
|
+
default76 as PauseFilled,
|
|
186
|
+
default77 as PieChartOutlined,
|
|
187
|
+
default78 as PlayFilled,
|
|
188
|
+
default79 as PlusCircleOutlined,
|
|
189
|
+
default80 as PlusOutlined,
|
|
190
|
+
default81 as PrinterOutlined,
|
|
191
|
+
default82 as ProtectOutlined,
|
|
192
|
+
default83 as QuestionCircleFilled,
|
|
193
|
+
default84 as QuestionCircleOutlined,
|
|
194
|
+
default85 as ReloadOutlined,
|
|
195
|
+
default86 as ResizeOutlined,
|
|
196
|
+
default87 as SearchOutlined,
|
|
197
|
+
default88 as SettingOutlined,
|
|
198
|
+
default89 as ShoppingOutlined,
|
|
199
|
+
default90 as SortOutlined,
|
|
200
|
+
default91 as StarFilled,
|
|
201
|
+
default92 as StepBackwardFilled,
|
|
202
|
+
default93 as StepForwardFilled,
|
|
203
|
+
default94 as SuitcaseOutlined,
|
|
204
|
+
default95 as SunOutlined,
|
|
205
|
+
default96 as SwapOutlined,
|
|
206
|
+
default97 as SyncOutlined,
|
|
207
|
+
default98 as TableOutlined,
|
|
208
|
+
default99 as TagOutlined,
|
|
209
|
+
default100 as TimerOutlined,
|
|
210
|
+
default101 as UndoOutlined,
|
|
211
|
+
default102 as UnlockOutlined,
|
|
212
|
+
default103 as UploadOutlined,
|
|
213
|
+
default104 as UserOutlined,
|
|
214
|
+
default105 as VerticalAlignMiddleOutlined,
|
|
215
|
+
default106 as VerticalLeftOutlined,
|
|
216
|
+
default107 as VerticalRightOutlined,
|
|
217
|
+
default108 as WarningOutlined,
|
|
218
|
+
default109 as ZoomInOutlined,
|
|
219
|
+
default110 as ZoomOutOutlined
|
|
218
220
|
};
|
|
@@ -860,7 +860,7 @@ $ele: map.deep-merge(
|
|
|
860
860
|
'width': 380px,
|
|
861
861
|
'radius': elVar('border-radius', 'base'),
|
|
862
862
|
'header-color': elVar('text-color', 'primary'),
|
|
863
|
-
'header-font-size': elVar('font-size', '
|
|
863
|
+
'header-font-size': elVar('font-size', 'medium'),
|
|
864
864
|
'header-font-weight': normal,
|
|
865
865
|
'header-line-height': 24px,
|
|
866
866
|
'header-padding': 18px 20px 8px 20px,
|
|
@@ -872,7 +872,7 @@ $ele: map.deep-merge(
|
|
|
872
872
|
'icon-hover-bg': transparent,
|
|
873
873
|
'icon-radius': elVar('border-radius', 'small'),
|
|
874
874
|
'body-padding': 12px 20px,
|
|
875
|
-
'status-size':
|
|
875
|
+
'status-size': 22px,
|
|
876
876
|
'input-margin': 8px 0 6px 0,
|
|
877
877
|
'footer-padding': 8px 20px 18px 20px,
|
|
878
878
|
'footer-border': none,
|
|
@@ -1170,20 +1170,20 @@ $ele: map.deep-merge(
|
|
|
1170
1170
|
// 时间选择器
|
|
1171
1171
|
'width': 180px,
|
|
1172
1172
|
'height': 220px,
|
|
1173
|
-
'padding': 8px
|
|
1173
|
+
'padding': 8px 4px,
|
|
1174
1174
|
'item-size': elVar('font-size', 'base'),
|
|
1175
1175
|
'item-color': elVar('text-color', 'regular'),
|
|
1176
|
-
'item-height':
|
|
1177
|
-
'item-radius':
|
|
1176
|
+
'item-height': 28px,
|
|
1177
|
+
'item-radius': 14px,
|
|
1178
1178
|
'item-hover-bg': elVar('fill-color', 'light'),
|
|
1179
1179
|
'item-hover-color': elVar('text-color', 'primary'),
|
|
1180
|
-
'item-active-bg':
|
|
1180
|
+
'item-active-bg': elVar('color-primary', 'light-9'),
|
|
1181
1181
|
'item-active-color': elVar('color-primary'),
|
|
1182
1182
|
'item-disabled-color': elVar('disabled', 'text-color'),
|
|
1183
1183
|
'item-disabled-bg': transparent,
|
|
1184
1184
|
'line': 1px solid elVar('border-color', 'light'),
|
|
1185
|
-
'line-padding':
|
|
1186
|
-
'line-margin':
|
|
1185
|
+
'line-padding': 3px,
|
|
1186
|
+
'line-margin': 4px,
|
|
1187
1187
|
'arrow-color': elVar('text-color', 'secondary'),
|
|
1188
1188
|
'arrow-size': elVar('font-size', 'base'),
|
|
1189
1189
|
'footer-padding': 6px 10px,
|
|
@@ -206,7 +206,6 @@ $ele-rounded: map.deep-merge(
|
|
|
206
206
|
),
|
|
207
207
|
'message-box': (
|
|
208
208
|
'radius': $radius-large,
|
|
209
|
-
'header-font-size': elVar('font-size', 'medium'),
|
|
210
209
|
'header-font-weight': bold,
|
|
211
210
|
'icon-hover-bg': elVar('fill-color', 'light')
|
|
212
211
|
),
|
|
@@ -250,12 +249,7 @@ $ele-rounded: map.deep-merge(
|
|
|
250
249
|
'shortcut-radius': elVar('border-radius', 'small')
|
|
251
250
|
),
|
|
252
251
|
'timepicker': (
|
|
253
|
-
'
|
|
254
|
-
'item-height': 28px,
|
|
255
|
-
'item-radius': elVar('border-radius', 'small'),
|
|
256
|
-
'item-active-bg': elVar('color-primary', 'light-9'),
|
|
257
|
-
'line-padding': 3px,
|
|
258
|
-
'line-margin': 4px
|
|
252
|
+
'item-radius': elVar('border-radius', 'small')
|
|
259
253
|
)
|
|
260
254
|
),
|
|
261
255
|
$ele-rounded
|
package/es/utils/core.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare function toTree<T>(option: ToTreeOption<T>): T[];
|
|
|
29
29
|
* @param data 数据
|
|
30
30
|
* @param callback 回调
|
|
31
31
|
* @param childrenField children 字段名
|
|
32
|
+
* @param parent 当前的父级
|
|
32
33
|
*/
|
|
33
34
|
export declare function eachTree<T>(data?: T[], callback?: (item: T, index: number, parent?: T) => void | boolean, childrenField?: string, parent?: T): void;
|
|
34
35
|
/**
|
|
@@ -37,6 +38,7 @@ export declare function eachTree<T>(data?: T[], callback?: (item: T, index: numb
|
|
|
37
38
|
* @param formatter 格式器
|
|
38
39
|
* @param childrenField children 字段名
|
|
39
40
|
* @param resultChildrenField 返回后的 children 字段名
|
|
41
|
+
* @param parent 当前的父级
|
|
40
42
|
*/
|
|
41
43
|
export declare function mapTree<T, K>(data: T[] | undefined | null, formatter: (item: T, index?: number, parent?: K) => K | void | undefined, childrenField?: string, resultChildrenField?: string, parent?: K): K[];
|
|
42
44
|
/**
|
|
@@ -90,6 +92,7 @@ export declare function getCurrentStyle(el: Element): CSSStyleDeclaration;
|
|
|
90
92
|
/**
|
|
91
93
|
* 判断元素内容是否溢出省略
|
|
92
94
|
* @param el 元素节点
|
|
95
|
+
* @param direction 只判断单个方向是否溢出
|
|
93
96
|
*/
|
|
94
97
|
export declare function contentIsEllipsis(el: HTMLElement, direction?: 'horizontal' | 'vertical'): boolean;
|
|
95
98
|
/**
|
|
@@ -124,7 +127,10 @@ export declare function bd09ToGcj02(point: Point): Point;
|
|
|
124
127
|
* @param point 坐标
|
|
125
128
|
*/
|
|
126
129
|
export declare function gcj02ToBd09(point: Point): Point;
|
|
127
|
-
/**
|
|
130
|
+
/**
|
|
131
|
+
* 复制字符串
|
|
132
|
+
* @param text 字符串
|
|
133
|
+
*/
|
|
128
134
|
export declare function copyText(text: string): Promise<undefined>;
|
|
129
135
|
/**
|
|
130
136
|
* 根据字段路径获取值
|
package/es/utils/message-box.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { getCurrentInstance, onActivated, onDeactivated } from "vue";
|
|
1
|
+
import { getCurrentInstance, onActivated, onDeactivated, onBeforeUnmount, h } from "vue";
|
|
2
2
|
import { ElMessageBox } from "element-plus";
|
|
3
3
|
import { useGlobalProps } from "../ele-config-provider/receiver";
|
|
4
4
|
import { useLayoutState } from "../ele-pro-layout/util";
|
|
5
|
+
import MessageBoxIcon from "../ele-app/components/message-box-icon";
|
|
5
6
|
import { omit } from "./core";
|
|
6
7
|
function getWrapEl(bodyEl) {
|
|
7
8
|
const parent = bodyEl || document.body;
|
|
@@ -16,7 +17,8 @@ function useMessageBox(globalOpt) {
|
|
|
16
17
|
const layoutState = useLayoutState();
|
|
17
18
|
const globalProps = useGlobalProps("messageBox");
|
|
18
19
|
const appContext = (_b = (_a = getCurrentInstance) == null ? void 0 : _a()) == null ? void 0 : _b.appContext;
|
|
19
|
-
const state = { wrapEl: null, isActivated: true };
|
|
20
|
+
const state = { wrapEl: null, isActivated: true, id: 0 };
|
|
21
|
+
const instances = /* @__PURE__ */ new Map();
|
|
20
22
|
const hideClass = "is-hide";
|
|
21
23
|
onActivated(() => {
|
|
22
24
|
state.isActivated = true;
|
|
@@ -26,7 +28,15 @@ function useMessageBox(globalOpt) {
|
|
|
26
28
|
state.isActivated = false;
|
|
27
29
|
state.wrapEl && state.wrapEl.classList.add(hideClass);
|
|
28
30
|
});
|
|
31
|
+
onBeforeUnmount(() => {
|
|
32
|
+
for (const [_key, insDoClose] of instances) {
|
|
33
|
+
insDoClose && insDoClose();
|
|
34
|
+
}
|
|
35
|
+
instances.clear();
|
|
36
|
+
});
|
|
29
37
|
const getOption = (options) => {
|
|
38
|
+
state.id++;
|
|
39
|
+
const msgId = `m_${state.id}`;
|
|
30
40
|
const opt = {
|
|
31
41
|
...globalProps.value || {},
|
|
32
42
|
...globalOpt || {},
|
|
@@ -41,6 +51,22 @@ function useMessageBox(globalOpt) {
|
|
|
41
51
|
}
|
|
42
52
|
opt.lockScroll = false;
|
|
43
53
|
}
|
|
54
|
+
const classes = ["ele-message-box"];
|
|
55
|
+
if (opt.customClass) {
|
|
56
|
+
classes.push(opt.customClass);
|
|
57
|
+
}
|
|
58
|
+
opt.customClass = classes.join(" ");
|
|
59
|
+
opt.icon = h(MessageBoxIcon, {
|
|
60
|
+
type: opt.type,
|
|
61
|
+
icon: opt.icon,
|
|
62
|
+
boxId: msgId,
|
|
63
|
+
onBoxDestroy: (boxId) => {
|
|
64
|
+
boxId && instances.delete(boxId);
|
|
65
|
+
},
|
|
66
|
+
onBoxMounted: ({ boxId, doClose }) => {
|
|
67
|
+
boxId && instances.set(boxId, doClose);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
44
70
|
return omit(opt, ["inner"]);
|
|
45
71
|
};
|
|
46
72
|
const messageBox = function(options) {
|