ele-admin-plus 1.1.9-beta.6 → 1.1.9-beta.8
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-alert/index.js +2 -4
- package/es/ele-app/plus.d.ts +3 -0
- package/es/ele-avatar-group/index.d.ts +1 -1
- package/es/ele-avatar-group/index.js +1 -3
- package/es/ele-basic-select/index.d.ts +8 -8
- package/es/ele-basic-select/index.js +17 -13
- package/es/ele-check-card/index.d.ts +2 -2
- package/es/ele-check-card/index.js +0 -5
- package/es/ele-config-provider/components/receiver-view.d.ts +17 -0
- package/es/ele-config-provider/components/receiver-view.js +45 -0
- package/es/ele-copyable/index.d.ts +4 -6
- package/es/ele-copyable/index.js +1 -5
- package/es/ele-cropper/index.d.ts +6 -6
- package/es/ele-cropper/index.js +1 -5
- package/es/ele-dashboard/index.d.ts +0 -1
- package/es/ele-dashboard/index.js +8 -17
- package/es/ele-data-table/props.d.ts +2 -2
- package/es/ele-dot/index.d.ts +2 -4
- package/es/ele-dot/index.js +4 -10
- package/es/ele-drawer/index.d.ts +6 -6
- package/es/ele-drawer/index.js +14 -11
- package/es/ele-dropdown/index.js +6 -10
- package/es/ele-dropdown/style/index.scss +2 -2
- package/es/ele-edit-tag/index.d.ts +6 -0
- package/es/ele-edit-tag/index.js +17 -15
- package/es/ele-edit-tag/props.d.ts +4 -0
- package/es/ele-edit-tag/props.js +5 -1
- package/es/ele-edit-tag/style/index.scss +13 -0
- package/es/ele-ellipsis/index.d.ts +3 -3
- package/es/ele-ellipsis/index.js +4 -27
- package/es/ele-file-list/components/file-grid-item.js +16 -9
- package/es/ele-file-list/components/file-grid.js +54 -50
- package/es/ele-file-list/components/file-table-item.js +20 -15
- package/es/ele-file-list/components/file-table.js +92 -86
- package/es/ele-file-list/index.d.ts +4 -4
- package/es/ele-file-list/index.js +1 -11
- package/es/ele-file-list-tool/index.d.ts +3 -3
- package/es/ele-file-list-tool/index.js +2 -2
- package/es/ele-icon-select/index.d.ts +22 -10
- package/es/ele-icon-select/index.js +33 -10
- package/es/ele-icon-select/props.d.ts +6 -1
- package/es/ele-icon-select/props.js +6 -1
- package/es/ele-icon-select/style/index.js +1 -0
- package/es/ele-icon-select/style/index.scss +16 -2
- package/es/ele-loading/index.d.ts +0 -2
- package/es/ele-loading/index.js +32 -30
- package/es/ele-map-picker/components/map-view.d.ts +22 -18
- package/es/ele-map-picker/components/map-view.js +77 -50
- package/es/ele-map-picker/index.d.ts +5 -3
- package/es/ele-map-picker/props.d.ts +6 -4
- package/es/ele-map-picker/props.js +5 -3
- package/es/ele-map-picker/style/index.scss +1 -1
- package/es/ele-menus/index.d.ts +10 -1
- package/es/ele-menus/index.js +63 -12
- package/es/ele-menus/props.d.ts +8 -0
- package/es/ele-menus/props.js +10 -2
- package/es/ele-menus/style/index.js +2 -0
- package/es/ele-menus/style/index.scss +1 -0
- package/es/ele-menus/util.d.ts +15 -3
- package/es/ele-menus/util.js +47 -21
- package/es/ele-modal/index.d.ts +2 -2
- package/es/ele-modal/index.js +14 -8
- package/es/ele-modal/style/index.scss +1 -0
- package/es/ele-pagination/index.d.ts +6 -6
- package/es/ele-pagination/index.js +2 -8
- package/es/ele-popconfirm/index.d.ts +3 -3
- package/es/ele-popconfirm/style/index.js +1 -1
- package/es/ele-popover/index.d.ts +3 -3
- package/es/ele-popover/props.d.ts +1 -1
- package/es/ele-popover/style/index.js +0 -1
- package/es/ele-printer/index.d.ts +6 -6
- package/es/ele-printer/index.js +11 -11
- package/es/ele-pro-layout/components/pro-header.d.ts +9 -0
- package/es/ele-pro-layout/components/pro-header.js +8 -2
- package/es/ele-pro-layout/components/pro-sidebar.d.ts +9 -0
- package/es/ele-pro-layout/components/pro-sidebar.js +8 -2
- package/es/ele-pro-layout/components/pro-sidebox.d.ts +9 -0
- package/es/ele-pro-layout/components/pro-sidebox.js +11 -3
- package/es/ele-pro-layout/index.d.ts +33 -30
- package/es/ele-pro-layout/index.js +16 -17
- package/es/ele-pro-layout/props.d.ts +9 -5
- package/es/ele-pro-layout/props.js +9 -5
- package/es/ele-pro-table/index.d.ts +15 -15
- package/es/ele-pro-table/index.js +1 -6
- package/es/ele-pro-table/props.d.ts +3 -3
- package/es/ele-segmented/index.js +1 -3
- package/es/ele-split-panel/index.d.ts +9 -8
- package/es/ele-split-panel/index.js +63 -59
- package/es/ele-steps/index.d.ts +0 -1
- package/es/ele-steps/index.js +2 -4
- package/es/ele-table-select/index.d.ts +1 -1
- package/es/ele-tabs/index.d.ts +7 -5
- package/es/ele-tabs/index.js +1 -6
- package/es/ele-tabs/props.d.ts +1 -1
- package/es/ele-tooltip/index.js +9 -13
- package/es/ele-tooltip/style/css-var.scss +4 -0
- package/es/ele-tooltip/style/index.scss +23 -0
- package/es/ele-tour/index.js +80 -77
- package/es/ele-upload-list/components/list-item.d.ts +1 -1
- package/es/ele-upload-list/index.d.ts +6 -4
- package/es/ele-upload-list/index.js +2 -3
- package/es/ele-upload-list/style/index.scss +2 -1
- package/es/ele-virtual-table/index.d.ts +1 -1
- package/es/ele-virtual-table/props.d.ts +2 -2
- package/es/ele-virtual-table/util.js +2 -18
- package/es/ele-watermark/index.d.ts +9 -0
- package/es/ele-watermark/index.js +1 -1
- package/es/ele-watermark/props.d.ts +5 -0
- package/es/ele-watermark/props.js +5 -0
- package/es/style/index.scss +1 -43
- package/es/style/plus.scss +43 -0
- package/es/style/themes/default.scss +6 -3
- package/es/style/themes/rounded.scss +1 -1
- package/es/style/themes/theme-util.scss +0 -2
- package/es/utils/core.d.ts +5 -0
- package/es/utils/core.js +28 -0
- package/es/utils/resolvers.d.ts +2 -2
- package/es/utils/resolvers.js +33 -20
- package/lib/ele-alert/index.cjs +2 -4
- package/lib/ele-app/plus.d.ts +3 -0
- package/lib/ele-avatar-group/index.cjs +1 -3
- package/lib/ele-avatar-group/index.d.ts +1 -1
- package/lib/ele-basic-select/index.cjs +16 -12
- package/lib/ele-basic-select/index.d.ts +8 -8
- package/lib/ele-check-card/index.cjs +0 -5
- package/lib/ele-check-card/index.d.ts +2 -2
- package/lib/ele-config-provider/components/receiver-view.cjs +44 -0
- package/lib/ele-config-provider/components/receiver-view.d.ts +17 -0
- package/lib/ele-copyable/index.cjs +0 -4
- package/lib/ele-copyable/index.d.ts +4 -6
- package/lib/ele-cropper/index.cjs +0 -4
- package/lib/ele-cropper/index.d.ts +6 -6
- package/lib/ele-dashboard/index.cjs +7 -16
- package/lib/ele-dashboard/index.d.ts +0 -1
- package/lib/ele-data-table/props.d.ts +2 -2
- package/lib/ele-dot/index.cjs +3 -9
- package/lib/ele-dot/index.d.ts +2 -4
- package/lib/ele-drawer/index.cjs +13 -10
- package/lib/ele-drawer/index.d.ts +6 -6
- package/lib/ele-dropdown/index.cjs +6 -10
- package/lib/ele-dropdown/style/index.scss +2 -2
- package/lib/ele-edit-tag/index.cjs +16 -14
- package/lib/ele-edit-tag/index.d.ts +6 -0
- package/lib/ele-edit-tag/props.cjs +5 -1
- package/lib/ele-edit-tag/props.d.ts +4 -0
- package/lib/ele-edit-tag/style/index.scss +13 -0
- package/lib/ele-ellipsis/index.cjs +3 -26
- package/lib/ele-ellipsis/index.d.ts +3 -3
- package/lib/ele-file-list/components/file-grid-item.cjs +15 -8
- package/lib/ele-file-list/components/file-grid.cjs +53 -49
- package/lib/ele-file-list/components/file-table-item.cjs +19 -14
- package/lib/ele-file-list/components/file-table.cjs +91 -85
- package/lib/ele-file-list/index.cjs +0 -10
- package/lib/ele-file-list/index.d.ts +4 -4
- package/lib/ele-file-list-tool/index.cjs +2 -2
- package/lib/ele-file-list-tool/index.d.ts +3 -3
- package/lib/ele-icon-select/index.cjs +39 -16
- package/lib/ele-icon-select/index.d.ts +22 -10
- package/lib/ele-icon-select/props.cjs +6 -1
- package/lib/ele-icon-select/props.d.ts +6 -1
- package/lib/ele-icon-select/style/index.cjs +1 -0
- package/lib/ele-icon-select/style/index.scss +16 -2
- package/lib/ele-loading/index.cjs +31 -29
- package/lib/ele-loading/index.d.ts +0 -2
- package/lib/ele-map-picker/components/map-view.cjs +76 -49
- package/lib/ele-map-picker/components/map-view.d.ts +22 -18
- package/lib/ele-map-picker/index.d.ts +5 -3
- package/lib/ele-map-picker/props.cjs +5 -3
- package/lib/ele-map-picker/props.d.ts +6 -4
- package/lib/ele-map-picker/style/index.scss +1 -1
- package/lib/ele-menus/index.cjs +61 -10
- package/lib/ele-menus/index.d.ts +10 -1
- package/lib/ele-menus/props.cjs +10 -2
- package/lib/ele-menus/props.d.ts +8 -0
- package/lib/ele-menus/style/index.cjs +2 -0
- package/lib/ele-menus/style/index.scss +1 -0
- package/lib/ele-menus/util.cjs +47 -21
- package/lib/ele-menus/util.d.ts +15 -3
- package/lib/ele-modal/index.cjs +13 -7
- package/lib/ele-modal/index.d.ts +2 -2
- package/lib/ele-modal/style/index.scss +1 -0
- package/lib/ele-pagination/index.cjs +2 -8
- package/lib/ele-pagination/index.d.ts +6 -6
- package/lib/ele-popconfirm/index.d.ts +3 -3
- package/lib/ele-popconfirm/style/index.cjs +1 -1
- package/lib/ele-popover/index.d.ts +3 -3
- package/lib/ele-popover/props.d.ts +1 -1
- package/lib/ele-popover/style/index.cjs +0 -1
- package/lib/ele-printer/index.cjs +10 -10
- package/lib/ele-printer/index.d.ts +6 -6
- package/lib/ele-pro-layout/components/pro-header.cjs +8 -2
- package/lib/ele-pro-layout/components/pro-header.d.ts +9 -0
- package/lib/ele-pro-layout/components/pro-sidebar.cjs +8 -2
- package/lib/ele-pro-layout/components/pro-sidebar.d.ts +9 -0
- package/lib/ele-pro-layout/components/pro-sidebox.cjs +11 -3
- package/lib/ele-pro-layout/components/pro-sidebox.d.ts +9 -0
- package/lib/ele-pro-layout/index.cjs +15 -16
- package/lib/ele-pro-layout/index.d.ts +33 -30
- package/lib/ele-pro-layout/props.cjs +9 -5
- package/lib/ele-pro-layout/props.d.ts +9 -5
- package/lib/ele-pro-table/index.cjs +0 -5
- package/lib/ele-pro-table/index.d.ts +15 -15
- package/lib/ele-pro-table/props.d.ts +3 -3
- package/lib/ele-segmented/index.cjs +1 -3
- package/lib/ele-split-panel/index.cjs +62 -58
- package/lib/ele-split-panel/index.d.ts +9 -8
- package/lib/ele-steps/index.cjs +2 -4
- package/lib/ele-steps/index.d.ts +0 -1
- package/lib/ele-table-select/index.d.ts +1 -1
- package/lib/ele-tabs/index.cjs +1 -6
- package/lib/ele-tabs/index.d.ts +7 -5
- package/lib/ele-tabs/props.d.ts +1 -1
- package/lib/ele-tooltip/index.cjs +9 -13
- package/lib/ele-tooltip/style/css-var.scss +4 -0
- package/lib/ele-tooltip/style/index.scss +23 -0
- package/lib/ele-tour/index.cjs +79 -76
- package/lib/ele-upload-list/components/list-item.d.ts +1 -1
- package/lib/ele-upload-list/index.cjs +1 -2
- package/lib/ele-upload-list/index.d.ts +6 -4
- package/lib/ele-upload-list/style/index.scss +2 -1
- package/lib/ele-virtual-table/index.d.ts +1 -1
- package/lib/ele-virtual-table/props.d.ts +2 -2
- package/lib/ele-virtual-table/util.cjs +1 -17
- package/lib/ele-watermark/index.cjs +1 -1
- package/lib/ele-watermark/index.d.ts +9 -0
- package/lib/ele-watermark/props.cjs +5 -0
- package/lib/ele-watermark/props.d.ts +5 -0
- package/lib/style/index.scss +1 -43
- package/lib/style/plus.scss +43 -0
- package/lib/style/themes/default.scss +6 -3
- package/lib/style/themes/rounded.scss +1 -1
- package/lib/style/themes/theme-util.scss +0 -2
- package/lib/utils/core.cjs +28 -0
- package/lib/utils/core.d.ts +5 -0
- package/lib/utils/resolvers.cjs +33 -20
- package/lib/utils/resolvers.d.ts +2 -2
- package/package.json +1 -1
- package/es/ele-map-picker/components/map-search.d.ts +0 -22
- package/es/ele-map-picker/components/map-search.js +0 -75
- package/es/ele-popover/style/css-var.scss +0 -8
- package/es/ele-popover/style/index.scss +0 -27
- package/lib/ele-map-picker/components/map-search.cjs +0 -74
- package/lib/ele-map-picker/components/map-search.d.ts +0 -22
- package/lib/ele-popover/style/css-var.scss +0 -8
- package/lib/ele-popover/style/index.scss +0 -27
package/es/ele-drawer/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, unref, onActivated, onDeactivated, resolveComponent, openBlock, createBlock, createSlots, withCtx, createElementVNode, normalizeStyle, renderSlot, createTextVNode, toDisplayString, createElementBlock, createVNode, createCommentVNode } from "vue";
|
|
2
2
|
import { ElDrawer, ElIcon, drawerEmits } from "element-plus";
|
|
3
|
-
import { useLicense, useLayoutState } from "../ele-config-provider/receiver";
|
|
4
|
-
import { collapseClass, compactClass, maximizedClass, hasTabClass, mixSidebarClass, singleSidebarClass, topLayoutClass, expandedClass, mobileClass } from "../ele-modal/util";
|
|
5
3
|
import { CloseOutlined } from "../icons";
|
|
4
|
+
import ReceiverView from "../ele-config-provider/components/receiver-view";
|
|
5
|
+
import { useLayoutState } from "../ele-config-provider/receiver";
|
|
6
|
+
import { collapseClass, compactClass, maximizedClass, hasTabClass, mixSidebarClass, singleSidebarClass, topLayoutClass, expandedClass, mobileClass } from "../ele-modal/util";
|
|
6
7
|
import { drawerProps } from "./props";
|
|
7
8
|
const _sfc_main = defineComponent({
|
|
8
9
|
name: "EleDrawer",
|
|
9
|
-
components: { ElDrawer, ElIcon, CloseOutlined },
|
|
10
|
+
components: { ElDrawer, ElIcon, CloseOutlined, ReceiverView },
|
|
10
11
|
props: drawerProps,
|
|
11
12
|
emits: drawerEmits,
|
|
12
13
|
setup(props, { emit }) {
|
|
13
|
-
const { authenticated } = useLicense();
|
|
14
14
|
const layoutProvide = useLayoutState();
|
|
15
15
|
const drawerRef = ref(null);
|
|
16
16
|
const isActivated = ref(true);
|
|
@@ -66,9 +66,7 @@ const _sfc_main = defineComponent({
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
const updateModelValue = (value) => {
|
|
69
|
-
|
|
70
|
-
emit("update:modelValue", value);
|
|
71
|
-
}
|
|
69
|
+
emit("update:modelValue", value);
|
|
72
70
|
};
|
|
73
71
|
const onOpen = () => {
|
|
74
72
|
emit("open");
|
|
@@ -111,6 +109,7 @@ const _hoisted_1 = ["onClick"];
|
|
|
111
109
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
112
110
|
const _component_CloseOutlined = resolveComponent("CloseOutlined");
|
|
113
111
|
const _component_ElIcon = resolveComponent("ElIcon");
|
|
112
|
+
const _component_ReceiverView = resolveComponent("ReceiverView");
|
|
114
113
|
const _component_ElDrawer = resolveComponent("ElDrawer");
|
|
115
114
|
return openBlock(), createBlock(_component_ElDrawer, {
|
|
116
115
|
ref: "drawerRef",
|
|
@@ -170,12 +169,16 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
170
169
|
], 4)
|
|
171
170
|
]),
|
|
172
171
|
default: withCtx(() => [
|
|
173
|
-
|
|
172
|
+
createVNode(_component_ReceiverView, {
|
|
173
|
+
wrapPosition: false,
|
|
174
174
|
class: "ele-drawer-body",
|
|
175
175
|
style: normalizeStyle(_ctx.bodyStyle)
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
}, {
|
|
177
|
+
default: withCtx(() => [
|
|
178
|
+
renderSlot(_ctx.$slots, "default")
|
|
179
|
+
]),
|
|
180
|
+
_: 3
|
|
181
|
+
}, 8, ["style"])
|
|
179
182
|
]),
|
|
180
183
|
_: 2
|
|
181
184
|
}, [
|
package/es/ele-dropdown/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, mergeProps, withCtx, renderSlot, normalizeStyle, createElementBlock, Fragment, renderList, normalizeProps, resolveDynamicComponent, createCommentVNode, toDisplayString } from "vue";
|
|
2
2
|
import { ElDropdown, ElDropdownMenu, ElDropdownItem, ElIcon } from "element-plus";
|
|
3
|
-
import { useLicense } from "../ele-config-provider/receiver";
|
|
4
3
|
import { omit } from "../utils/core";
|
|
5
4
|
import { dropdownProps, dropdownEmits } from "./props";
|
|
6
5
|
const _sfc_main = defineComponent({
|
|
@@ -9,7 +8,6 @@ const _sfc_main = defineComponent({
|
|
|
9
8
|
props: dropdownProps,
|
|
10
9
|
emits: dropdownEmits,
|
|
11
10
|
setup(props, { emit }) {
|
|
12
|
-
const { authenticated } = useLicense();
|
|
13
11
|
const dropdownRef = ref();
|
|
14
12
|
const rootProps = computed(() => {
|
|
15
13
|
const options = omit(props, [
|
|
@@ -21,13 +19,11 @@ const _sfc_main = defineComponent({
|
|
|
21
19
|
"onClick",
|
|
22
20
|
"onVisibleChange"
|
|
23
21
|
]);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
classes.push(props.popperClass);
|
|
28
|
-
}
|
|
29
|
-
options.popperClass = classes.join(" ");
|
|
22
|
+
const classes = ["ele-popper", "ele-dropdown"];
|
|
23
|
+
if (props.popperClass) {
|
|
24
|
+
classes.push(props.popperClass);
|
|
30
25
|
}
|
|
26
|
+
options.popperClass = classes.join(" ");
|
|
31
27
|
return options;
|
|
32
28
|
});
|
|
33
29
|
const selected = computed(() => {
|
|
@@ -37,7 +33,7 @@ const _sfc_main = defineComponent({
|
|
|
37
33
|
return props.items.find((d) => d.command === props.modelValue);
|
|
38
34
|
});
|
|
39
35
|
const updateModelValue = (value) => {
|
|
40
|
-
if (
|
|
36
|
+
if (value !== props.modelValue) {
|
|
41
37
|
emit("update:modelValue", value);
|
|
42
38
|
emit("change", value);
|
|
43
39
|
}
|
|
@@ -89,8 +85,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
89
85
|
const _component_ElDropdownMenu = resolveComponent("ElDropdownMenu");
|
|
90
86
|
const _component_ElDropdown = resolveComponent("ElDropdown");
|
|
91
87
|
return openBlock(), createBlock(_component_ElDropdown, mergeProps(_ctx.rootProps, {
|
|
92
|
-
class: "ele-dropdown-text",
|
|
93
88
|
ref: "dropdownRef",
|
|
89
|
+
class: "ele-dropdown-trigger",
|
|
94
90
|
onClick: _ctx.onBtnClick,
|
|
95
91
|
onCommand: _ctx.onMenuClick,
|
|
96
92
|
onVisibleChange: _ctx.onPopVisibleChange
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
@include set-dropdown-var($ele);
|
|
6
6
|
|
|
7
|
-
.el-dropdown.ele-dropdown-
|
|
7
|
+
.el-dropdown.ele-dropdown-trigger {
|
|
8
8
|
color: inherit;
|
|
9
9
|
font-size: inherit;
|
|
10
10
|
line-height: inherit;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.ele-dropdown-
|
|
13
|
+
.ele-dropdown-trigger > .el-tooltip__trigger {
|
|
14
14
|
outline: none;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -14,6 +14,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
14
14
|
validator: import("vue").PropType<import("./types").Validator>;
|
|
15
15
|
beforeRemove: import("vue").PropType<import("./types").BeforeRemove>;
|
|
16
16
|
tooltipProps: import("vue").PropType<Partial<import("../ele-tooltip/props").TooltipProps>>;
|
|
17
|
+
readonly: BooleanConstructor;
|
|
18
|
+
disabled: BooleanConstructor;
|
|
17
19
|
}, {
|
|
18
20
|
inputRef: import("vue").Ref<ElInputInstance>;
|
|
19
21
|
isEdit: import("vue").Ref<boolean>;
|
|
@@ -43,9 +45,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
45
|
validator: import("vue").PropType<import("./types").Validator>;
|
|
44
46
|
beforeRemove: import("vue").PropType<import("./types").BeforeRemove>;
|
|
45
47
|
tooltipProps: import("vue").PropType<Partial<import("../ele-tooltip/props").TooltipProps>>;
|
|
48
|
+
readonly: BooleanConstructor;
|
|
49
|
+
disabled: BooleanConstructor;
|
|
46
50
|
}>> & {
|
|
47
51
|
"onUpdate:modelValue"?: ((_value?: string[] | undefined) => any) | undefined;
|
|
48
52
|
}, {
|
|
53
|
+
disabled: boolean;
|
|
49
54
|
round: boolean;
|
|
55
|
+
readonly: boolean;
|
|
50
56
|
}, {}>;
|
|
51
57
|
export default _default;
|
package/es/ele-edit-tag/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent, ref, onDeactivated, onActivated, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createBlock, normalizeStyle, withCtx, createTextVNode, toDisplayString, createCommentVNode, withDirectives,
|
|
1
|
+
import { defineComponent, ref, onDeactivated, onActivated, nextTick, resolveComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createBlock, normalizeStyle, withCtx, createTextVNode, toDisplayString, createCommentVNode, withDirectives, renderSlot, createVNode, vShow, mergeProps } from "vue";
|
|
2
2
|
import { ElTag, ElInput, ElIcon } from "element-plus";
|
|
3
3
|
import EleTooltip from "../ele-tooltip/index";
|
|
4
|
-
import { useLicense } from "../ele-config-provider/receiver";
|
|
5
4
|
import { PlusOutlined, LoadingOutlined } from "../icons";
|
|
6
5
|
import { editTagProps, editTagEmits } from "./props";
|
|
7
6
|
const _sfc_main = defineComponent({
|
|
@@ -17,7 +16,6 @@ const _sfc_main = defineComponent({
|
|
|
17
16
|
props: editTagProps,
|
|
18
17
|
emits: editTagEmits,
|
|
19
18
|
setup(props, { emit }) {
|
|
20
|
-
const { authenticated } = useLicense();
|
|
21
19
|
const inputRef = ref(null);
|
|
22
20
|
const isEdit = ref(false);
|
|
23
21
|
const inputValue = ref("");
|
|
@@ -51,6 +49,9 @@ const _sfc_main = defineComponent({
|
|
|
51
49
|
}, 0);
|
|
52
50
|
};
|
|
53
51
|
const onAddClick = () => {
|
|
52
|
+
if (props.disabled) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
54
55
|
tooltipVisible.value = false;
|
|
55
56
|
errorMessage.value = "";
|
|
56
57
|
isEdit.value = true;
|
|
@@ -59,9 +60,6 @@ const _sfc_main = defineComponent({
|
|
|
59
60
|
});
|
|
60
61
|
};
|
|
61
62
|
const onTagClose = (index2) => {
|
|
62
|
-
if (!authenticated.value) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
63
|
if (typeof props.beforeRemove !== "function") {
|
|
66
64
|
removeTag(index2);
|
|
67
65
|
return;
|
|
@@ -151,7 +149,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
151
149
|
class: normalizeClass([
|
|
152
150
|
"ele-edit-tag",
|
|
153
151
|
{ "is-large": _ctx.size === "large" },
|
|
154
|
-
{ "is-small": _ctx.size === "small" }
|
|
152
|
+
{ "is-small": _ctx.size === "small" },
|
|
153
|
+
{ "is-disabled": _ctx.disabled },
|
|
154
|
+
{ "is-readonly": _ctx.readonly }
|
|
155
155
|
])
|
|
156
156
|
}, [
|
|
157
157
|
_ctx.modelValue ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.modelValue, (item, index2) => {
|
|
@@ -162,7 +162,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
162
162
|
size: _ctx.size,
|
|
163
163
|
effect: _ctx.effect,
|
|
164
164
|
round: _ctx.round,
|
|
165
|
-
closable: true,
|
|
165
|
+
closable: _ctx.readonly || _ctx.disabled ? false : true,
|
|
166
166
|
disableTransitions: true,
|
|
167
167
|
style: normalizeStyle(_ctx.itemStyle),
|
|
168
168
|
onClose: ($event) => _ctx.onTagClose(index2)
|
|
@@ -171,9 +171,10 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
171
171
|
createTextVNode(toDisplayString(item), 1)
|
|
172
172
|
]),
|
|
173
173
|
_: 2
|
|
174
|
-
}, 1032, ["type", "color", "size", "effect", "round", "style", "onClose"]);
|
|
174
|
+
}, 1032, ["type", "color", "size", "effect", "round", "closable", "style", "onClose"]);
|
|
175
175
|
}), 128)) : createCommentVNode("", true),
|
|
176
|
-
withDirectives(
|
|
176
|
+
!_ctx.readonly ? withDirectives((openBlock(), createBlock(_component_ElTag, {
|
|
177
|
+
key: 1,
|
|
177
178
|
type: "info",
|
|
178
179
|
size: _ctx.size,
|
|
179
180
|
round: _ctx.round,
|
|
@@ -196,10 +197,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
196
197
|
])
|
|
197
198
|
]),
|
|
198
199
|
_: 3
|
|
199
|
-
}, 8, ["size", "round", "style", "onClick"]), [
|
|
200
|
+
}, 8, ["size", "round", "style", "onClick"])), [
|
|
200
201
|
[vShow, !_ctx.isEdit]
|
|
201
|
-
]),
|
|
202
|
-
withDirectives(
|
|
202
|
+
]) : createCommentVNode("", true),
|
|
203
|
+
!_ctx.readonly ? withDirectives((openBlock(), createBlock(_component_ElTag, {
|
|
204
|
+
key: 2,
|
|
203
205
|
size: _ctx.size,
|
|
204
206
|
round: _ctx.round,
|
|
205
207
|
disableTransitions: true,
|
|
@@ -232,9 +234,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
232
234
|
}, 8, ["disabled", "modelValue", "style", "onChange", "onBlur", "onFocus"])
|
|
233
235
|
]),
|
|
234
236
|
_: 1
|
|
235
|
-
}, 8, ["size", "round", "class", "style"]), [
|
|
237
|
+
}, 8, ["size", "round", "class", "style"])), [
|
|
236
238
|
[vShow, _ctx.isEdit]
|
|
237
|
-
]),
|
|
239
|
+
]) : createCommentVNode("", true),
|
|
238
240
|
createVNode(_component_EleTooltip, mergeProps({
|
|
239
241
|
offset: 7,
|
|
240
242
|
hideAfter: 0,
|
|
@@ -32,6 +32,10 @@ export declare const editTagProps: {
|
|
|
32
32
|
beforeRemove: PropType<BeforeRemove>;
|
|
33
33
|
/** 提示属性 */
|
|
34
34
|
tooltipProps: PropType<Partial<import("../ele-tooltip/props").TooltipProps>>;
|
|
35
|
+
/** 是否只读 */
|
|
36
|
+
readonly: BooleanConstructor;
|
|
37
|
+
/** 是否禁用 */
|
|
38
|
+
disabled: BooleanConstructor;
|
|
35
39
|
};
|
|
36
40
|
export type EditTagProps = ExtractPropTypes<typeof editTagProps>;
|
|
37
41
|
/**
|
package/es/ele-edit-tag/props.js
CHANGED
|
@@ -32,6 +32,19 @@
|
|
|
32
32
|
opacity: 0.6;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
/* 禁用 */
|
|
36
|
+
.ele-edit-tag.is-disabled .ele-edit-tag-add {
|
|
37
|
+
cursor: not-allowed;
|
|
38
|
+
color: elVar('disabled', 'text-color');
|
|
39
|
+
background: elVar('disabled', 'bg-color');
|
|
40
|
+
border-color: elVar('disabled', 'border-color');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* 只读 */
|
|
44
|
+
.ele-edit-tag.is-readonly > .el-tag:last-child {
|
|
45
|
+
margin-right: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
35
48
|
/* 输入框 */
|
|
36
49
|
.ele-edit-tag-input {
|
|
37
50
|
&.el-tag {
|
|
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
strong: BooleanConstructor;
|
|
21
21
|
italic: BooleanConstructor;
|
|
22
22
|
icon: import("vue").PropType<import("../ele-text/types").TextIcon>;
|
|
23
|
-
iconProps: import("vue").PropType<import("../ele-app/el").ElIconProps>;
|
|
23
|
+
iconProps: import("vue").PropType<import("../ele-app/el").ElIconProps>; /** 文本组件 */
|
|
24
24
|
iconStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
25
25
|
}, {
|
|
26
26
|
textRef: import("vue").Ref<EleTextInstance>;
|
|
@@ -50,14 +50,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
50
50
|
strong: BooleanConstructor;
|
|
51
51
|
italic: BooleanConstructor;
|
|
52
52
|
icon: import("vue").PropType<import("../ele-text/types").TextIcon>;
|
|
53
|
-
iconProps: import("vue").PropType<import("../ele-app/el").ElIconProps>;
|
|
53
|
+
iconProps: import("vue").PropType<import("../ele-app/el").ElIconProps>; /** 文本组件 */
|
|
54
54
|
iconStyle: import("vue").PropType<Partial<import("vue").CSSProperties>>;
|
|
55
55
|
}>>, {
|
|
56
|
+
strong: boolean;
|
|
56
57
|
tag: string;
|
|
57
58
|
tooltip: boolean | EllipsisTooltip;
|
|
58
59
|
underline: boolean;
|
|
59
60
|
italic: boolean;
|
|
60
61
|
deleted: boolean;
|
|
61
|
-
strong: boolean;
|
|
62
62
|
}, {}>;
|
|
63
63
|
export default _default;
|
package/es/ele-ellipsis/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, mergeProps, withCtx, renderSlot, normalizeProps, createCommentVNode } from "vue";
|
|
2
|
-
import { omit, pick,
|
|
3
|
-
import { useLicense } from "../ele-config-provider/receiver";
|
|
2
|
+
import { omit, pick, contentIsEllipsis } from "../utils/core";
|
|
4
3
|
import EleTooltip from "../ele-tooltip/index";
|
|
5
4
|
import EleText from "../ele-text/index";
|
|
6
5
|
import { textPropKeys } from "../ele-text/props";
|
|
@@ -10,7 +9,6 @@ const _sfc_main = defineComponent({
|
|
|
10
9
|
components: { EleText, EleTooltip },
|
|
11
10
|
props: ellipsisProps,
|
|
12
11
|
setup(props) {
|
|
13
|
-
const { authenticated } = useLicense();
|
|
14
12
|
const textRef = ref(null);
|
|
15
13
|
const virtualRef = ref();
|
|
16
14
|
const text = ref("");
|
|
@@ -29,7 +27,7 @@ const _sfc_main = defineComponent({
|
|
|
29
27
|
return omit(opt, ["original"]);
|
|
30
28
|
});
|
|
31
29
|
const multiLine = computed(() => {
|
|
32
|
-
return
|
|
30
|
+
return !!(props.maxLine && props.maxLine > 1);
|
|
33
31
|
});
|
|
34
32
|
const textProps = computed(() => {
|
|
35
33
|
return Object.assign({ title: title.value }, pick(props, textPropKeys));
|
|
@@ -49,29 +47,8 @@ const _sfc_main = defineComponent({
|
|
|
49
47
|
}
|
|
50
48
|
return style;
|
|
51
49
|
});
|
|
52
|
-
const isOverflow = (el) => {
|
|
53
|
-
if (!el.childNodes.length) {
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
const range = document.createRange();
|
|
57
|
-
range.setStart(el, 0);
|
|
58
|
-
range.setEnd(el, el.childNodes.length);
|
|
59
|
-
const { width, height } = range.getBoundingClientRect();
|
|
60
|
-
const floorW = Math.floor(width);
|
|
61
|
-
const rangeWidth = width - floorW < 1e-3 ? floorW : width;
|
|
62
|
-
const floorH = Math.floor(height);
|
|
63
|
-
const rangeHeight = height - floorH < 1e-3 ? floorH : height;
|
|
64
|
-
const style = getCurrentStyle(el);
|
|
65
|
-
const top = Number.parseInt(style.paddingTop) || 0;
|
|
66
|
-
const left = Number.parseInt(style.paddingLeft) || 0;
|
|
67
|
-
const right = Number.parseInt(style.paddingRight) || 0;
|
|
68
|
-
const bottom = Number.parseInt(style.paddingBottom) || 0;
|
|
69
|
-
const horizontalPadding = left + right;
|
|
70
|
-
const verticalPadding = top + bottom;
|
|
71
|
-
return rangeWidth + horizontalPadding > el.offsetWidth || rangeHeight + verticalPadding > el.offsetHeight || el.scrollWidth > el.offsetWidth;
|
|
72
|
-
};
|
|
73
50
|
const onHover = (e) => {
|
|
74
|
-
if (!
|
|
51
|
+
if (!props.tooltip) {
|
|
75
52
|
virtualRef.value = void 0;
|
|
76
53
|
return;
|
|
77
54
|
}
|
|
@@ -82,7 +59,7 @@ const _sfc_main = defineComponent({
|
|
|
82
59
|
}
|
|
83
60
|
} else {
|
|
84
61
|
if (target) {
|
|
85
|
-
const temp =
|
|
62
|
+
const temp = contentIsEllipsis(target) ? target.innerText : "";
|
|
86
63
|
if (text.value !== temp) {
|
|
87
64
|
text.value = temp;
|
|
88
65
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, toDisplayString, createCommentVNode, createBlock, mergeProps, createSlots, withCtx
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, renderSlot, toDisplayString, createCommentVNode, createBlock, mergeProps, createSlots, withCtx } from "vue";
|
|
2
2
|
import EleDropdown from "../../ele-dropdown/index";
|
|
3
3
|
const _sfc_main = defineComponent({
|
|
4
4
|
name: "FileGridItem",
|
|
@@ -132,15 +132,22 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
132
132
|
onContextmenu: _cache[0] || (_cache[0] = (...args) => _ctx.onContextmenu && _ctx.onContextmenu(...args))
|
|
133
133
|
}, [
|
|
134
134
|
createElementVNode("div", _hoisted_1, [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
},
|
|
135
|
+
renderSlot(_ctx.$slots, "icon", {
|
|
136
|
+
icon: _ctx.icon,
|
|
137
|
+
item: _ctx.item
|
|
138
|
+
}, () => [
|
|
139
|
+
createElementVNode("img", {
|
|
140
|
+
src: _ctx.icon,
|
|
141
|
+
class: normalizeClass({ "ele-file-list-item-image": !!_ctx.item.thumbnail })
|
|
142
|
+
}, null, 10, _hoisted_2)
|
|
143
|
+
])
|
|
139
144
|
]),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
renderSlot(_ctx.$slots, "title", { item: _ctx.item }, () => [
|
|
146
|
+
createElementVNode("div", {
|
|
147
|
+
title: _ctx.item.name,
|
|
148
|
+
class: "ele-file-list-item-title"
|
|
149
|
+
}, toDisplayString(_ctx.item.name), 9, _hoisted_3)
|
|
150
|
+
])
|
|
144
151
|
], 32),
|
|
145
152
|
_ctx.selectable ? (openBlock(), createElementBlock("div", {
|
|
146
153
|
key: 0,
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, createElementVNode, withModifiers, normalizeClass, toDisplayString, createCommentVNode, Fragment, renderList,
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, createElementVNode, withModifiers, normalizeClass, toDisplayString, createCommentVNode, Fragment, renderList, createSlots, renderSlot, normalizeProps, guardReactiveProps } from "vue";
|
|
2
|
+
import ReceiverView from "../../ele-config-provider/components/receiver-view";
|
|
2
3
|
import FileGridItem from "./file-grid-item";
|
|
3
4
|
const _sfc_main = defineComponent({
|
|
4
5
|
name: "FileGrid",
|
|
5
|
-
components: { FileGridItem },
|
|
6
|
+
components: { ReceiverView, FileGridItem },
|
|
6
7
|
props: {
|
|
7
8
|
/** 文件数据 */
|
|
8
9
|
data: Array,
|
|
@@ -93,60 +94,63 @@ const _export_sfc = (sfc, props) => {
|
|
|
93
94
|
}
|
|
94
95
|
return target;
|
|
95
96
|
};
|
|
96
|
-
const _hoisted_1 = {
|
|
97
|
-
const _hoisted_2 = {
|
|
97
|
+
const _hoisted_1 = {
|
|
98
98
|
key: 0,
|
|
99
99
|
class: "ele-file-list-header"
|
|
100
100
|
};
|
|
101
|
-
const
|
|
101
|
+
const _hoisted_2 = { class: "ele-file-list-body" };
|
|
102
102
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
103
103
|
const _component_FileGridItem = resolveComponent("FileGridItem");
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
const _component_ReceiverView = resolveComponent("ReceiverView");
|
|
105
|
+
return openBlock(), createBlock(_component_ReceiverView, { class: "ele-file-list" }, {
|
|
106
|
+
default: withCtx(() => [
|
|
107
|
+
_ctx.selectionType === "checkbox" ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
108
|
+
createElementVNode("div", {
|
|
109
|
+
class: "ele-file-list-selection",
|
|
110
|
+
onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onCheckAllChange && _ctx.onCheckAllChange(...args), ["stop"]))
|
|
111
|
+
}, [
|
|
112
|
+
createElementVNode("i", {
|
|
113
|
+
class: normalizeClass([
|
|
114
|
+
"ele-file-list-checkbox",
|
|
115
|
+
{ "is-checked": _ctx.isCheckAll },
|
|
116
|
+
{ "is-indeterminate": _ctx.isIndeterminate }
|
|
117
|
+
])
|
|
118
|
+
}, null, 2),
|
|
119
|
+
createElementVNode("div", null, toDisplayString(_ctx.headerText), 1)
|
|
120
|
+
])
|
|
121
|
+
])) : createCommentVNode("", true),
|
|
122
|
+
createElementVNode("div", _hoisted_2, [
|
|
123
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (item) => {
|
|
124
|
+
return openBlock(), createBlock(_component_FileGridItem, {
|
|
125
|
+
key: item.key,
|
|
126
|
+
ref_for: true,
|
|
127
|
+
ref: "itemRefs",
|
|
128
|
+
item,
|
|
129
|
+
selectionType: _ctx.selectionType,
|
|
130
|
+
selections: _ctx.selections,
|
|
131
|
+
current: _ctx.current,
|
|
132
|
+
icons: _ctx.icons,
|
|
133
|
+
contextMenus: _ctx.getContextMenus(item),
|
|
134
|
+
contextMenuProps: _ctx.contextMenuProps,
|
|
135
|
+
onClick: _ctx.onItemClick,
|
|
136
|
+
onCheckChange: _ctx.onItemCheckChange,
|
|
137
|
+
onContextMenu: _ctx.onItemContextMenu,
|
|
138
|
+
onContextOpen: _ctx.onItemContextOpen
|
|
139
|
+
}, createSlots({ _: 2 }, [
|
|
140
|
+
renderList(Object.keys(_ctx.$slots), (name) => {
|
|
141
|
+
return {
|
|
142
|
+
name,
|
|
143
|
+
fn: withCtx((slotProps) => [
|
|
144
|
+
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
145
|
+
])
|
|
146
|
+
};
|
|
147
|
+
})
|
|
148
|
+
]), 1032, ["item", "selectionType", "selections", "current", "icons", "contextMenus", "contextMenuProps", "onClick", "onCheckChange", "onContextMenu", "onContextOpen"]);
|
|
149
|
+
}), 128))
|
|
118
150
|
])
|
|
119
|
-
])
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
return openBlock(), createBlock(_component_FileGridItem, {
|
|
123
|
-
key: item.key,
|
|
124
|
-
ref_for: true,
|
|
125
|
-
ref: "itemRefs",
|
|
126
|
-
item,
|
|
127
|
-
selectionType: _ctx.selectionType,
|
|
128
|
-
selections: _ctx.selections,
|
|
129
|
-
current: _ctx.current,
|
|
130
|
-
icons: _ctx.icons,
|
|
131
|
-
contextMenus: _ctx.getContextMenus(item),
|
|
132
|
-
contextMenuProps: _ctx.contextMenuProps,
|
|
133
|
-
onClick: _ctx.onItemClick,
|
|
134
|
-
onCheckChange: _ctx.onItemCheckChange,
|
|
135
|
-
onContextMenu: _ctx.onItemContextMenu,
|
|
136
|
-
onContextOpen: _ctx.onItemContextOpen
|
|
137
|
-
}, createSlots({ _: 2 }, [
|
|
138
|
-
renderList(Object.keys(_ctx.$slots), (name) => {
|
|
139
|
-
return {
|
|
140
|
-
name,
|
|
141
|
-
fn: withCtx((slotProps) => [
|
|
142
|
-
renderSlot(_ctx.$slots, name, normalizeProps(guardReactiveProps(slotProps || {})))
|
|
143
|
-
])
|
|
144
|
-
};
|
|
145
|
-
})
|
|
146
|
-
]), 1032, ["item", "selectionType", "selections", "current", "icons", "contextMenus", "contextMenuProps", "onClick", "onCheckChange", "onContextMenu", "onContextOpen"]);
|
|
147
|
-
}), 128))
|
|
148
|
-
])
|
|
149
|
-
]);
|
|
151
|
+
]),
|
|
152
|
+
_: 3
|
|
153
|
+
});
|
|
150
154
|
}
|
|
151
155
|
const fileGrid = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
152
156
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, createCommentVNode,
|
|
1
|
+
import { defineComponent, ref, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, withModifiers, createElementVNode, createCommentVNode, renderSlot, toDisplayString, Fragment, renderList, normalizeStyle, createTextVNode, createBlock, mergeProps, createSlots, withCtx } from "vue";
|
|
2
2
|
import EleDropdown from "../../ele-dropdown/index";
|
|
3
3
|
const _sfc_main = defineComponent({
|
|
4
4
|
name: "FileTableItem",
|
|
@@ -132,11 +132,11 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
132
132
|
{ "is-checked": _ctx.selected },
|
|
133
133
|
{ "is-active": _ctx.dropdownVisible }
|
|
134
134
|
]),
|
|
135
|
-
onClick: _cache[
|
|
135
|
+
onClick: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.onClick && _ctx.onClick(...args), ["stop"]))
|
|
136
136
|
}, [
|
|
137
137
|
createElementVNode("div", {
|
|
138
138
|
class: "ele-file-list-item-body",
|
|
139
|
-
onContextmenu: _cache[
|
|
139
|
+
onContextmenu: _cache[1] || (_cache[1] = (...args) => _ctx.onContextmenu && _ctx.onContextmenu(...args))
|
|
140
140
|
}, [
|
|
141
141
|
_ctx.selectable ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
142
142
|
createElementVNode("i", {
|
|
@@ -150,16 +150,21 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
150
150
|
])) : createCommentVNode("", true),
|
|
151
151
|
createElementVNode("div", _hoisted_2, [
|
|
152
152
|
createElementVNode("div", _hoisted_3, [
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
153
|
+
renderSlot(_ctx.$slots, "icon", {
|
|
154
|
+
icon: _ctx.icon,
|
|
155
|
+
item: _ctx.item
|
|
156
|
+
}, () => [
|
|
157
|
+
createElementVNode("img", {
|
|
158
|
+
src: _ctx.icon,
|
|
159
|
+
class: normalizeClass({ "ele-file-list-item-image": !!_ctx.item.thumbnail })
|
|
160
|
+
}, null, 10, _hoisted_4)
|
|
161
|
+
]),
|
|
162
|
+
renderSlot(_ctx.$slots, "title", { item: _ctx.item }, () => [
|
|
163
|
+
createElementVNode("div", {
|
|
164
|
+
title: _ctx.item.name,
|
|
165
|
+
class: "ele-file-list-item-title"
|
|
166
|
+
}, toDisplayString(_ctx.item.name), 9, _hoisted_5)
|
|
167
|
+
])
|
|
163
168
|
]),
|
|
164
169
|
_ctx.$slots.tool ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
165
170
|
renderSlot(_ctx.$slots, "tool", { item: _ctx.item })
|
|
@@ -171,7 +176,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
171
176
|
style: normalizeStyle(col.style),
|
|
172
177
|
class: "ele-file-list-item-cell"
|
|
173
178
|
}, [
|
|
174
|
-
col.slot && _ctx.$slots[col.slot] ? renderSlot(_ctx.$slots, col.slot, {
|
|
179
|
+
col.slot && !["icon", "title", "tool", "contextMenu"].includes(col.slot) && _ctx.$slots[col.slot] ? renderSlot(_ctx.$slots, col.slot, {
|
|
175
180
|
key: 0,
|
|
176
181
|
item: _ctx.item,
|
|
177
182
|
col
|
|
@@ -195,7 +200,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
195
200
|
}), createSlots({
|
|
196
201
|
default: withCtx(() => [
|
|
197
202
|
createElementVNode("div", {
|
|
198
|
-
onClick: _cache[
|
|
203
|
+
onClick: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
199
204
|
}, ["stop"]))
|
|
200
205
|
})
|
|
201
206
|
]),
|