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
package/es/ele-toolbar/index.js
CHANGED
|
@@ -1,10 +1,38 @@
|
|
|
1
|
-
import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, mergeProps, withCtx, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, renderSlot } from "vue";
|
|
1
|
+
import { defineComponent, ref, shallowReactive, provide, resolveComponent, openBlock, createElementBlock, normalizeClass, normalizeStyle, createBlock, mergeProps, withCtx, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, renderSlot, createVNode } from "vue";
|
|
2
|
+
import EleTooltip from "../ele-tooltip/index";
|
|
2
3
|
import EleText from "../ele-text/index";
|
|
3
|
-
import { toolbarProps } from "./props";
|
|
4
|
+
import { toolbarProps, TOOLBAR_KEY } from "./props";
|
|
4
5
|
const _sfc_main = defineComponent({
|
|
5
6
|
name: "EleToolbar",
|
|
6
|
-
components: { EleText },
|
|
7
|
-
props: toolbarProps
|
|
7
|
+
components: { EleTooltip, EleText },
|
|
8
|
+
props: toolbarProps,
|
|
9
|
+
setup() {
|
|
10
|
+
const tooltipRef = ref(null);
|
|
11
|
+
const virtualRef = ref();
|
|
12
|
+
const tooltipContent = ref("");
|
|
13
|
+
const tooltipProps = ref({});
|
|
14
|
+
const showTooltip = (text, el, options) => {
|
|
15
|
+
virtualRef.value = el;
|
|
16
|
+
tooltipContent.value = text ?? "";
|
|
17
|
+
tooltipProps.value = options || {};
|
|
18
|
+
};
|
|
19
|
+
const hideTooltip = () => {
|
|
20
|
+
tooltipRef.value && tooltipRef.value.hide();
|
|
21
|
+
};
|
|
22
|
+
const toolbarProvide = shallowReactive({
|
|
23
|
+
showTooltip,
|
|
24
|
+
hideTooltip
|
|
25
|
+
});
|
|
26
|
+
provide(TOOLBAR_KEY, toolbarProvide);
|
|
27
|
+
return {
|
|
28
|
+
tooltipRef,
|
|
29
|
+
virtualRef,
|
|
30
|
+
tooltipContent,
|
|
31
|
+
tooltipProps,
|
|
32
|
+
showTooltip,
|
|
33
|
+
hideTooltip
|
|
34
|
+
};
|
|
35
|
+
}
|
|
8
36
|
});
|
|
9
37
|
const _export_sfc = (sfc, props) => {
|
|
10
38
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -15,6 +43,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
15
43
|
};
|
|
16
44
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
17
45
|
const _component_EleText = resolveComponent("EleText");
|
|
46
|
+
const _component_EleTooltip = resolveComponent("EleTooltip");
|
|
18
47
|
return openBlock(), createElementBlock("div", {
|
|
19
48
|
class: normalizeClass([
|
|
20
49
|
"ele-toolbar",
|
|
@@ -57,7 +86,17 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
57
86
|
style: normalizeStyle(_ctx.toolsStyle)
|
|
58
87
|
}, [
|
|
59
88
|
renderSlot(_ctx.$slots, "tools")
|
|
60
|
-
], 4)
|
|
89
|
+
], 4),
|
|
90
|
+
createVNode(_component_EleTooltip, mergeProps({
|
|
91
|
+
trigger: "hover",
|
|
92
|
+
placement: "top",
|
|
93
|
+
persistent: false,
|
|
94
|
+
content: _ctx.tooltipContent
|
|
95
|
+
}, _ctx.tooltipProps || {}, {
|
|
96
|
+
virtualTriggering: true,
|
|
97
|
+
virtualRef: _ctx.virtualRef,
|
|
98
|
+
ref: "tooltipRef"
|
|
99
|
+
}), null, 16, ["content", "virtualRef"])
|
|
61
100
|
], 2);
|
|
62
101
|
}
|
|
63
102
|
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PropType, ExtractPropTypes } from 'vue';
|
|
1
|
+
import { PropType, ExtractPropTypes, InjectionKey } from 'vue';
|
|
2
2
|
import { EleTextProps } from '../ele-app/plus';
|
|
3
|
-
import { ToolbarTheme } from './types';
|
|
3
|
+
import { ToolbarTheme, ToolbarProvide } from './types';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* 属性
|
|
@@ -27,3 +27,7 @@ export declare const toolbarProps: {
|
|
|
27
27
|
subtitleProps: PropType<EleTextProps>;
|
|
28
28
|
};
|
|
29
29
|
export type ToolbarProps = ExtractPropTypes<typeof toolbarProps>;
|
|
30
|
+
/**
|
|
31
|
+
* 共享数据key
|
|
32
|
+
*/
|
|
33
|
+
export declare const TOOLBAR_KEY: InjectionKey<ToolbarProvide>;
|
package/es/ele-toolbar/props.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
+
import type { EleTooltipProps } from '../ele-app/plus';
|
|
1
2
|
/**
|
|
2
3
|
* 工具栏主题
|
|
3
4
|
*/
|
|
4
5
|
export type ToolbarTheme = 'default' | 'plain';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 共享数据
|
|
9
|
+
*/
|
|
10
|
+
export interface ToolbarProvide {
|
|
11
|
+
/** 显示提示 */
|
|
12
|
+
showTooltip?: (
|
|
13
|
+
text?: string,
|
|
14
|
+
el?: HTMLElement,
|
|
15
|
+
options?: EleTooltipProps
|
|
16
|
+
) => void;
|
|
17
|
+
/** 关闭提示 */
|
|
18
|
+
hideTooltip?: () => void;
|
|
19
|
+
}
|
|
@@ -51,16 +51,16 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
51
51
|
contentRef: import('vue').ComputedRef<any>;
|
|
52
52
|
isFocusInsideContent: () => void;
|
|
53
53
|
updatePopper: () => void;
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
handleOpen: (opt?: Event) => void;
|
|
55
|
+
handleClose: (opt?: Event) => void;
|
|
56
56
|
hide: (opt?: Event) => void;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
handleUpdateVisible: (visible: boolean) => void;
|
|
58
|
+
handlePopBeforeShow: (e: Event) => void;
|
|
59
|
+
handlePopBeforeHide: (e: Event) => void;
|
|
60
|
+
handlePopShow: (e: Event) => void;
|
|
61
|
+
handlePopHide: (e: Event) => void;
|
|
62
|
+
handlePopOpen: (e: any) => void;
|
|
63
|
+
handlePopClose: (e: any) => void;
|
|
64
64
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, import('./props').TooltipEmits, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
65
65
|
bodyStyle: import('vue').PropType<Partial<import('vue').CSSProperties>>;
|
|
66
66
|
bg: StringConstructor;
|
package/es/ele-tooltip/index.js
CHANGED
|
@@ -76,34 +76,34 @@ const _sfc_main = defineComponent({
|
|
|
76
76
|
const updatePopper = () => {
|
|
77
77
|
tooltipRef.value && tooltipRef.value.updatePopper();
|
|
78
78
|
};
|
|
79
|
-
const
|
|
79
|
+
const handleOpen = (opt) => {
|
|
80
80
|
tooltipRef.value && tooltipRef.value.onOpen(opt);
|
|
81
81
|
};
|
|
82
|
-
const
|
|
82
|
+
const handleClose = (opt) => {
|
|
83
83
|
tooltipRef.value && tooltipRef.value.onClose(opt);
|
|
84
84
|
};
|
|
85
85
|
const hide = (opt) => {
|
|
86
86
|
tooltipRef.value && tooltipRef.value.hide(opt);
|
|
87
87
|
};
|
|
88
|
-
const
|
|
88
|
+
const handleUpdateVisible = (visible) => {
|
|
89
89
|
emit("update:visible", visible);
|
|
90
90
|
};
|
|
91
|
-
const
|
|
91
|
+
const handlePopBeforeShow = (e) => {
|
|
92
92
|
emit("before-show", e);
|
|
93
93
|
};
|
|
94
|
-
const
|
|
94
|
+
const handlePopBeforeHide = (e) => {
|
|
95
95
|
emit("before-hide", e);
|
|
96
96
|
};
|
|
97
|
-
const
|
|
97
|
+
const handlePopShow = (e) => {
|
|
98
98
|
emit("show", e);
|
|
99
99
|
};
|
|
100
|
-
const
|
|
100
|
+
const handlePopHide = (e) => {
|
|
101
101
|
emit("hide", e);
|
|
102
102
|
};
|
|
103
|
-
const
|
|
103
|
+
const handlePopOpen = (e) => {
|
|
104
104
|
emit("open", e);
|
|
105
105
|
};
|
|
106
|
-
const
|
|
106
|
+
const handlePopClose = (e) => {
|
|
107
107
|
emit("close", e);
|
|
108
108
|
};
|
|
109
109
|
return {
|
|
@@ -113,16 +113,16 @@ const _sfc_main = defineComponent({
|
|
|
113
113
|
contentRef,
|
|
114
114
|
isFocusInsideContent,
|
|
115
115
|
updatePopper,
|
|
116
|
-
|
|
117
|
-
|
|
116
|
+
handleOpen,
|
|
117
|
+
handleClose,
|
|
118
118
|
hide,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
119
|
+
handleUpdateVisible,
|
|
120
|
+
handlePopBeforeShow,
|
|
121
|
+
handlePopBeforeHide,
|
|
122
|
+
handlePopShow,
|
|
123
|
+
handlePopHide,
|
|
124
|
+
handlePopOpen,
|
|
125
|
+
handlePopClose
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
});
|
|
@@ -138,13 +138,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
138
138
|
const _component_ElTooltip = resolveComponent("ElTooltip");
|
|
139
139
|
return openBlock(), createBlock(_component_ElTooltip, mergeProps(_ctx.rootProps, {
|
|
140
140
|
ref: "tooltipRef",
|
|
141
|
-
"onUpdate:visible": _ctx.
|
|
142
|
-
onBeforeShow: _ctx.
|
|
143
|
-
onBeforeHide: _ctx.
|
|
144
|
-
onShow: _ctx.
|
|
145
|
-
onHide: _ctx.
|
|
146
|
-
onOpen: _ctx.
|
|
147
|
-
onClose: _ctx.
|
|
141
|
+
"onUpdate:visible": _ctx.handleUpdateVisible,
|
|
142
|
+
onBeforeShow: _ctx.handlePopBeforeShow,
|
|
143
|
+
onBeforeHide: _ctx.handlePopBeforeHide,
|
|
144
|
+
onShow: _ctx.handlePopShow,
|
|
145
|
+
onHide: _ctx.handlePopHide,
|
|
146
|
+
onOpen: _ctx.handlePopOpen,
|
|
147
|
+
onClose: _ctx.handlePopClose
|
|
148
148
|
}), {
|
|
149
149
|
content: withCtx(() => [
|
|
150
150
|
renderSlot(_ctx.$slots, "body", {}, () => [
|
package/es/ele-tour/index.d.ts
CHANGED
|
@@ -28,9 +28,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
28
28
|
isLast: Ref<boolean>;
|
|
29
29
|
boxStyle: Ref<Partial<import('vue').CSSProperties>>;
|
|
30
30
|
showMask: Ref<boolean>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
handlePrev: () => void;
|
|
32
|
+
handleNext: () => void;
|
|
33
|
+
handleFinish: () => void;
|
|
34
34
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
35
35
|
'update:modelValue': (_value?: number | null | undefined) => boolean;
|
|
36
36
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
package/es/ele-tour/index.js
CHANGED
|
@@ -68,17 +68,17 @@ const _sfc_main = defineComponent({
|
|
|
68
68
|
const updateModelValue = (value) => {
|
|
69
69
|
emit("update:modelValue", value);
|
|
70
70
|
};
|
|
71
|
-
const
|
|
71
|
+
const handlePrev = () => {
|
|
72
72
|
if (props.modelValue != null && props.steps != null && props.steps.length && props.modelValue > 0) {
|
|
73
73
|
updateModelValue(props.modelValue - 1);
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
const
|
|
76
|
+
const handleNext = () => {
|
|
77
77
|
if (props.modelValue != null && props.steps != null && props.steps.length && props.modelValue < props.steps.length - 1) {
|
|
78
78
|
updateModelValue(props.modelValue + 1);
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
const
|
|
81
|
+
const handleFinish = () => {
|
|
82
82
|
updateModelValue(null);
|
|
83
83
|
};
|
|
84
84
|
const updatePopper = () => {
|
|
@@ -103,9 +103,9 @@ const _sfc_main = defineComponent({
|
|
|
103
103
|
isLast,
|
|
104
104
|
boxStyle,
|
|
105
105
|
showMask,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
handlePrev,
|
|
107
|
+
handleNext,
|
|
108
|
+
handleFinish
|
|
109
109
|
};
|
|
110
110
|
}
|
|
111
111
|
});
|
|
@@ -181,7 +181,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
181
181
|
!_ctx.isLast ? (openBlock(), createBlock(_component_ElButton, {
|
|
182
182
|
key: 0,
|
|
183
183
|
size: "small",
|
|
184
|
-
onClick: _ctx.
|
|
184
|
+
onClick: _ctx.handleFinish
|
|
185
185
|
}, {
|
|
186
186
|
default: withCtx(() => [
|
|
187
187
|
createTextVNode(toDisplayString(_ctx.lang.skip), 1)
|
|
@@ -191,7 +191,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
191
191
|
_ctx.modelValue !== 0 ? (openBlock(), createBlock(_component_ElButton, {
|
|
192
192
|
key: 1,
|
|
193
193
|
size: "small",
|
|
194
|
-
onClick: _ctx.
|
|
194
|
+
onClick: _ctx.handlePrev
|
|
195
195
|
}, {
|
|
196
196
|
default: withCtx(() => [
|
|
197
197
|
createTextVNode(toDisplayString(_ctx.lang.prev), 1)
|
|
@@ -202,7 +202,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
202
202
|
key: 2,
|
|
203
203
|
size: "small",
|
|
204
204
|
type: "primary",
|
|
205
|
-
onClick: _ctx.
|
|
205
|
+
onClick: _ctx.handleNext
|
|
206
206
|
}, {
|
|
207
207
|
default: withCtx(() => [
|
|
208
208
|
createTextVNode(toDisplayString(_ctx.lang.next), 1)
|
|
@@ -213,7 +213,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
213
213
|
key: 3,
|
|
214
214
|
size: "small",
|
|
215
215
|
type: "primary",
|
|
216
|
-
onClick: _ctx.
|
|
216
|
+
onClick: _ctx.handleFinish
|
|
217
217
|
}, {
|
|
218
218
|
default: withCtx(() => [
|
|
219
219
|
createTextVNode(toDisplayString(_ctx.lang.finish), 1)
|
|
@@ -66,15 +66,15 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
66
66
|
updatePopover: () => void;
|
|
67
67
|
treeFilter: (keywords: string, item: DataItem) => any;
|
|
68
68
|
updateVisible: (visible: boolean) => void;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
69
|
+
handleSelectFilter: (keywords: string) => void;
|
|
70
|
+
handleSelectRemove: (item: SelectedItem) => void;
|
|
71
|
+
handleSelectClear: () => void;
|
|
72
|
+
handleSelectFocus: (e: FocusEvent) => void;
|
|
73
|
+
handleSelectBlur: (e: FocusEvent) => void;
|
|
74
|
+
handleTreeClick: (item: DataItem, _node: any, e: MouseEvent) => void;
|
|
75
|
+
handleTreeCheck: () => void;
|
|
76
|
+
handleTreeExpand: () => void;
|
|
77
|
+
handleTreeCollapse: () => void;
|
|
78
78
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
79
79
|
'update:modelValue': (_value: SelectValue) => boolean;
|
|
80
80
|
change: (_value: SelectValue) => boolean;
|
|
@@ -133,7 +133,7 @@ const _sfc_main = defineComponent({
|
|
|
133
133
|
const label = item[treeOptions.value.label];
|
|
134
134
|
return label != null && label.includes(keywords);
|
|
135
135
|
};
|
|
136
|
-
const
|
|
136
|
+
const handleSelectFilter = (keywords) => {
|
|
137
137
|
treeRef.value && treeRef.value.filter(keywords);
|
|
138
138
|
};
|
|
139
139
|
const focusSearchInput = () => {
|
|
@@ -147,14 +147,14 @@ const _sfc_main = defineComponent({
|
|
|
147
147
|
};
|
|
148
148
|
const updateVisible = (visible) => {
|
|
149
149
|
if (visible) {
|
|
150
|
-
|
|
150
|
+
handleSelectFilter("");
|
|
151
151
|
}
|
|
152
152
|
if (selectVisible.value !== visible) {
|
|
153
153
|
selectVisible.value = visible;
|
|
154
154
|
emit("visibleChange", visible);
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
|
-
const
|
|
157
|
+
const handleSelectRemove = (item) => {
|
|
158
158
|
treeRef.value && treeRef.value.setChecked(item.value, false);
|
|
159
159
|
const keys = treeRef.value && treeRef.value.getCheckedKeys() || [];
|
|
160
160
|
selectedItems.value = getMultipleSelected(keys);
|
|
@@ -163,18 +163,18 @@ const _sfc_main = defineComponent({
|
|
|
163
163
|
);
|
|
164
164
|
emit("removeTag", item.value);
|
|
165
165
|
};
|
|
166
|
-
const
|
|
166
|
+
const handleSelectClear = () => {
|
|
167
167
|
updateModelValue(props.multiple ? [] : null);
|
|
168
168
|
updateVisible(false);
|
|
169
169
|
emit("clear");
|
|
170
170
|
};
|
|
171
|
-
const
|
|
171
|
+
const handleSelectFocus = (e) => {
|
|
172
172
|
emit("focus", e);
|
|
173
173
|
};
|
|
174
|
-
const
|
|
174
|
+
const handleSelectBlur = (e) => {
|
|
175
175
|
emit("blur", e);
|
|
176
176
|
};
|
|
177
|
-
const
|
|
177
|
+
const handleTreeClick = (item, _node, e) => {
|
|
178
178
|
var _a, _b, _c;
|
|
179
179
|
e.stopPropagation();
|
|
180
180
|
const valueKey = treeOptions.value.value;
|
|
@@ -240,7 +240,7 @@ const _sfc_main = defineComponent({
|
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
242
|
};
|
|
243
|
-
const
|
|
243
|
+
const handleTreeCheck = () => {
|
|
244
244
|
const keys = treeRef.value && treeRef.value.getCheckedKeys() || [];
|
|
245
245
|
selectedItems.value = getMultipleSelected(keys);
|
|
246
246
|
updateModelValue(
|
|
@@ -248,10 +248,10 @@ const _sfc_main = defineComponent({
|
|
|
248
248
|
);
|
|
249
249
|
focusSearchInput();
|
|
250
250
|
};
|
|
251
|
-
const
|
|
251
|
+
const handleTreeExpand = () => {
|
|
252
252
|
focusSearchInput();
|
|
253
253
|
};
|
|
254
|
-
const
|
|
254
|
+
const handleTreeCollapse = () => {
|
|
255
255
|
focusSearchInput();
|
|
256
256
|
};
|
|
257
257
|
watch(
|
|
@@ -353,15 +353,15 @@ const _sfc_main = defineComponent({
|
|
|
353
353
|
updatePopover,
|
|
354
354
|
treeFilter,
|
|
355
355
|
updateVisible,
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
356
|
+
handleSelectFilter,
|
|
357
|
+
handleSelectRemove,
|
|
358
|
+
handleSelectClear,
|
|
359
|
+
handleSelectFocus,
|
|
360
|
+
handleSelectBlur,
|
|
361
|
+
handleTreeClick,
|
|
362
|
+
handleTreeCheck,
|
|
363
|
+
handleTreeExpand,
|
|
364
|
+
handleTreeCollapse
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
367
|
});
|
|
@@ -402,11 +402,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
402
402
|
selected: _ctx.selectedItems.filter((d) => !d.hide),
|
|
403
403
|
visible: _ctx.selectVisible,
|
|
404
404
|
"onUpdate:visible": _ctx.updateVisible,
|
|
405
|
-
onFilterChange: _ctx.
|
|
406
|
-
onRemoveTag: _ctx.
|
|
407
|
-
onClear: _ctx.
|
|
408
|
-
onFocus: _ctx.
|
|
409
|
-
onBlur: _ctx.
|
|
405
|
+
onFilterChange: _ctx.handleSelectFilter,
|
|
406
|
+
onRemoveTag: _ctx.handleSelectRemove,
|
|
407
|
+
onClear: _ctx.handleSelectClear,
|
|
408
|
+
onFocus: _ctx.handleSelectFocus,
|
|
409
|
+
onBlur: _ctx.handleSelectBlur
|
|
410
410
|
}, createSlots({
|
|
411
411
|
default: withCtx(() => [
|
|
412
412
|
createVNode(_component_ElTreeV2, mergeProps({
|
|
@@ -419,10 +419,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
419
419
|
showCheckbox: !!_ctx.multiple,
|
|
420
420
|
checkOnClickNode: false,
|
|
421
421
|
defaultCheckedKeys: _ctx.multiple ? _ctx.modelValue : void 0,
|
|
422
|
-
onCheck: _ctx.
|
|
423
|
-
onNodeClick: _ctx.
|
|
424
|
-
onNodeExpand: _ctx.
|
|
425
|
-
onNodeCollapse: _ctx.
|
|
422
|
+
onCheck: _ctx.handleTreeCheck,
|
|
423
|
+
onNodeClick: _ctx.handleTreeClick,
|
|
424
|
+
onNodeExpand: _ctx.handleTreeExpand,
|
|
425
|
+
onNodeCollapse: _ctx.handleTreeCollapse
|
|
426
426
|
}), {
|
|
427
427
|
default: withCtx((slotProps) => [
|
|
428
428
|
createElementVNode("span", {
|
|
@@ -22,9 +22,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
22
22
|
required: true;
|
|
23
23
|
};
|
|
24
24
|
}, {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
handleRemove: () => void;
|
|
26
|
+
handleItemClick: () => void;
|
|
27
|
+
handleRetry: () => void;
|
|
28
28
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
29
29
|
itemClick: (_item: UploadItem) => true;
|
|
30
30
|
remove: (_item: UploadItem) => true;
|
|
@@ -39,16 +39,16 @@ const _sfc_main = defineComponent({
|
|
|
39
39
|
retry: (_item) => true
|
|
40
40
|
},
|
|
41
41
|
setup(props, { emit }) {
|
|
42
|
-
const
|
|
42
|
+
const handleRemove = () => {
|
|
43
43
|
emit("remove", props.item);
|
|
44
44
|
};
|
|
45
|
-
const
|
|
45
|
+
const handleItemClick = () => {
|
|
46
46
|
emit("itemClick", props.item);
|
|
47
47
|
};
|
|
48
|
-
const
|
|
48
|
+
const handleRetry = () => {
|
|
49
49
|
emit("retry", props.item);
|
|
50
50
|
};
|
|
51
|
-
return {
|
|
51
|
+
return { handleRemove, handleItemClick, handleRetry };
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
const _export_sfc = (sfc, props) => {
|
|
@@ -83,7 +83,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
83
83
|
return openBlock(), createElementBlock("div", {
|
|
84
84
|
title: _ctx.item.name,
|
|
85
85
|
class: "ele-upload-item",
|
|
86
|
-
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.
|
|
86
|
+
onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleItemClick && _ctx.handleItemClick(...args))
|
|
87
87
|
}, [
|
|
88
88
|
renderSlot(_ctx.$slots, "thumbnail", { item: _ctx.item }, () => [
|
|
89
89
|
_ctx.item.url ? (openBlock(), createBlock(_component_ElImage, mergeProps({
|
|
@@ -103,7 +103,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
103
103
|
!_ctx.readonly && !_ctx.disabled && !_ctx.item.readonly ? (openBlock(), createElementBlock("div", {
|
|
104
104
|
key: 0,
|
|
105
105
|
class: "ele-upload-remove",
|
|
106
|
-
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.
|
|
106
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.handleRemove && _ctx.handleRemove(...args), ["stop"]))
|
|
107
107
|
}, [
|
|
108
108
|
renderSlot(_ctx.$slots, "remove", { item: _ctx.item }, () => [
|
|
109
109
|
createVNode(_component_ElIcon, null, {
|
|
@@ -125,7 +125,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
125
125
|
_ctx.item.status === "exception" ? (openBlock(), createElementBlock("div", {
|
|
126
126
|
key: 0,
|
|
127
127
|
class: "ele-upload-retry",
|
|
128
|
-
onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.
|
|
128
|
+
onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.handleRetry && _ctx.handleRetry(...args), ["stop"]))
|
|
129
129
|
}, [
|
|
130
130
|
createVNode(_component_EleTooltip, {
|
|
131
131
|
content: _ctx.locale.retry,
|
|
@@ -42,10 +42,10 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
42
42
|
uploadEnable: import('vue').ComputedRef<boolean>;
|
|
43
43
|
draggableProps: import('vue').ComputedRef<Record<string | number | symbol, any>>;
|
|
44
44
|
updateModelValue: (value: UploadItem[]) => void;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
handleUpload: (file: File) => boolean;
|
|
46
|
+
handleItemRemove: (item: UploadItem) => void;
|
|
47
|
+
handleItemClick: (item: UploadItem) => void;
|
|
48
|
+
handleItemRetry: (item: UploadItem) => void;
|
|
49
49
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
50
50
|
'update:modelValue': (_value: UploadItem[]) => boolean;
|
|
51
51
|
itemClick: (_item: UploadItem) => boolean;
|
|
@@ -51,7 +51,7 @@ const _sfc_main = defineComponent({
|
|
|
51
51
|
const updateModelValue = (value) => {
|
|
52
52
|
emit("update:modelValue", value);
|
|
53
53
|
};
|
|
54
|
-
const
|
|
54
|
+
const handleUpload = (file) => {
|
|
55
55
|
if (!uploadEnable.value || props.disabled) {
|
|
56
56
|
return false;
|
|
57
57
|
}
|
|
@@ -63,15 +63,15 @@ const _sfc_main = defineComponent({
|
|
|
63
63
|
file
|
|
64
64
|
};
|
|
65
65
|
if (file.type.startsWith("image")) {
|
|
66
|
-
item.url =
|
|
66
|
+
item.url = URL.createObjectURL(file);
|
|
67
67
|
}
|
|
68
68
|
emit("upload", item);
|
|
69
69
|
return false;
|
|
70
70
|
};
|
|
71
|
-
const
|
|
71
|
+
const handleItemRemove = (item) => {
|
|
72
72
|
emit("remove", item);
|
|
73
73
|
};
|
|
74
|
-
const
|
|
74
|
+
const handleItemClick = (item) => {
|
|
75
75
|
if (props.preview && item.url && props.modelValue != null) {
|
|
76
76
|
const temp = props.modelValue.filter((d) => !!d.url);
|
|
77
77
|
const i = temp.findIndex((t) => t.key === item.key);
|
|
@@ -92,7 +92,7 @@ const _sfc_main = defineComponent({
|
|
|
92
92
|
}
|
|
93
93
|
emit("itemClick", item);
|
|
94
94
|
};
|
|
95
|
-
const
|
|
95
|
+
const handleItemRetry = (item) => {
|
|
96
96
|
emit("retry", item);
|
|
97
97
|
};
|
|
98
98
|
onDeactivated(() => {
|
|
@@ -105,10 +105,10 @@ const _sfc_main = defineComponent({
|
|
|
105
105
|
uploadEnable,
|
|
106
106
|
draggableProps,
|
|
107
107
|
updateModelValue,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
handleUpload,
|
|
109
|
+
handleItemRemove,
|
|
110
|
+
handleItemClick,
|
|
111
|
+
handleItemRetry
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
114
|
});
|
|
@@ -140,9 +140,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
140
140
|
class: normalizeClass({
|
|
141
141
|
"ele-draggable": _ctx.sortable && !_ctx.readonly && !_ctx.disabled && _ctx.limit !== 1
|
|
142
142
|
}),
|
|
143
|
-
onItemClick: _ctx.
|
|
144
|
-
onRemove: _ctx.
|
|
145
|
-
onRetry: _ctx.
|
|
143
|
+
onItemClick: _ctx.handleItemClick,
|
|
144
|
+
onRemove: _ctx.handleItemRemove,
|
|
145
|
+
onRetry: _ctx.handleItemRetry
|
|
146
146
|
}, createSlots({ _: 2 }, [
|
|
147
147
|
renderList(Object.keys(_ctx.$slots), (name) => {
|
|
148
148
|
return {
|
|
@@ -167,7 +167,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
167
167
|
multiple: _ctx.multiple,
|
|
168
168
|
disabled: _ctx.disabled,
|
|
169
169
|
showUploadList: false,
|
|
170
|
-
beforeUpload: _ctx.
|
|
170
|
+
beforeUpload: _ctx.handleUpload
|
|
171
171
|
}, {
|
|
172
172
|
default: withCtx(() => [
|
|
173
173
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
@@ -76,14 +76,14 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
76
76
|
cellText: import('vue').ComputedRef<string | undefined>;
|
|
77
77
|
isExpandCol: import('vue').ComputedRef<boolean>;
|
|
78
78
|
renderOpt: import('vue').ComputedRef<CustomRenderProps>;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
79
|
+
handleTextClick: (e: MouseEvent) => void;
|
|
80
|
+
handleCheckedChange: (checked: boolean) => void;
|
|
81
|
+
handleExpandChange: () => void;
|
|
82
|
+
handleClick: (e: MouseEvent) => void;
|
|
83
|
+
handleDblclick: (e: MouseEvent) => void;
|
|
84
|
+
handleContextmenu: (e: MouseEvent) => void;
|
|
85
|
+
handleMouseenter: (e: MouseEvent) => void;
|
|
86
|
+
handleMouseleave: (e: MouseEvent) => void;
|
|
87
87
|
}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
88
88
|
/** 多选框选中改变事件 */
|
|
89
89
|
checkedChange: (_checked: boolean) => true;
|