vue-devui 1.6.4 → 1.6.6
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/auto-complete/index.es.js +19 -6
- package/auto-complete/index.umd.js +10 -10
- package/auto-complete/style.css +1 -1
- package/breadcrumb/index.es.js +2 -15
- package/breadcrumb/index.umd.js +1 -1
- package/breadcrumb/style.css +1 -1
- package/button/index.es.js +31 -12
- package/button/index.umd.js +10 -10
- package/button/style.css +1 -1
- package/carousel/index.es.js +36 -213
- package/carousel/index.umd.js +1 -1
- package/carousel/style.css +1 -1
- package/category-search/index.es.js +53 -29
- package/category-search/index.umd.js +12 -12
- package/category-search/style.css +1 -1
- package/checkbox/index.es.js +22 -9
- package/checkbox/index.umd.js +8 -8
- package/checkbox/style.css +1 -1
- package/code-review/style.css +1 -1
- package/collapse/index.es.js +15 -18
- package/collapse/index.umd.js +5 -5
- package/data-grid/index.es.js +48 -29
- package/data-grid/index.umd.js +6 -6
- package/data-grid/style.css +1 -1
- package/date-picker-pro/index.es.js +91 -20
- package/date-picker-pro/index.umd.js +16 -16
- package/date-picker-pro/style.css +1 -1
- package/dropdown/index.es.js +2 -15
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +84 -207
- package/editable-select/index.umd.js +20 -16
- package/editable-select/style.css +1 -1
- package/editor-md/index.es.js +32 -18
- package/editor-md/index.umd.js +15 -15
- package/editor-md/style.css +1 -1
- package/form/style.css +1 -1
- package/icon/index.es.js +1 -2
- package/icon/index.umd.js +1 -1
- package/input/index.es.js +27 -7
- package/input/index.umd.js +11 -11
- package/input/style.css +1 -1
- package/input-number/index.es.js +5 -0
- package/input-number/index.umd.js +10 -10
- package/input-number/style.css +1 -1
- package/mention/index.es.js +12 -3
- package/mention/index.umd.js +8 -8
- package/mention/style.css +1 -1
- package/message/index.es.js +1 -2
- package/message/index.umd.js +1 -1
- package/modal/index.es.js +27 -4
- package/modal/index.umd.js +7 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +1 -2
- package/notification/index.umd.js +2 -2
- package/overlay/style.css +1 -1
- package/package.json +1 -1
- package/pagination/index.es.js +83 -263
- package/pagination/index.umd.js +14 -19
- package/pagination/style.css +1 -1
- package/popover/style.css +1 -1
- package/radio/index.es.js +10 -28
- package/radio/index.umd.js +9 -9
- package/radio/style.css +1 -1
- package/result/index.es.js +1 -2
- package/result/index.umd.js +1 -1
- package/search/index.es.js +54 -28
- package/search/index.umd.js +18 -14
- package/search/style.css +1 -1
- package/select/index.es.js +71 -52
- package/select/index.umd.js +18 -23
- package/select/style.css +1 -1
- package/splitter/style.css +1 -1
- package/steps/index.es.js +1 -2
- package/steps/index.umd.js +1 -1
- package/style.css +2 -2
- package/switch/index.es.js +16 -2
- package/switch/index.umd.js +15 -15
- package/switch/style.css +1 -1
- package/table/index.es.js +49 -30
- package/table/index.umd.js +12 -12
- package/table/style.css +1 -1
- package/textarea/index.es.js +6 -1
- package/textarea/index.umd.js +1 -1
- package/textarea/style.css +1 -1
- package/time-picker/index.es.js +66 -14
- package/time-picker/index.umd.js +16 -16
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +71 -52
- package/time-select/index.umd.js +12 -17
- package/time-select/style.css +1 -1
- package/timeline/index.es.js +1 -2
- package/timeline/index.umd.js +1 -1
- package/tooltip/style.css +1 -1
- package/tree/index.es.js +22 -9
- package/tree/index.umd.js +9 -9
- package/tree/style.css +1 -1
- package/types/auto-complete/src/auto-complete-types.d.ts +4 -0
- package/types/carousel/src/components/carousel-icons.d.ts +2 -0
- package/types/cascader/src/cascader-types.d.ts +4 -0
- package/types/checkbox/src/checkbox-types.d.ts +8 -0
- package/types/date-picker-pro/src/date-picker-pro-types.d.ts +12 -0
- package/types/date-picker-pro/src/range-date-picker-types.d.ts +4 -0
- package/types/dropdown/src/use-dropdown.d.ts +1 -1
- package/types/editable-select/src/editable-select-types.d.ts +4 -0
- package/types/editor-md/src/composables/use-editor-md.d.ts +1 -0
- package/types/editor-md/src/editor-md-types.d.ts +3 -0
- package/types/icon/src/icon-types.d.ts +0 -1
- package/types/input/src/input-types.d.ts +4 -0
- package/types/input-icon/src/input-icon.d.ts +9 -0
- package/types/input-number/src/input-number-types.d.ts +4 -0
- package/types/mention/src/mention-types.d.ts +4 -0
- package/types/mention/src/mention.d.ts +9 -0
- package/types/modal/src/components/modal-icons.d.ts +1 -0
- package/types/radio/src/radio-types.d.ts +8 -0
- package/types/select/src/select-types.d.ts +4 -0
- package/types/svg-icons/index.d.ts +3 -0
- package/types/textarea/src/textarea-types.d.ts +4 -0
- package/types/time-picker/src/components/time-scroll/index.d.ts +9 -0
- package/types/time-picker/src/time-picker-types.d.ts +4 -0
- package/upload/index.es.js +1 -2
- package/upload/index.umd.js +2 -2
- package/vue-devui.es.js +393 -174
- package/vue-devui.umd.js +93 -82
- package/types/search/src/components/search-close-icon.d.ts +0 -2
- package/types/search/src/components/search-icon.d.ts +0 -2
- package/types/select/src/components/select-arrow-icon.d.ts +0 -2
|
@@ -18,7 +18,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18
18
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
|
-
import { defineComponent, toRefs,
|
|
21
|
+
import { watch, onUnmounted, defineComponent, toRefs, createVNode, Transition, mergeProps, ref, unref, nextTick, withModifiers, inject, computed, h, render, withDirectives, resolveDirective, renderSlot, useSlots, reactive, getCurrentInstance, onMounted, provide, toRef, vShow, Teleport, isVNode } from "vue";
|
|
22
22
|
import { onClickOutside } from "@vueuse/core";
|
|
23
23
|
import { offset, autoPlacement, arrow, shift, computePosition } from "@floating-ui/dom";
|
|
24
24
|
const editableSelectProps = {
|
|
@@ -79,204 +79,13 @@ const editableSelectProps = {
|
|
|
79
79
|
enableLazyLoad: {
|
|
80
80
|
type: Boolean,
|
|
81
81
|
default: false
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
const SELECT_KEY = Symbol("EditableSelect");
|
|
85
|
-
const DEFAULT_PREFIX = "icon";
|
|
86
|
-
const iconProps = {
|
|
87
|
-
name: {
|
|
88
|
-
type: String,
|
|
89
|
-
default: "",
|
|
90
|
-
required: true
|
|
91
|
-
},
|
|
92
|
-
size: {
|
|
93
|
-
type: [Number, String],
|
|
94
|
-
default: "inherit"
|
|
95
|
-
},
|
|
96
|
-
color: {
|
|
97
|
-
type: String,
|
|
98
|
-
default: "inherit"
|
|
99
|
-
},
|
|
100
|
-
component: {
|
|
101
|
-
type: Object,
|
|
102
|
-
default: null
|
|
103
|
-
},
|
|
104
|
-
classPrefix: {
|
|
105
|
-
type: String,
|
|
106
|
-
default: DEFAULT_PREFIX
|
|
107
|
-
},
|
|
108
|
-
operable: {
|
|
109
|
-
type: Boolean,
|
|
110
|
-
default: false
|
|
111
82
|
},
|
|
112
|
-
|
|
83
|
+
showGlowStyle: {
|
|
113
84
|
type: Boolean,
|
|
114
|
-
default:
|
|
115
|
-
},
|
|
116
|
-
rotate: {
|
|
117
|
-
type: [Number, String]
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
const svgIconProps = {
|
|
121
|
-
name: {
|
|
122
|
-
type: String,
|
|
123
|
-
default: "",
|
|
124
|
-
required: true
|
|
125
|
-
},
|
|
126
|
-
color: {
|
|
127
|
-
type: String,
|
|
128
|
-
default: "inherit"
|
|
129
|
-
},
|
|
130
|
-
size: {
|
|
131
|
-
type: [Number, String],
|
|
132
|
-
default: "inherit"
|
|
85
|
+
default: true
|
|
133
86
|
}
|
|
134
87
|
};
|
|
135
|
-
|
|
136
|
-
let cls = namespace;
|
|
137
|
-
if (element) {
|
|
138
|
-
cls += `__${element}`;
|
|
139
|
-
}
|
|
140
|
-
if (modifier) {
|
|
141
|
-
cls += `--${modifier}`;
|
|
142
|
-
}
|
|
143
|
-
return cls;
|
|
144
|
-
}
|
|
145
|
-
function useNamespace(block, needDot = false) {
|
|
146
|
-
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
147
|
-
const b = () => createBem(namespace);
|
|
148
|
-
const e = (element) => element ? createBem(namespace, element) : "";
|
|
149
|
-
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
150
|
-
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
151
|
-
return {
|
|
152
|
-
b,
|
|
153
|
-
e,
|
|
154
|
-
m,
|
|
155
|
-
em
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
var icon = "";
|
|
159
|
-
var svgIcon = defineComponent({
|
|
160
|
-
name: "DSvgIcon",
|
|
161
|
-
props: svgIconProps,
|
|
162
|
-
setup(props) {
|
|
163
|
-
const {
|
|
164
|
-
name,
|
|
165
|
-
color,
|
|
166
|
-
size
|
|
167
|
-
} = toRefs(props);
|
|
168
|
-
const ns = useNamespace("svg-icon");
|
|
169
|
-
const iconName = computed(() => `#icon-${name.value}`);
|
|
170
|
-
const iconSize = computed(() => {
|
|
171
|
-
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
172
|
-
});
|
|
173
|
-
const styles = {
|
|
174
|
-
width: iconSize.value,
|
|
175
|
-
height: iconSize.value
|
|
176
|
-
};
|
|
177
|
-
return () => {
|
|
178
|
-
return createVNode("svg", {
|
|
179
|
-
"class": ns.b(),
|
|
180
|
-
"style": styles
|
|
181
|
-
}, [createVNode("use", {
|
|
182
|
-
"xlink:href": iconName.value,
|
|
183
|
-
"fill": color.value
|
|
184
|
-
}, null)]);
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
function isUrl(value) {
|
|
189
|
-
return /^((http|https):)?\/\//.test(value);
|
|
190
|
-
}
|
|
191
|
-
function useIconDom(props, ctx) {
|
|
192
|
-
const {
|
|
193
|
-
component,
|
|
194
|
-
name,
|
|
195
|
-
size,
|
|
196
|
-
color,
|
|
197
|
-
classPrefix,
|
|
198
|
-
rotate
|
|
199
|
-
} = toRefs(props);
|
|
200
|
-
const ns = useNamespace("icon");
|
|
201
|
-
const iconSize = computed(() => {
|
|
202
|
-
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
203
|
-
});
|
|
204
|
-
const IconComponent = component.value ? resolveDynamicComponent(component.value) : resolveDynamicComponent(svgIcon);
|
|
205
|
-
const imgIconDom = () => {
|
|
206
|
-
return createVNode("img", mergeProps({
|
|
207
|
-
"src": name.value,
|
|
208
|
-
"alt": name.value.split("/")[name.value.split("/").length - 1],
|
|
209
|
-
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
210
|
-
"style": {
|
|
211
|
-
width: iconSize.value || "",
|
|
212
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
|
|
213
|
-
verticalAlign: "middle"
|
|
214
|
-
}
|
|
215
|
-
}, ctx.attrs), null);
|
|
216
|
-
};
|
|
217
|
-
const svgIconDom = () => {
|
|
218
|
-
return createVNode(IconComponent, mergeProps({
|
|
219
|
-
"name": name.value,
|
|
220
|
-
"color": color.value,
|
|
221
|
-
"size": iconSize.value,
|
|
222
|
-
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
223
|
-
"style": {
|
|
224
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
|
|
225
|
-
}
|
|
226
|
-
}, ctx.attrs), null);
|
|
227
|
-
};
|
|
228
|
-
const fontIconDom = () => {
|
|
229
|
-
const fontIconClass = /^icon-/.test(name.value) ? name.value : `${classPrefix.value}-${name.value}`;
|
|
230
|
-
return createVNode("i", mergeProps({
|
|
231
|
-
"class": [classPrefix.value, fontIconClass, (rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
232
|
-
"style": {
|
|
233
|
-
fontSize: iconSize.value,
|
|
234
|
-
color: color.value,
|
|
235
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
|
|
236
|
-
}
|
|
237
|
-
}, ctx.attrs), null);
|
|
238
|
-
};
|
|
239
|
-
const iconDom = () => {
|
|
240
|
-
return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
|
|
241
|
-
};
|
|
242
|
-
return {
|
|
243
|
-
iconDom
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
var Icon = defineComponent({
|
|
247
|
-
name: "DIcon",
|
|
248
|
-
props: iconProps,
|
|
249
|
-
emits: ["click"],
|
|
250
|
-
setup(props, ctx) {
|
|
251
|
-
const {
|
|
252
|
-
disabled,
|
|
253
|
-
operable
|
|
254
|
-
} = toRefs(props);
|
|
255
|
-
const {
|
|
256
|
-
iconDom
|
|
257
|
-
} = useIconDom(props, ctx);
|
|
258
|
-
const ns = useNamespace("icon");
|
|
259
|
-
const wrapClassed = computed(() => ({
|
|
260
|
-
[ns.e("container")]: true,
|
|
261
|
-
[ns.m("disabled")]: disabled.value,
|
|
262
|
-
[ns.m("operable")]: operable.value,
|
|
263
|
-
[ns.m("no-slots")]: !Object.keys(ctx.slots).length
|
|
264
|
-
}));
|
|
265
|
-
const onClick = (e) => {
|
|
266
|
-
if (disabled.value) {
|
|
267
|
-
return;
|
|
268
|
-
}
|
|
269
|
-
ctx.emit("click", e);
|
|
270
|
-
};
|
|
271
|
-
return () => {
|
|
272
|
-
var _a, _b, _c, _d;
|
|
273
|
-
return createVNode("div", {
|
|
274
|
-
"class": wrapClassed.value,
|
|
275
|
-
"onClick": onClick
|
|
276
|
-
}, [(_b = (_a = ctx.slots).prefix) == null ? void 0 : _b.call(_a), iconDom(), (_d = (_c = ctx.slots).suffix) == null ? void 0 : _d.call(_c)]);
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
});
|
|
88
|
+
const SELECT_KEY = Symbol("EditableSelect");
|
|
280
89
|
const fixedOverlayProps = {
|
|
281
90
|
modelValue: {
|
|
282
91
|
type: Boolean,
|
|
@@ -332,6 +141,29 @@ function useFixedOverlay(props, ctx) {
|
|
|
332
141
|
onUnmounted(removeBodyAdditions);
|
|
333
142
|
return { onClick };
|
|
334
143
|
}
|
|
144
|
+
function createBem(namespace, element, modifier) {
|
|
145
|
+
let cls = namespace;
|
|
146
|
+
if (element) {
|
|
147
|
+
cls += `__${element}`;
|
|
148
|
+
}
|
|
149
|
+
if (modifier) {
|
|
150
|
+
cls += `--${modifier}`;
|
|
151
|
+
}
|
|
152
|
+
return cls;
|
|
153
|
+
}
|
|
154
|
+
function useNamespace(block, needDot = false) {
|
|
155
|
+
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
156
|
+
const b = () => createBem(namespace);
|
|
157
|
+
const e = (element) => element ? createBem(namespace, element) : "";
|
|
158
|
+
const m = (modifier) => modifier ? createBem(namespace, "", modifier) : "";
|
|
159
|
+
const em = (element, modifier) => element && modifier ? createBem(namespace, element, modifier) : "";
|
|
160
|
+
return {
|
|
161
|
+
b,
|
|
162
|
+
e,
|
|
163
|
+
m,
|
|
164
|
+
em
|
|
165
|
+
};
|
|
166
|
+
}
|
|
335
167
|
var fixedOverlay = "";
|
|
336
168
|
defineComponent({
|
|
337
169
|
name: "DFixedOverlay",
|
|
@@ -6255,7 +6087,7 @@ var Dropdown = defineComponent({
|
|
|
6255
6087
|
debounceLoadMore();
|
|
6256
6088
|
};
|
|
6257
6089
|
const renderOption = () => {
|
|
6258
|
-
if (props.options.length === 0) {
|
|
6090
|
+
if (props.options.length === 0 && !select.loading.value) {
|
|
6259
6091
|
return createVNode("li", {
|
|
6260
6092
|
"class": ns.em("item", "no-data-tip")
|
|
6261
6093
|
}, [slots.noResultItem ? slots.noResultItem() : emptyText.value]);
|
|
@@ -6294,6 +6126,45 @@ var Dropdown = defineComponent({
|
|
|
6294
6126
|
};
|
|
6295
6127
|
}
|
|
6296
6128
|
});
|
|
6129
|
+
function SelectArrowIcon() {
|
|
6130
|
+
return createVNode("svg", {
|
|
6131
|
+
"width": "16px",
|
|
6132
|
+
"height": "16px",
|
|
6133
|
+
"viewBox": "0 0 16 16",
|
|
6134
|
+
"version": "1.1",
|
|
6135
|
+
"xmlns": "http://www.w3.org/2000/svg"
|
|
6136
|
+
}, [createVNode("g", {
|
|
6137
|
+
"stroke": "none",
|
|
6138
|
+
"stroke-width": "1",
|
|
6139
|
+
"fill": "none",
|
|
6140
|
+
"fill-rule": "evenodd"
|
|
6141
|
+
}, [createVNode("path", {
|
|
6142
|
+
"d": `M3.64644661,5.64644661 C3.82001296,5.47288026 4.08943736,5.45359511 4.2843055,5.58859116 L4.35355339,5.64644661
|
|
6143
|
+
L8,9.293 L11.6464466,5.64644661 C11.820013,5.47288026 12.0894374,5.45359511 12.2843055,5.58859116 L12.3535534,5.64644661
|
|
6144
|
+
C12.5271197,5.82001296 12.5464049,6.08943736 12.4114088,6.2843055 L12.3535534,6.35355339 L8.35355339,10.3535534
|
|
6145
|
+
C8.17998704,10.5271197 7.91056264,10.5464049 7.7156945,10.4114088 L7.64644661,10.3535534 L3.64644661,6.35355339
|
|
6146
|
+
C3.45118446,6.15829124 3.45118446,5.84170876 3.64644661,5.64644661 Z`
|
|
6147
|
+
}, null)])]);
|
|
6148
|
+
}
|
|
6149
|
+
function InputClearIcon() {
|
|
6150
|
+
return createVNode("svg", {
|
|
6151
|
+
"width": "16px",
|
|
6152
|
+
"height": "16px",
|
|
6153
|
+
"viewBox": "0 0 16 16",
|
|
6154
|
+
"version": "1.1",
|
|
6155
|
+
"xmlns": "http://www.w3.org/2000/svg"
|
|
6156
|
+
}, [createVNode("g", {
|
|
6157
|
+
"stroke": "none",
|
|
6158
|
+
"stroke-width": "1",
|
|
6159
|
+
"fill": "none",
|
|
6160
|
+
"fill-rule": "evenodd"
|
|
6161
|
+
}, [createVNode("path", {
|
|
6162
|
+
"d": "M8,1 C11.8659932,1 15,4.13400675 15,8 C15,11.8659932 11.8659932,15 8,15 C4.13400675,15 1,11.8659932 1,8 C1,4.13400675 4.13400675,1 8,1 Z M5.87867966,5.17157288 C5.68341751,4.97631073 5.36683502,4.97631073 5.17157288,5.17157288 C4.99800652,5.34513923 4.97872137,5.61456363 5.11371742,5.80943177 L5.17157288,5.87867966 L7.29218611,7.99929289 L5.17157288,10.1213203 C4.97631073,10.3165825 4.97631073,10.633165 5.17157288,10.8284271 C5.34513923,11.0019935 5.61456363,11.0212786 5.80943177,10.8862826 L5.87867966,10.8284271 L7.99929289,8.70639967 L10.1213203,10.8284271 C10.3165825,11.0236893 10.633165,11.0236893 10.8284271,10.8284271 C11.0019935,10.6548608 11.0212786,10.3854364 10.8862826,10.1905682 L10.8284271,10.1213203 L8.70710678,8 L10.8284271,5.87867966 C11.0236893,5.68341751 11.0236893,5.36683502 10.8284271,5.17157288 C10.6548608,4.99800652 10.3854364,4.97872137 10.1905682,5.11371742 L10.1213203,5.17157288 L8,7.29289322 L5.87867966,5.17157288 Z",
|
|
6163
|
+
"id": "\u5F62\u72B6",
|
|
6164
|
+
"fill": "#D5D5DB",
|
|
6165
|
+
"fill-rule": "nonzero"
|
|
6166
|
+
}, null)])]);
|
|
6167
|
+
}
|
|
6297
6168
|
function deepAssign(...objects) {
|
|
6298
6169
|
const isObject = (obj) => obj && typeof obj === "object";
|
|
6299
6170
|
return objects.reduce((prev, from) => {
|
|
@@ -6672,7 +6543,8 @@ function useInputRender(props, states) {
|
|
|
6672
6543
|
const inputWrapperClasses = computed(() => ({
|
|
6673
6544
|
[ns.e("wrapper")]: true,
|
|
6674
6545
|
[ns.em("wrapper", "focus")]: states.isFocus,
|
|
6675
|
-
[ns.em("wrapper", "disabled")]: props.disabled
|
|
6546
|
+
[ns.em("wrapper", "disabled")]: props.disabled,
|
|
6547
|
+
[ns.em("wrapper", "glow-style")]: props.showGlowStyle
|
|
6676
6548
|
}));
|
|
6677
6549
|
const inputInnerClasses = computed(() => ({
|
|
6678
6550
|
[ns.e("inner")]: true
|
|
@@ -6803,6 +6675,7 @@ var EditableSelect = defineComponent({
|
|
|
6803
6675
|
position,
|
|
6804
6676
|
placeholder
|
|
6805
6677
|
} = toRefs(props);
|
|
6678
|
+
const align = computed(() => position.value.some((item) => item.includes("start") || item.includes("end")) ? "start" : null);
|
|
6806
6679
|
const {
|
|
6807
6680
|
onInput,
|
|
6808
6681
|
onMouseenter,
|
|
@@ -6851,9 +6724,17 @@ var EditableSelect = defineComponent({
|
|
|
6851
6724
|
inputInnerClasses,
|
|
6852
6725
|
inputSuffixClasses
|
|
6853
6726
|
} = useInputRender(props, states);
|
|
6727
|
+
const currentPosition = ref("bottom");
|
|
6728
|
+
const handlePositionChange = (pos) => {
|
|
6729
|
+
currentPosition.value = pos.includes("top") || pos.includes("right-end") || pos.includes("left-end") ? "top" : "bottom";
|
|
6730
|
+
};
|
|
6731
|
+
const styles = computed(() => ({
|
|
6732
|
+
transformOrigin: currentPosition.value === "top" ? "0% 100%" : "0% 0%",
|
|
6733
|
+
"z-index": "var(--devui-z-index-dropdown, 1052)"
|
|
6734
|
+
}));
|
|
6854
6735
|
const renderBasicDropdown = () => {
|
|
6855
6736
|
return createVNode(Transition, {
|
|
6856
|
-
"name":
|
|
6737
|
+
"name": ns.m(`fade-${currentPosition.value}`)
|
|
6857
6738
|
}, {
|
|
6858
6739
|
default: () => [createVNode(FlexibleOverlay, {
|
|
6859
6740
|
"ref": overlayRef,
|
|
@@ -6861,9 +6742,9 @@ var EditableSelect = defineComponent({
|
|
|
6861
6742
|
"onUpdate:modelValue": ($event) => states.visible = $event,
|
|
6862
6743
|
"origin": originRef.value,
|
|
6863
6744
|
"position": position.value,
|
|
6864
|
-
"
|
|
6865
|
-
|
|
6866
|
-
|
|
6745
|
+
"align": align.value,
|
|
6746
|
+
"style": styles.value,
|
|
6747
|
+
"onPositionChange": handlePositionChange
|
|
6867
6748
|
}, {
|
|
6868
6749
|
default: () => [createVNode(Dropdown, {
|
|
6869
6750
|
"options": filteredOptions.value,
|
|
@@ -6915,13 +6796,9 @@ var EditableSelect = defineComponent({
|
|
|
6915
6796
|
}, [withDirectives(createVNode("span", {
|
|
6916
6797
|
"class": ns.e("clear-icon"),
|
|
6917
6798
|
"onClick": withModifiers(handleClear, ["stop"])
|
|
6918
|
-
}, [createVNode(
|
|
6919
|
-
"name": "icon-remove"
|
|
6920
|
-
}, null)]), [[vShow, showClearable.value]]), withDirectives(createVNode("span", {
|
|
6799
|
+
}, [createVNode(InputClearIcon, null, null)]), [[vShow, showClearable.value]]), withDirectives(createVNode("span", {
|
|
6921
6800
|
"class": ns.e("arrow-icon")
|
|
6922
|
-
}, [createVNode(
|
|
6923
|
-
"name": "select-arrow"
|
|
6924
|
-
}, null)]), [[vShow, !showClearable.value]])])])]), renderDropdown()]);
|
|
6801
|
+
}, [createVNode(SelectArrowIcon, null, null)]), [[vShow, !showClearable.value]])])])]), renderDropdown()]);
|
|
6925
6802
|
};
|
|
6926
6803
|
}
|
|
6927
6804
|
});
|