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
|
@@ -10,6 +10,7 @@ const BodyRow = require("./components/body-row");
|
|
|
10
10
|
const ExpandRow = require("./components/expand-row");
|
|
11
11
|
const FooterRow = require("./components/footer-row");
|
|
12
12
|
const props = require("./props");
|
|
13
|
+
const ownSlots = ["default", "empty", "append"];
|
|
13
14
|
const _sfc_main = vue.defineComponent({
|
|
14
15
|
name: "EleVirtualTable",
|
|
15
16
|
components: {
|
|
@@ -266,20 +267,20 @@ const _sfc_main = vue.defineComponent({
|
|
|
266
267
|
tableTooltipProps.visible = false;
|
|
267
268
|
tableTooltipProps.disabled = true;
|
|
268
269
|
};
|
|
269
|
-
const
|
|
270
|
+
const handleTableFilterChange = (params) => {
|
|
270
271
|
const key = util$1.getColKey(params.column);
|
|
271
272
|
if (key) {
|
|
272
273
|
filtered[key] = params.value;
|
|
273
274
|
events.onFilterChange(filtered);
|
|
274
275
|
}
|
|
275
276
|
};
|
|
276
|
-
const
|
|
277
|
+
const handleCellCheckedChange = (row, checked) => {
|
|
277
278
|
toggleSelected(row.rowData, row.rowId, checked);
|
|
278
279
|
const selection = getSelectionRows();
|
|
279
280
|
events.onSelect(selection, row.rowData);
|
|
280
281
|
events.onSelectionChange(selection);
|
|
281
282
|
};
|
|
282
|
-
const
|
|
283
|
+
const handleCellExpandChange = (row, expanded, children) => {
|
|
283
284
|
if (expanded && children != null) {
|
|
284
285
|
const childs = util$1.transformTableData(
|
|
285
286
|
children,
|
|
@@ -306,7 +307,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
306
307
|
}
|
|
307
308
|
toggleRowExpansion(row, expanded);
|
|
308
309
|
};
|
|
309
|
-
const
|
|
310
|
+
const handleCellClick = (row, col, e) => {
|
|
310
311
|
const cell = e.currentTarget;
|
|
311
312
|
const rowData = row.rowData;
|
|
312
313
|
const rowDataKey = row.rowId;
|
|
@@ -331,26 +332,26 @@ const _sfc_main = vue.defineComponent({
|
|
|
331
332
|
}
|
|
332
333
|
events.onRowClick(rowData, col, e);
|
|
333
334
|
};
|
|
334
|
-
const
|
|
335
|
+
const handleCellDblclick = (row, col, e) => {
|
|
335
336
|
const cell = e.currentTarget;
|
|
336
337
|
events.onCellDblclick(row.rowData, col, cell, e);
|
|
337
338
|
events.onRowDblclick(row.rowData, col, e);
|
|
338
339
|
};
|
|
339
|
-
const
|
|
340
|
+
const handleCellContextmenu = (row, col, e) => {
|
|
340
341
|
const cell = e.currentTarget;
|
|
341
342
|
events.onCellContextmenu(row.rowData, col, cell, e);
|
|
342
343
|
events.onRowContextmenu(row.rowData, col, e);
|
|
343
344
|
};
|
|
344
|
-
const
|
|
345
|
+
const handleCellMouseenter = (row, col, e) => {
|
|
345
346
|
const cell = e.currentTarget;
|
|
346
347
|
triggerTooltip(cell, col);
|
|
347
348
|
events.onCellMouseEnter(row.rowData, col, cell, e);
|
|
348
349
|
};
|
|
349
|
-
const
|
|
350
|
+
const handleCellMouseleave = (row, col, e) => {
|
|
350
351
|
const cell = e.currentTarget;
|
|
351
352
|
events.onCellMouseLeave(row.rowData, col, cell, e);
|
|
352
353
|
};
|
|
353
|
-
const
|
|
354
|
+
const handleHeaderCellClick = (col, e) => {
|
|
354
355
|
if (col && (col.sortable === true || col.sortable === "custom")) {
|
|
355
356
|
sortBy.value = util$1.getSortBy(sortBy.value, col);
|
|
356
357
|
events.onSortChange({
|
|
@@ -361,22 +362,22 @@ const _sfc_main = vue.defineComponent({
|
|
|
361
362
|
}
|
|
362
363
|
events.onHeaderClick(col, e);
|
|
363
364
|
};
|
|
364
|
-
const
|
|
365
|
+
const handleHeaderCellContextmenu = (col, e) => {
|
|
365
366
|
events.onHeaderContextmenu(col, e);
|
|
366
367
|
};
|
|
367
|
-
const
|
|
368
|
+
const handleHeaderCellMouseenter = () => {
|
|
368
369
|
hideTooltip();
|
|
369
370
|
};
|
|
370
|
-
const
|
|
371
|
+
const handleFooterCellMouseenter = (e) => {
|
|
371
372
|
triggerTooltip(e.currentTarget, { showOverflowTooltip: true });
|
|
372
373
|
};
|
|
373
|
-
const
|
|
374
|
+
const handleExpandCellMouseenter = () => {
|
|
374
375
|
hideTooltip();
|
|
375
376
|
};
|
|
376
|
-
const
|
|
377
|
+
const handleTableMouseleave = () => {
|
|
377
378
|
hideTooltip();
|
|
378
379
|
};
|
|
379
|
-
const
|
|
380
|
+
const handleTableScroll = (option) => {
|
|
380
381
|
tableState.scrollTop = option.scrollTop;
|
|
381
382
|
const scrollLeft = option.scrollLeft;
|
|
382
383
|
if (tableScrollLeft.value !== scrollLeft) {
|
|
@@ -897,6 +898,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
897
898
|
}
|
|
898
899
|
);
|
|
899
900
|
return {
|
|
901
|
+
ownSlots,
|
|
900
902
|
rootRef,
|
|
901
903
|
tableRef,
|
|
902
904
|
tableKey,
|
|
@@ -929,21 +931,21 @@ const _sfc_main = vue.defineComponent({
|
|
|
929
931
|
tableEmptyProps,
|
|
930
932
|
isLayoutFixedHead,
|
|
931
933
|
isLayoutMaximized,
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
934
|
+
handleTableFilterChange,
|
|
935
|
+
handleCellCheckedChange,
|
|
936
|
+
handleCellExpandChange,
|
|
937
|
+
handleCellClick,
|
|
938
|
+
handleCellDblclick,
|
|
939
|
+
handleCellContextmenu,
|
|
940
|
+
handleCellMouseenter,
|
|
941
|
+
handleCellMouseleave,
|
|
942
|
+
handleHeaderCellClick,
|
|
943
|
+
handleHeaderCellContextmenu,
|
|
944
|
+
handleHeaderCellMouseenter,
|
|
945
|
+
handleFooterCellMouseenter,
|
|
946
|
+
handleExpandCellMouseenter,
|
|
947
|
+
handleTableMouseleave,
|
|
948
|
+
handleTableScroll,
|
|
947
949
|
updateWrapSize,
|
|
948
950
|
updateTableData,
|
|
949
951
|
updateSelectedAndChecked,
|
|
@@ -1007,12 +1009,12 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1007
1009
|
{ "is-small": _ctx.size === "small" },
|
|
1008
1010
|
{ "is-large": _ctx.size === "large" }
|
|
1009
1011
|
]),
|
|
1010
|
-
onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.
|
|
1012
|
+
onMouseleave: _cache[1] || (_cache[1] = (...args) => _ctx.handleTableMouseleave && _ctx.handleTableMouseleave(...args))
|
|
1011
1013
|
}, [
|
|
1012
1014
|
_ctx.tableProps.width ? (vue.openBlock(), vue.createBlock(_component_ElTableV2, vue.mergeProps({ key: 0 }, _ctx.tableProps, {
|
|
1013
1015
|
key: _ctx.tableKey,
|
|
1014
1016
|
ref: "tableRef",
|
|
1015
|
-
onScroll: _ctx.
|
|
1017
|
+
onScroll: _ctx.handleTableScroll
|
|
1016
1018
|
}), vue.createSlots({
|
|
1017
1019
|
header: vue.withCtx((headerProps) => [
|
|
1018
1020
|
headerProps && _ctx.headerRows[headerProps.headerIndex] ? (vue.openBlock(), vue.createBlock(_component_HeaderRow, {
|
|
@@ -1031,13 +1033,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1031
1033
|
headerEllipsis: true,
|
|
1032
1034
|
rowHeight: _ctx.tableRowHeight,
|
|
1033
1035
|
onCheckedChange: _cache[0] || (_cache[0] = ($event) => _ctx.toggleAllSelection()),
|
|
1034
|
-
onFilterChange: _ctx.
|
|
1035
|
-
onCellClick: _ctx.
|
|
1036
|
-
onCellContextmenu: _ctx.
|
|
1037
|
-
onCellMouseenter: _ctx.
|
|
1036
|
+
onFilterChange: _ctx.handleTableFilterChange,
|
|
1037
|
+
onCellClick: _ctx.handleHeaderCellClick,
|
|
1038
|
+
onCellContextmenu: _ctx.handleHeaderCellContextmenu,
|
|
1039
|
+
onCellMouseenter: _ctx.handleHeaderCellMouseenter
|
|
1038
1040
|
}, vue.createSlots({ _: 2 }, [
|
|
1039
1041
|
vue.renderList(Object.keys(_ctx.$slots).filter(
|
|
1040
|
-
(k) => !
|
|
1042
|
+
(k) => !_ctx.ownSlots.includes(k)
|
|
1041
1043
|
), (name) => {
|
|
1042
1044
|
return {
|
|
1043
1045
|
name,
|
|
@@ -1056,10 +1058,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1056
1058
|
column: (_a = _ctx.tableExpandCol) == null ? void 0 : _a.originalCol,
|
|
1057
1059
|
rowIndex: rowProps.rowData.rowIndex,
|
|
1058
1060
|
rowData: rowProps.rowData.rowData,
|
|
1059
|
-
onMouseenter: _ctx.
|
|
1061
|
+
onMouseenter: _ctx.handleExpandCellMouseenter
|
|
1060
1062
|
}, vue.createSlots({ _: 2 }, [
|
|
1061
1063
|
vue.renderList(Object.keys(_ctx.$slots).filter(
|
|
1062
|
-
(k) => !
|
|
1064
|
+
(k) => !_ctx.ownSlots.includes(k)
|
|
1063
1065
|
), (name) => {
|
|
1064
1066
|
return {
|
|
1065
1067
|
name,
|
|
@@ -1091,16 +1093,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1091
1093
|
indent: _ctx.indent,
|
|
1092
1094
|
fixedCellHeight: _ctx.hasExpandCol,
|
|
1093
1095
|
autoRowHeight: _ctx.autoRowHeight,
|
|
1094
|
-
onCellCheckedChange: _ctx.
|
|
1095
|
-
onCellExpandChange: _ctx.
|
|
1096
|
-
onCellClick: _ctx.
|
|
1097
|
-
onCellDblclick: _ctx.
|
|
1098
|
-
onCellContextmenu: _ctx.
|
|
1099
|
-
onCellMouseenter: _ctx.
|
|
1100
|
-
onCellMouseleave: _ctx.
|
|
1096
|
+
onCellCheckedChange: _ctx.handleCellCheckedChange,
|
|
1097
|
+
onCellExpandChange: _ctx.handleCellExpandChange,
|
|
1098
|
+
onCellClick: _ctx.handleCellClick,
|
|
1099
|
+
onCellDblclick: _ctx.handleCellDblclick,
|
|
1100
|
+
onCellContextmenu: _ctx.handleCellContextmenu,
|
|
1101
|
+
onCellMouseenter: _ctx.handleCellMouseenter,
|
|
1102
|
+
onCellMouseleave: _ctx.handleCellMouseleave
|
|
1101
1103
|
}, vue.createSlots({ _: 2 }, [
|
|
1102
1104
|
vue.renderList(Object.keys(_ctx.$slots).filter(
|
|
1103
|
-
(k) => !
|
|
1105
|
+
(k) => !_ctx.ownSlots.includes(k)
|
|
1104
1106
|
), (name) => {
|
|
1105
1107
|
return {
|
|
1106
1108
|
name,
|
|
@@ -1133,7 +1135,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1133
1135
|
rowHeight: _ctx.tableRowHeight,
|
|
1134
1136
|
sumText: _ctx.tableSumText,
|
|
1135
1137
|
summaryMethod: _ctx.summaryMethod,
|
|
1136
|
-
onMouseenter: _ctx.
|
|
1138
|
+
onMouseenter: _ctx.handleFooterCellMouseenter
|
|
1137
1139
|
}, null, 8, ["bodyCols", "colSizes", "sumWidth", "tableData", "rowHeight", "sumText", "summaryMethod", "onMouseenter"])
|
|
1138
1140
|
]),
|
|
1139
1141
|
key: "0"
|
|
@@ -52,7 +52,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
52
52
|
};
|
|
53
53
|
fit: {
|
|
54
54
|
type: BooleanConstructor;
|
|
55
|
-
default: boolean;
|
|
55
|
+
default: boolean;
|
|
56
56
|
};
|
|
57
57
|
width: (StringConstructor | NumberConstructor)[];
|
|
58
58
|
maxHeight: (StringConstructor | NumberConstructor)[];
|
|
@@ -109,7 +109,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
109
109
|
treeProps: {
|
|
110
110
|
type: import('vue').PropType<{
|
|
111
111
|
hasChildren?: string | undefined;
|
|
112
|
-
children?: string | undefined;
|
|
112
|
+
children?: string | undefined; /** 是否钉住左侧固定列 */
|
|
113
113
|
} | undefined>;
|
|
114
114
|
default: () => {
|
|
115
115
|
hasChildren: string;
|
|
@@ -125,6 +125,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
125
125
|
flexible: BooleanConstructor;
|
|
126
126
|
showOverflowTooltip: import('vue').PropType<boolean | Partial<Pick<import('element-plus').ElTooltipProps, "effect" | "placement" | "popperClass" | "offset" | "popperOptions" | "appendTo" | "transition" | "enterable" | "showAfter" | "hideAfter" | "showArrow">> | undefined>;
|
|
127
127
|
}, {
|
|
128
|
+
ownSlots: string[];
|
|
128
129
|
rootRef: Ref<HTMLElement | null>;
|
|
129
130
|
tableRef: Ref<ElTableV2Instance>;
|
|
130
131
|
tableKey: Ref<number>;
|
|
@@ -157,21 +158,21 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
157
158
|
tableEmptyProps: import('vue').ComputedRef<import('../ele-app/el').ElEmptyProps>;
|
|
158
159
|
isLayoutFixedHead: import('vue').ComputedRef<boolean | undefined>;
|
|
159
160
|
isLayoutMaximized: import('vue').ComputedRef<boolean | undefined>;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
161
|
+
handleTableFilterChange: (params: CellFilterChangeParams) => void;
|
|
162
|
+
handleCellCheckedChange: (row: VirtualRow, checked: boolean) => void;
|
|
163
|
+
handleCellExpandChange: (row: VirtualRow, expanded: boolean, children?: DataItem[]) => void;
|
|
164
|
+
handleCellClick: (row: VirtualRow, col: Column, e: MouseEvent) => void;
|
|
165
|
+
handleCellDblclick: (row: VirtualRow, col: Column, e: MouseEvent) => void;
|
|
166
|
+
handleCellContextmenu: (row: VirtualRow, col: Column, e: MouseEvent) => void;
|
|
167
|
+
handleCellMouseenter: (row: VirtualRow, col: Column, e: MouseEvent) => void;
|
|
168
|
+
handleCellMouseleave: (row: VirtualRow, col: Column, e: MouseEvent) => void;
|
|
169
|
+
handleHeaderCellClick: (col: Column | undefined, e: MouseEvent) => void;
|
|
170
|
+
handleHeaderCellContextmenu: (col: Column, e: MouseEvent) => void;
|
|
171
|
+
handleHeaderCellMouseenter: () => void;
|
|
172
|
+
handleFooterCellMouseenter: (e: MouseEvent) => void;
|
|
173
|
+
handleExpandCellMouseenter: () => void;
|
|
174
|
+
handleTableMouseleave: () => void;
|
|
175
|
+
handleTableScroll: (option: ScrollPos) => void;
|
|
175
176
|
updateWrapSize: () => void;
|
|
176
177
|
updateTableData: () => void;
|
|
177
178
|
updateSelectedAndChecked: () => void;
|
|
@@ -208,11 +209,12 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
208
209
|
rowContextmenu: (_row: DataItem, _column: Column, _e: MouseEvent) => boolean;
|
|
209
210
|
rowDblclick: (_row: DataItem, _column: Column, _e: MouseEvent) => boolean;
|
|
210
211
|
headerClick: (_column: Column, _e: MouseEvent) => boolean;
|
|
211
|
-
headerContextmenu: (_column: Column, _e: MouseEvent) => boolean;
|
|
212
|
+
headerContextmenu: (_column: Column, _e: MouseEvent) => boolean;
|
|
212
213
|
sortChange: (_sorter: import('../ele-data-table/types').Sorter) => boolean;
|
|
213
214
|
filterChange: (_filter: Filter) => boolean;
|
|
214
215
|
currentChange: (_current?: DataItem | null | undefined, _old?: DataItem | null | undefined) => boolean;
|
|
215
216
|
headerDragend: (_width: number, _old: number, _column: Column, _e: MouseEvent) => boolean;
|
|
217
|
+
/** 主体区域列 */
|
|
216
218
|
expandChange: (_row: DataItem, _expanded: boolean) => boolean;
|
|
217
219
|
'update:currentRowKey': (_currentRowKey?: DataKey | undefined) => boolean;
|
|
218
220
|
'update:selectedRowKeys': (_selectedRowKeys?: DataKey[] | undefined) => boolean;
|
|
@@ -265,7 +267,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
265
267
|
};
|
|
266
268
|
fit: {
|
|
267
269
|
type: BooleanConstructor;
|
|
268
|
-
default: boolean;
|
|
270
|
+
default: boolean;
|
|
269
271
|
};
|
|
270
272
|
width: (StringConstructor | NumberConstructor)[];
|
|
271
273
|
maxHeight: (StringConstructor | NumberConstructor)[];
|
|
@@ -322,7 +324,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
322
324
|
treeProps: {
|
|
323
325
|
type: import('vue').PropType<{
|
|
324
326
|
hasChildren?: string | undefined;
|
|
325
|
-
children?: string | undefined;
|
|
327
|
+
children?: string | undefined; /** 是否钉住左侧固定列 */
|
|
326
328
|
} | undefined>;
|
|
327
329
|
default: () => {
|
|
328
330
|
hasChildren: string;
|
|
@@ -373,7 +375,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
373
375
|
indent: number;
|
|
374
376
|
treeProps: {
|
|
375
377
|
hasChildren?: string | undefined;
|
|
376
|
-
children?: string | undefined;
|
|
378
|
+
children?: string | undefined; /** 是否钉住左侧固定列 */
|
|
377
379
|
} | undefined;
|
|
378
380
|
tableLayout: "auto" | "fixed";
|
|
379
381
|
scrollbarAlwaysOn: boolean;
|
|
@@ -102,9 +102,9 @@ function analyseColumns(columns) {
|
|
|
102
102
|
return { cols, rows };
|
|
103
103
|
}
|
|
104
104
|
const sortedCols = [...columns];
|
|
105
|
-
sortedCols.sort(
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
sortedCols.sort(
|
|
106
|
+
(a, b) => util.getColFixedNumber(a.fixed) - util.getColFixedNumber(b.fixed)
|
|
107
|
+
);
|
|
108
108
|
generateRowCols(sortedCols, cols, rows, 0);
|
|
109
109
|
computeFixedCols(cols);
|
|
110
110
|
rows.forEach((row, i) => {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const vue = require("vue");
|
|
3
|
+
const _sfc_main = vue.defineComponent({
|
|
4
|
+
name: "MenuOutlined"
|
|
5
|
+
});
|
|
6
|
+
const _export_sfc = (sfc, props) => {
|
|
7
|
+
const target = sfc.__vccOpts || sfc;
|
|
8
|
+
for (const [key, val] of props) {
|
|
9
|
+
target[key] = val;
|
|
10
|
+
}
|
|
11
|
+
return target;
|
|
12
|
+
};
|
|
13
|
+
const _hoisted_1 = {
|
|
14
|
+
viewBox: "0 0 48 48",
|
|
15
|
+
fill: "none",
|
|
16
|
+
stroke: "currentColor",
|
|
17
|
+
"stroke-width": "4"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_2 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M3 7H45" }, null, -1);
|
|
20
|
+
const _hoisted_3 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M3 24H44" }, null, -1);
|
|
21
|
+
const _hoisted_4 = /* @__PURE__ */ vue.createElementVNode("path", { d: "M3 41H45" }, null, -1);
|
|
22
|
+
const _hoisted_5 = [
|
|
23
|
+
_hoisted_2,
|
|
24
|
+
_hoisted_3,
|
|
25
|
+
_hoisted_4
|
|
26
|
+
];
|
|
27
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
28
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_1, _hoisted_5);
|
|
29
|
+
}
|
|
30
|
+
const MenuOutlined = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
31
|
+
module.exports = MenuOutlined;
|
package/lib/icons/index.cjs
CHANGED
|
@@ -67,6 +67,7 @@ const LogOutlined = require("./LogOutlined");
|
|
|
67
67
|
const MailOutlined = require("./MailOutlined");
|
|
68
68
|
const LogoutOutlined = require("./LogoutOutlined");
|
|
69
69
|
const MenuFoldOutlined = require("./MenuFoldOutlined");
|
|
70
|
+
const MenuOutlined = require("./MenuOutlined");
|
|
70
71
|
const MenuUnfoldOutlined = require("./MenuUnfoldOutlined");
|
|
71
72
|
const MessageOutlined = require("./MessageOutlined");
|
|
72
73
|
const MinusCircleOutlined = require("./MinusCircleOutlined");
|
|
@@ -175,6 +176,7 @@ exports.LogOutlined = LogOutlined;
|
|
|
175
176
|
exports.MailOutlined = MailOutlined;
|
|
176
177
|
exports.LogoutOutlined = LogoutOutlined;
|
|
177
178
|
exports.MenuFoldOutlined = MenuFoldOutlined;
|
|
179
|
+
exports.MenuOutlined = MenuOutlined;
|
|
178
180
|
exports.MenuUnfoldOutlined = MenuUnfoldOutlined;
|
|
179
181
|
exports.MessageOutlined = MessageOutlined;
|
|
180
182
|
exports.MinusCircleOutlined = MinusCircleOutlined;
|
package/lib/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/lib/index.cjs
CHANGED
|
@@ -8,16 +8,14 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
get: () => installer.installer
|
|
9
9
|
});
|
|
10
10
|
Object.keys(components).forEach((k) => {
|
|
11
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
11
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: () => components[k]
|
|
14
|
+
});
|
|
16
15
|
});
|
|
17
16
|
Object.keys(coreExport).forEach((k) => {
|
|
18
|
-
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
});
|
|
17
|
+
if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => coreExport[k]
|
|
20
|
+
});
|
|
23
21
|
});
|
|
@@ -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/lib/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
|
* 根据字段路径获取值
|
|
@@ -4,6 +4,7 @@ const vue = require("vue");
|
|
|
4
4
|
const elementPlus = require("element-plus");
|
|
5
5
|
const receiver = require("../ele-config-provider/receiver");
|
|
6
6
|
const util = require("../ele-pro-layout/util");
|
|
7
|
+
const MessageBoxIcon = require("../ele-app/components/message-box-icon");
|
|
7
8
|
const core = require("./core");
|
|
8
9
|
function getWrapEl(bodyEl) {
|
|
9
10
|
const parent = bodyEl || document.body;
|
|
@@ -18,7 +19,8 @@ function useMessageBox(globalOpt) {
|
|
|
18
19
|
const layoutState = util.useLayoutState();
|
|
19
20
|
const globalProps = receiver.useGlobalProps("messageBox");
|
|
20
21
|
const appContext = (_b = (_a = vue.getCurrentInstance) == null ? void 0 : _a.call(vue)) == null ? void 0 : _b.appContext;
|
|
21
|
-
const state = { wrapEl: null, isActivated: true };
|
|
22
|
+
const state = { wrapEl: null, isActivated: true, id: 0 };
|
|
23
|
+
const instances = /* @__PURE__ */ new Map();
|
|
22
24
|
const hideClass = "is-hide";
|
|
23
25
|
vue.onActivated(() => {
|
|
24
26
|
state.isActivated = true;
|
|
@@ -28,7 +30,15 @@ function useMessageBox(globalOpt) {
|
|
|
28
30
|
state.isActivated = false;
|
|
29
31
|
state.wrapEl && state.wrapEl.classList.add(hideClass);
|
|
30
32
|
});
|
|
33
|
+
vue.onBeforeUnmount(() => {
|
|
34
|
+
for (const [_key, insDoClose] of instances) {
|
|
35
|
+
insDoClose && insDoClose();
|
|
36
|
+
}
|
|
37
|
+
instances.clear();
|
|
38
|
+
});
|
|
31
39
|
const getOption = (options) => {
|
|
40
|
+
state.id++;
|
|
41
|
+
const msgId = `m_${state.id}`;
|
|
32
42
|
const opt = {
|
|
33
43
|
...globalProps.value || {},
|
|
34
44
|
...globalOpt || {},
|
|
@@ -43,6 +53,22 @@ function useMessageBox(globalOpt) {
|
|
|
43
53
|
}
|
|
44
54
|
opt.lockScroll = false;
|
|
45
55
|
}
|
|
56
|
+
const classes = ["ele-message-box"];
|
|
57
|
+
if (opt.customClass) {
|
|
58
|
+
classes.push(opt.customClass);
|
|
59
|
+
}
|
|
60
|
+
opt.customClass = classes.join(" ");
|
|
61
|
+
opt.icon = vue.h(MessageBoxIcon, {
|
|
62
|
+
type: opt.type,
|
|
63
|
+
icon: opt.icon,
|
|
64
|
+
boxId: msgId,
|
|
65
|
+
onBoxDestroy: (boxId) => {
|
|
66
|
+
boxId && instances.delete(boxId);
|
|
67
|
+
},
|
|
68
|
+
onBoxMounted: ({ boxId, doClose }) => {
|
|
69
|
+
boxId && instances.set(boxId, doClose);
|
|
70
|
+
}
|
|
71
|
+
});
|
|
46
72
|
return core.omit(opt, ["inner"]);
|
|
47
73
|
};
|
|
48
74
|
const messageBox = function(options) {
|