ele-admin-plus 1.2.1-beta.1 → 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 +19 -10
- package/es/ele-admin-layout/props.d.ts +4 -1
- package/es/ele-admin-layout/props.js +4 -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 +1 -1
- package/es/ele-app/components/message-body.js +2 -2
- package/es/ele-app/plus.d.ts +3 -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-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 +19 -19
- package/es/ele-pro-layout/index.js +2 -2
- package/es/ele-pro-layout/props.d.ts +1 -1
- package/es/ele-pro-layout/props.js +1 -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/util.d.ts +38 -30
- package/es/ele-pro-table/util.js +111 -80
- 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/style/themes/default.scss +8 -8
- package/es/style/themes/rounded.scss +1 -7
- package/es/utils/core.d.ts +7 -1
- package/lib/ele-admin-layout/index.d.ts +19 -10
- package/lib/ele-admin-layout/props.cjs +4 -1
- package/lib/ele-admin-layout/props.d.ts +4 -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 +2 -2
- package/lib/ele-app/components/message-body.d.ts +1 -1
- package/lib/ele-app/plus.d.ts +3 -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-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 +2 -2
- package/lib/ele-pro-layout/index.d.ts +19 -19
- package/lib/ele-pro-layout/props.cjs +1 -1
- package/lib/ele-pro-layout/props.d.ts +1 -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/util.cjs +111 -80
- package/lib/ele-pro-table/util.d.ts +38 -30
- 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/style/themes/default.scss +8 -8
- package/lib/style/themes/rounded.scss +1 -7
- package/lib/utils/core.d.ts +7 -1
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ const util = require("../ele-pro-layout/util");
|
|
|
4
4
|
const EleBasicSelect = require("../ele-basic-select/index");
|
|
5
5
|
const util$1 = require("../ele-basic-select/util");
|
|
6
6
|
const EleProTable = require("../ele-pro-table/index");
|
|
7
|
+
const util$2 = require("../ele-data-table/util");
|
|
7
8
|
const props = require("./props");
|
|
8
9
|
const _sfc_main = vue.defineComponent({
|
|
9
10
|
name: "EleTableSelect",
|
|
@@ -159,7 +160,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
159
160
|
const focusSearchInput = () => {
|
|
160
161
|
selectRef.value && selectRef.value.focusSearchInput();
|
|
161
162
|
};
|
|
162
|
-
const
|
|
163
|
+
const handleInitValueChange = (initValue) => {
|
|
163
164
|
const valueKey = props2.valueKey;
|
|
164
165
|
if (!props2.multiple) {
|
|
165
166
|
const key = initValue[valueKey];
|
|
@@ -201,23 +202,23 @@ const _sfc_main = vue.defineComponent({
|
|
|
201
202
|
emit("visibleChange", visible);
|
|
202
203
|
}
|
|
203
204
|
};
|
|
204
|
-
const
|
|
205
|
+
const handleSelectRemove = (item) => {
|
|
205
206
|
const values = props2.modelValue || [];
|
|
206
207
|
updateModelValue(values.filter((v) => v !== item.value));
|
|
207
208
|
emit("removeTag", item.value);
|
|
208
209
|
};
|
|
209
|
-
const
|
|
210
|
+
const handleSelectClear = () => {
|
|
210
211
|
updateModelValue(props2.multiple ? [] : null);
|
|
211
212
|
updateVisible(false);
|
|
212
213
|
emit("clear");
|
|
213
214
|
};
|
|
214
|
-
const
|
|
215
|
+
const handleSelectFocus = (e) => {
|
|
215
216
|
emit("focus", e);
|
|
216
217
|
};
|
|
217
|
-
const
|
|
218
|
+
const handleSelectBlur = (e) => {
|
|
218
219
|
emit("blur", e);
|
|
219
220
|
};
|
|
220
|
-
const
|
|
221
|
+
const handleSelectFilter = (keywords) => {
|
|
221
222
|
emit("filterChange", keywords);
|
|
222
223
|
};
|
|
223
224
|
const updateSelectedRowKeys = (rowKeys) => {
|
|
@@ -230,32 +231,36 @@ const _sfc_main = vue.defineComponent({
|
|
|
230
231
|
updateModelValue(rowKey);
|
|
231
232
|
}
|
|
232
233
|
};
|
|
233
|
-
const
|
|
234
|
+
const handleTableCurrentChange = (row) => {
|
|
234
235
|
if (!props2.multiple && row != null) {
|
|
235
236
|
updateSelectedItems(true);
|
|
236
237
|
}
|
|
237
238
|
};
|
|
238
|
-
const
|
|
239
|
+
const handleTableSelectionChange = () => {
|
|
239
240
|
if (props2.multiple) {
|
|
240
241
|
updateSelectedItems(true);
|
|
241
242
|
}
|
|
242
243
|
};
|
|
243
|
-
const
|
|
244
|
+
const handleTableRowClick = (row) => {
|
|
244
245
|
var _a;
|
|
245
246
|
if (!props2.multiple) {
|
|
246
247
|
updateVisible(false);
|
|
247
248
|
emit("select", row);
|
|
248
|
-
} else if (((_a = props2.tableProps) == null ? void 0 : _a.rowClickChecked) && tableRef.value
|
|
249
|
+
} else if (((_a = props2.tableProps) == null ? void 0 : _a.rowClickChecked) && tableRef.value && !util$2.isDisableRow(
|
|
250
|
+
row,
|
|
251
|
+
tableRef.value.tableData.indexOf(row),
|
|
252
|
+
tableRef.value.tableProps.columns
|
|
253
|
+
)) {
|
|
249
254
|
emit("select", tableRef.value.getSelectionRows() || []);
|
|
250
255
|
}
|
|
251
256
|
};
|
|
252
|
-
const
|
|
257
|
+
const handleTableSelect = (selection) => {
|
|
253
258
|
emit("select", selection);
|
|
254
259
|
};
|
|
255
|
-
const
|
|
260
|
+
const handleTableSelectAll = (selection) => {
|
|
256
261
|
emit("select", selection);
|
|
257
262
|
};
|
|
258
|
-
const
|
|
263
|
+
const handleTableDone = () => {
|
|
259
264
|
vue.nextTick(() => {
|
|
260
265
|
updatePopover();
|
|
261
266
|
});
|
|
@@ -277,7 +282,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
277
282
|
() => props2.initValue,
|
|
278
283
|
(initValue) => {
|
|
279
284
|
if (!util$1.isEmptyValue(initValue)) {
|
|
280
|
-
|
|
285
|
+
handleInitValueChange(initValue);
|
|
281
286
|
}
|
|
282
287
|
},
|
|
283
288
|
{ deep: true }
|
|
@@ -292,7 +297,7 @@ const _sfc_main = vue.defineComponent({
|
|
|
292
297
|
);
|
|
293
298
|
vue.onMounted(() => {
|
|
294
299
|
if (!util$1.isEmptyValue(props2.initValue, props2.multiple)) {
|
|
295
|
-
|
|
300
|
+
handleInitValueChange(props2.initValue);
|
|
296
301
|
} else if (!util$1.isEmptyValue(props2.modelValue, props2.multiple)) {
|
|
297
302
|
updateSelectedItems();
|
|
298
303
|
}
|
|
@@ -310,19 +315,19 @@ const _sfc_main = vue.defineComponent({
|
|
|
310
315
|
updateSelectedItems,
|
|
311
316
|
focusSearchInput,
|
|
312
317
|
updateVisible,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
+
handleSelectRemove,
|
|
319
|
+
handleSelectClear,
|
|
320
|
+
handleSelectFocus,
|
|
321
|
+
handleSelectBlur,
|
|
322
|
+
handleSelectFilter,
|
|
318
323
|
updateSelectedRowKeys,
|
|
319
324
|
updateCurrentRowKey,
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
325
|
+
handleTableCurrentChange,
|
|
326
|
+
handleTableSelectionChange,
|
|
327
|
+
handleTableRowClick,
|
|
328
|
+
handleTableSelect,
|
|
329
|
+
handleTableSelectAll,
|
|
330
|
+
handleTableDone
|
|
326
331
|
};
|
|
327
332
|
}
|
|
328
333
|
});
|
|
@@ -362,23 +367,23 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
362
367
|
selected: _ctx.selectedItems,
|
|
363
368
|
visible: _ctx.selectVisible,
|
|
364
369
|
"onUpdate:visible": _ctx.updateVisible,
|
|
365
|
-
onFilterChange: _ctx.
|
|
366
|
-
onRemoveTag: _ctx.
|
|
367
|
-
onClear: _ctx.
|
|
368
|
-
onFocus: _ctx.
|
|
369
|
-
onBlur: _ctx.
|
|
370
|
+
onFilterChange: _ctx.handleSelectFilter,
|
|
371
|
+
onRemoveTag: _ctx.handleSelectRemove,
|
|
372
|
+
onClear: _ctx.handleSelectClear,
|
|
373
|
+
onFocus: _ctx.handleSelectFocus,
|
|
374
|
+
onBlur: _ctx.handleSelectBlur
|
|
370
375
|
}, vue.createSlots({
|
|
371
376
|
default: vue.withCtx(() => [
|
|
372
377
|
vue.renderSlot(_ctx.$slots, "topExtra"),
|
|
373
378
|
vue.createVNode(_component_EleProTable, vue.mergeProps({
|
|
374
379
|
"onUpdate:selectedRowKeys": _ctx.updateSelectedRowKeys,
|
|
375
380
|
"onUpdate:currentRowKey": _ctx.updateCurrentRowKey,
|
|
376
|
-
onSelectionChange: _ctx.
|
|
377
|
-
onCurrentChange: _ctx.
|
|
378
|
-
onRowClick: _ctx.
|
|
379
|
-
onSelect: _ctx.
|
|
380
|
-
onSelectAll: _ctx.
|
|
381
|
-
onDone: _ctx.
|
|
381
|
+
onSelectionChange: _ctx.handleTableSelectionChange,
|
|
382
|
+
onCurrentChange: _ctx.handleTableCurrentChange,
|
|
383
|
+
onRowClick: _ctx.handleTableRowClick,
|
|
384
|
+
onSelect: _ctx.handleTableSelect,
|
|
385
|
+
onSelectAll: _ctx.handleTableSelectAll,
|
|
386
|
+
onDone: _ctx.handleTableDone
|
|
382
387
|
}, _ctx.tableProps || {}, {
|
|
383
388
|
ref: "tableRef",
|
|
384
389
|
rowKey: _ctx.valueKey,
|
|
@@ -27,7 +27,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
27
27
|
required: boolean;
|
|
28
28
|
};
|
|
29
29
|
maxTagCount: NumberConstructor;
|
|
30
|
-
maxTagTextLength: NumberConstructor;
|
|
30
|
+
maxTagTextLength: NumberConstructor; /** 选中的标签 */
|
|
31
31
|
tagType: {
|
|
32
32
|
type: import('vue').PropType<import('element-plus/es/utils/index').EpPropMergeType<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown> | undefined>;
|
|
33
33
|
default: string;
|
|
@@ -36,8 +36,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
36
36
|
filterable: BooleanConstructor;
|
|
37
37
|
teleported: {
|
|
38
38
|
type: BooleanConstructor;
|
|
39
|
-
default: boolean;
|
|
40
|
-
};
|
|
39
|
+
default: boolean; /** 表格单选选中值 */
|
|
40
|
+
}; /** 表格单选选中值 */
|
|
41
41
|
persistent: {
|
|
42
42
|
type: BooleanConstructor;
|
|
43
43
|
default: boolean;
|
|
@@ -51,7 +51,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
51
51
|
default: string;
|
|
52
52
|
};
|
|
53
53
|
popperOptions: import('vue').PropType<Partial<import('element-plus').Options> | undefined>;
|
|
54
|
-
popperClass: StringConstructor;
|
|
54
|
+
popperClass: StringConstructor;
|
|
55
55
|
popperWidth: (StringConstructor | NumberConstructor)[];
|
|
56
56
|
selectStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
57
57
|
inputStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
@@ -77,19 +77,19 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
77
77
|
updateSelectedItems: (force?: boolean) => void;
|
|
78
78
|
focusSearchInput: () => void;
|
|
79
79
|
updateVisible: (visible: boolean) => void;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
80
|
+
handleSelectRemove: (item: SelectedItem) => void;
|
|
81
|
+
handleSelectClear: () => void;
|
|
82
|
+
handleSelectFocus: (e: FocusEvent) => void;
|
|
83
|
+
handleSelectBlur: (e: FocusEvent) => void;
|
|
84
|
+
handleSelectFilter: (keywords: string) => void;
|
|
85
85
|
updateSelectedRowKeys: (rowKeys: DataKey[]) => void;
|
|
86
86
|
updateCurrentRowKey: (rowKey?: DataKey) => void;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
handleTableCurrentChange: (row?: DataItem | null) => void;
|
|
88
|
+
handleTableSelectionChange: () => void;
|
|
89
|
+
handleTableRowClick: (row: DataItem) => void;
|
|
90
|
+
handleTableSelect: (selection: DataItem[]) => void;
|
|
91
|
+
handleTableSelectAll: (selection: DataItem[]) => void;
|
|
92
|
+
handleTableDone: () => void;
|
|
93
93
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
94
94
|
'update:modelValue': (_value: SelectValue) => boolean;
|
|
95
95
|
change: (_value: SelectValue) => boolean;
|
|
@@ -125,7 +125,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
125
125
|
required: boolean;
|
|
126
126
|
};
|
|
127
127
|
maxTagCount: NumberConstructor;
|
|
128
|
-
maxTagTextLength: NumberConstructor;
|
|
128
|
+
maxTagTextLength: NumberConstructor; /** 选中的标签 */
|
|
129
129
|
tagType: {
|
|
130
130
|
type: import('vue').PropType<import('element-plus/es/utils/index').EpPropMergeType<StringConstructor, "success" | "warning" | "info" | "primary" | "danger", unknown> | undefined>;
|
|
131
131
|
default: string;
|
|
@@ -134,8 +134,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
134
134
|
filterable: BooleanConstructor;
|
|
135
135
|
teleported: {
|
|
136
136
|
type: BooleanConstructor;
|
|
137
|
-
default: boolean;
|
|
138
|
-
};
|
|
137
|
+
default: boolean; /** 表格单选选中值 */
|
|
138
|
+
}; /** 表格单选选中值 */
|
|
139
139
|
persistent: {
|
|
140
140
|
type: BooleanConstructor;
|
|
141
141
|
default: boolean;
|
|
@@ -149,7 +149,7 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
149
149
|
default: string;
|
|
150
150
|
};
|
|
151
151
|
popperOptions: import('vue').PropType<Partial<import('element-plus').Options> | undefined>;
|
|
152
|
-
popperClass: StringConstructor;
|
|
152
|
+
popperClass: StringConstructor;
|
|
153
153
|
popperWidth: (StringConstructor | NumberConstructor)[];
|
|
154
154
|
selectStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
155
155
|
inputStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
package/lib/ele-tool/index.cjs
CHANGED
|
@@ -1,34 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
|
-
const
|
|
3
|
+
const hook = require("../utils/hook");
|
|
4
|
+
const props$1 = require("../ele-toolbar/props");
|
|
4
5
|
const props = require("./props");
|
|
5
6
|
const _sfc_main = vue.defineComponent({
|
|
6
7
|
name: "EleTool",
|
|
7
|
-
components: { EleTooltip },
|
|
8
8
|
props: props.toolProps,
|
|
9
9
|
emits: props.toolEmits,
|
|
10
10
|
setup(props2, { emit }) {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const toolbarProvide = vue.inject(props$1.TOOLBAR_KEY, {});
|
|
12
|
+
const [startHideTipTimer, stopHideTipTimer] = hook.useTimer(200);
|
|
13
|
+
const showTooltip = (text, el, options) => {
|
|
14
|
+
if (toolbarProvide.showTooltip) {
|
|
15
|
+
toolbarProvide.showTooltip(text, el, options);
|
|
16
16
|
}
|
|
17
|
-
visible.value = value;
|
|
18
17
|
};
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
const hideTooltip = () => {
|
|
19
|
+
toolbarProvide.hideTooltip && toolbarProvide.hideTooltip();
|
|
20
|
+
};
|
|
21
|
+
const handleClick = (e) => {
|
|
22
|
+
startHideTipTimer(() => {
|
|
23
|
+
hideTooltip();
|
|
24
|
+
});
|
|
21
25
|
emit("click", e);
|
|
22
26
|
};
|
|
27
|
+
const handleMouseover = (e) => {
|
|
28
|
+
if (props2.title && !props2.disabled) {
|
|
29
|
+
stopHideTipTimer();
|
|
30
|
+
showTooltip(props2.title, e.currentTarget, {
|
|
31
|
+
placement: props2.placement,
|
|
32
|
+
offset: 10
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
23
36
|
vue.watch([() => props2.disabled, () => props2.title], () => {
|
|
24
37
|
if (!props2.title || props2.disabled) {
|
|
25
|
-
|
|
38
|
+
hideTooltip();
|
|
26
39
|
}
|
|
27
40
|
});
|
|
28
41
|
return {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
42
|
+
handleClick,
|
|
43
|
+
handleMouseover,
|
|
44
|
+
showTooltip,
|
|
45
|
+
hideTooltip
|
|
32
46
|
};
|
|
33
47
|
}
|
|
34
48
|
});
|
|
@@ -41,26 +55,15 @@ const _export_sfc = (sfc, props2) => {
|
|
|
41
55
|
};
|
|
42
56
|
const _hoisted_1 = { class: "ele-tool-body" };
|
|
43
57
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
44
|
-
const _component_EleTooltip = vue.resolveComponent("EleTooltip");
|
|
45
58
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
46
59
|
class: "ele-tool",
|
|
47
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.
|
|
60
|
+
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
|
|
61
|
+
onMouseover: _cache[1] || (_cache[1] = (...args) => _ctx.handleMouseover && _ctx.handleMouseover(...args))
|
|
48
62
|
}, [
|
|
49
|
-
vue.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
offset: 10,
|
|
54
|
-
"onUpdate:visible": _ctx.updateVisible
|
|
55
|
-
}, {
|
|
56
|
-
default: vue.withCtx(() => [
|
|
57
|
-
vue.createElementVNode("div", _hoisted_1, [
|
|
58
|
-
vue.renderSlot(_ctx.$slots, "default")
|
|
59
|
-
])
|
|
60
|
-
]),
|
|
61
|
-
_: 3
|
|
62
|
-
}, 8, ["content", "visible", "placement", "onUpdate:visible"])
|
|
63
|
-
]);
|
|
63
|
+
vue.createElementVNode("div", _hoisted_1, [
|
|
64
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
65
|
+
])
|
|
66
|
+
], 32);
|
|
64
67
|
}
|
|
65
68
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
66
69
|
module.exports = index;
|
package/lib/ele-tool/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { EleTooltipProps } from '../ele-app/plus';
|
|
2
|
+
|
|
1
3
|
declare const _default: import('vue').DefineComponent<{
|
|
2
4
|
title: StringConstructor;
|
|
3
5
|
placement: {
|
|
@@ -6,9 +8,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
6
8
|
};
|
|
7
9
|
disabled: BooleanConstructor;
|
|
8
10
|
}, {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
handleClick: (e: MouseEvent) => void;
|
|
12
|
+
handleMouseover: (e: MouseEvent) => void;
|
|
13
|
+
showTooltip: (text?: string, el?: HTMLElement, options?: EleTooltipProps) => void;
|
|
14
|
+
hideTooltip: () => void;
|
|
12
15
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
16
|
click: (_e: MouseEvent) => boolean;
|
|
14
17
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -32,19 +32,6 @@
|
|
|
32
32
|
line-height: inherit;
|
|
33
33
|
position: static;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
.el-tooltip__trigger {
|
|
37
|
-
position: static;
|
|
38
|
-
|
|
39
|
-
&::before {
|
|
40
|
-
content: '';
|
|
41
|
-
position: absolute;
|
|
42
|
-
top: 0;
|
|
43
|
-
left: 0;
|
|
44
|
-
right: 0;
|
|
45
|
-
bottom: 0;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
35
|
}
|
|
49
36
|
|
|
50
37
|
.ele-toolbar .ele-tool {
|
|
@@ -1,11 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const vue = require("vue");
|
|
3
|
+
const EleTooltip = require("../ele-tooltip/index");
|
|
3
4
|
const EleText = require("../ele-text/index");
|
|
4
5
|
const props = require("./props");
|
|
5
6
|
const _sfc_main = vue.defineComponent({
|
|
6
7
|
name: "EleToolbar",
|
|
7
|
-
components: { EleText },
|
|
8
|
-
props: props.toolbarProps
|
|
8
|
+
components: { EleTooltip, EleText },
|
|
9
|
+
props: props.toolbarProps,
|
|
10
|
+
setup() {
|
|
11
|
+
const tooltipRef = vue.ref(null);
|
|
12
|
+
const virtualRef = vue.ref();
|
|
13
|
+
const tooltipContent = vue.ref("");
|
|
14
|
+
const tooltipProps = vue.ref({});
|
|
15
|
+
const showTooltip = (text, el, options) => {
|
|
16
|
+
virtualRef.value = el;
|
|
17
|
+
tooltipContent.value = text ?? "";
|
|
18
|
+
tooltipProps.value = options || {};
|
|
19
|
+
};
|
|
20
|
+
const hideTooltip = () => {
|
|
21
|
+
tooltipRef.value && tooltipRef.value.hide();
|
|
22
|
+
};
|
|
23
|
+
const toolbarProvide = vue.shallowReactive({
|
|
24
|
+
showTooltip,
|
|
25
|
+
hideTooltip
|
|
26
|
+
});
|
|
27
|
+
vue.provide(props.TOOLBAR_KEY, toolbarProvide);
|
|
28
|
+
return {
|
|
29
|
+
tooltipRef,
|
|
30
|
+
virtualRef,
|
|
31
|
+
tooltipContent,
|
|
32
|
+
tooltipProps,
|
|
33
|
+
showTooltip,
|
|
34
|
+
hideTooltip
|
|
35
|
+
};
|
|
36
|
+
}
|
|
9
37
|
});
|
|
10
38
|
const _export_sfc = (sfc, props2) => {
|
|
11
39
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -16,6 +44,7 @@ const _export_sfc = (sfc, props2) => {
|
|
|
16
44
|
};
|
|
17
45
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
18
46
|
const _component_EleText = vue.resolveComponent("EleText");
|
|
47
|
+
const _component_EleTooltip = vue.resolveComponent("EleTooltip");
|
|
19
48
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
20
49
|
class: vue.normalizeClass([
|
|
21
50
|
"ele-toolbar",
|
|
@@ -58,7 +87,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
58
87
|
style: vue.normalizeStyle(_ctx.toolsStyle)
|
|
59
88
|
}, [
|
|
60
89
|
vue.renderSlot(_ctx.$slots, "tools")
|
|
61
|
-
], 4)
|
|
90
|
+
], 4),
|
|
91
|
+
vue.createVNode(_component_EleTooltip, vue.mergeProps({
|
|
92
|
+
trigger: "hover",
|
|
93
|
+
placement: "top",
|
|
94
|
+
persistent: false,
|
|
95
|
+
content: _ctx.tooltipContent
|
|
96
|
+
}, _ctx.tooltipProps || {}, {
|
|
97
|
+
virtualTriggering: true,
|
|
98
|
+
virtualRef: _ctx.virtualRef,
|
|
99
|
+
ref: "tooltipRef"
|
|
100
|
+
}), null, 16, ["content", "virtualRef"])
|
|
62
101
|
], 2);
|
|
63
102
|
}
|
|
64
103
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|