vue-devui 1.6.4 → 1.6.5
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 +1 -2
- package/auto-complete/index.umd.js +1 -1
- package/breadcrumb/index.es.js +2 -15
- package/breadcrumb/index.umd.js +1 -1
- package/button/index.es.js +1 -2
- package/button/index.umd.js +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 +3 -17
- package/category-search/index.umd.js +10 -10
- package/collapse/index.es.js +15 -18
- package/collapse/index.umd.js +5 -5
- package/data-grid/index.es.js +3 -17
- package/data-grid/index.umd.js +6 -6
- package/date-picker-pro/index.es.js +21 -6
- package/date-picker-pro/index.umd.js +12 -12
- package/date-picker-pro/style.css +1 -1
- package/dropdown/index.es.js +2 -15
- package/dropdown/index.umd.js +1 -1
- package/editable-select/index.es.js +2 -3
- package/editable-select/index.umd.js +2 -2
- package/editor-md/index.es.js +32 -18
- package/editor-md/index.umd.js +15 -15
- package/icon/index.es.js +1 -2
- package/icon/index.umd.js +1 -1
- package/input/index.es.js +21 -6
- package/input/index.umd.js +11 -11
- package/input/style.css +1 -1
- package/mention/index.es.js +1 -2
- package/mention/index.umd.js +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/package.json +1 -1
- package/pagination/index.es.js +55 -253
- package/pagination/index.umd.js +18 -23
- package/pagination/style.css +1 -1
- package/result/index.es.js +1 -2
- package/result/index.umd.js +1 -1
- package/search/index.es.js +48 -27
- package/search/index.umd.js +18 -14
- package/search/style.css +1 -1
- package/select/index.es.js +43 -42
- package/select/index.umd.js +11 -16
- package/select/style.css +1 -1
- package/steps/index.es.js +1 -2
- package/steps/index.umd.js +1 -1
- package/style.css +2 -2
- package/table/index.es.js +3 -17
- package/table/index.umd.js +6 -6
- package/time-picker/index.es.js +21 -6
- package/time-picker/index.umd.js +16 -16
- package/time-picker/style.css +1 -1
- package/time-select/index.es.js +43 -42
- package/time-select/index.umd.js +9 -14
- package/time-select/style.css +1 -1
- package/timeline/index.es.js +1 -2
- package/timeline/index.umd.js +1 -1
- package/types/carousel/src/components/carousel-icons.d.ts +2 -0
- package/types/dropdown/src/use-dropdown.d.ts +1 -1
- 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/modal/src/components/modal-icons.d.ts +1 -0
- package/types/svg-icons/index.d.ts +3 -0
- package/upload/index.es.js +1 -2
- package/upload/index.umd.js +2 -2
- package/vue-devui.es.js +186 -96
- package/vue-devui.umd.js +97 -86
- 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
package/carousel/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createVNode, defineComponent, toRefs, ref, watch, onMounted, onBeforeUnmount, Fragment, Comment } from "vue";
|
|
2
2
|
import "clipboard";
|
|
3
3
|
const carouselProps = {
|
|
4
4
|
arrowTrigger: {
|
|
@@ -38,214 +38,41 @@ const carouselProps = {
|
|
|
38
38
|
default: 500
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
type: Object,
|
|
58
|
-
default: null
|
|
59
|
-
},
|
|
60
|
-
classPrefix: {
|
|
61
|
-
type: String,
|
|
62
|
-
default: DEFAULT_PREFIX
|
|
63
|
-
},
|
|
64
|
-
operable: {
|
|
65
|
-
type: Boolean,
|
|
66
|
-
default: false
|
|
67
|
-
},
|
|
68
|
-
disabled: {
|
|
69
|
-
type: Boolean,
|
|
70
|
-
default: false
|
|
71
|
-
},
|
|
72
|
-
rotate: {
|
|
73
|
-
type: [Number, String]
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
const svgIconProps = {
|
|
77
|
-
name: {
|
|
78
|
-
type: String,
|
|
79
|
-
default: "",
|
|
80
|
-
required: true
|
|
81
|
-
},
|
|
82
|
-
color: {
|
|
83
|
-
type: String,
|
|
84
|
-
default: "inherit"
|
|
85
|
-
},
|
|
86
|
-
size: {
|
|
87
|
-
type: [Number, String],
|
|
88
|
-
default: "inherit"
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
function createBem$1(namespace, element, modifier) {
|
|
92
|
-
let cls = namespace;
|
|
93
|
-
if (element) {
|
|
94
|
-
cls += `__${element}`;
|
|
95
|
-
}
|
|
96
|
-
if (modifier) {
|
|
97
|
-
cls += `--${modifier}`;
|
|
98
|
-
}
|
|
99
|
-
return cls;
|
|
100
|
-
}
|
|
101
|
-
function useNamespace$1(block, needDot = false) {
|
|
102
|
-
const namespace = needDot ? `.devui-${block}` : `devui-${block}`;
|
|
103
|
-
const b = () => createBem$1(namespace);
|
|
104
|
-
const e = (element) => element ? createBem$1(namespace, element) : "";
|
|
105
|
-
const m = (modifier) => modifier ? createBem$1(namespace, "", modifier) : "";
|
|
106
|
-
const em = (element, modifier) => element && modifier ? createBem$1(namespace, element, modifier) : "";
|
|
107
|
-
return {
|
|
108
|
-
b,
|
|
109
|
-
e,
|
|
110
|
-
m,
|
|
111
|
-
em
|
|
112
|
-
};
|
|
41
|
+
function CarouselArrowLeft() {
|
|
42
|
+
return createVNode("svg", {
|
|
43
|
+
"width": "18px",
|
|
44
|
+
"height": "18px",
|
|
45
|
+
"viewBox": "0 0 16 16",
|
|
46
|
+
"version": "1.1"
|
|
47
|
+
}, [createVNode("g", {
|
|
48
|
+
"stroke": "none",
|
|
49
|
+
"stroke-width": "1",
|
|
50
|
+
"fill": "none",
|
|
51
|
+
"fill-rule": "evenodd"
|
|
52
|
+
}, [createVNode("polygon", {
|
|
53
|
+
"fill": "#293040",
|
|
54
|
+
"fill-rule": "nonzero",
|
|
55
|
+
"points": "10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"
|
|
56
|
+
}, null)])]);
|
|
113
57
|
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
height: iconSize.value
|
|
132
|
-
};
|
|
133
|
-
return () => {
|
|
134
|
-
return createVNode("svg", {
|
|
135
|
-
"class": ns.b(),
|
|
136
|
-
"style": styles
|
|
137
|
-
}, [createVNode("use", {
|
|
138
|
-
"xlink:href": iconName.value,
|
|
139
|
-
"fill": color.value
|
|
140
|
-
}, null)]);
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
function isUrl(value) {
|
|
145
|
-
return /^((http|https):)?\/\//.test(value);
|
|
58
|
+
function CarouselArrowRight() {
|
|
59
|
+
return createVNode("svg", {
|
|
60
|
+
"width": "18px",
|
|
61
|
+
"height": "18px",
|
|
62
|
+
"viewBox": "0 0 16 16",
|
|
63
|
+
"version": "1.1"
|
|
64
|
+
}, [createVNode("g", {
|
|
65
|
+
"stroke": "none",
|
|
66
|
+
"stroke-width": "1",
|
|
67
|
+
"fill": "none",
|
|
68
|
+
"fill-rule": "evenodd"
|
|
69
|
+
}, [createVNode("polygon", {
|
|
70
|
+
"fill": "#293040",
|
|
71
|
+
"fill-rule": "nonzero",
|
|
72
|
+
"transform": "translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) ",
|
|
73
|
+
"points": "11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"
|
|
74
|
+
}, null)])]);
|
|
146
75
|
}
|
|
147
|
-
function useIconDom(props, ctx) {
|
|
148
|
-
const {
|
|
149
|
-
component,
|
|
150
|
-
name,
|
|
151
|
-
size,
|
|
152
|
-
color,
|
|
153
|
-
classPrefix,
|
|
154
|
-
rotate
|
|
155
|
-
} = toRefs(props);
|
|
156
|
-
const ns = useNamespace$1("icon");
|
|
157
|
-
const iconSize = computed(() => {
|
|
158
|
-
return typeof size.value === "number" ? `${size.value}px` : size.value;
|
|
159
|
-
});
|
|
160
|
-
const IconComponent = component.value ? resolveDynamicComponent(component.value) : resolveDynamicComponent(svgIcon);
|
|
161
|
-
const imgIconDom = () => {
|
|
162
|
-
return createVNode("img", mergeProps({
|
|
163
|
-
"src": name.value,
|
|
164
|
-
"alt": name.value.split("/")[name.value.split("/").length - 1],
|
|
165
|
-
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
166
|
-
"style": {
|
|
167
|
-
width: iconSize.value || "",
|
|
168
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`,
|
|
169
|
-
verticalAlign: "middle"
|
|
170
|
-
}
|
|
171
|
-
}, ctx.attrs), null);
|
|
172
|
-
};
|
|
173
|
-
const svgIconDom = () => {
|
|
174
|
-
return createVNode(IconComponent, mergeProps({
|
|
175
|
-
"name": name.value,
|
|
176
|
-
"color": color.value,
|
|
177
|
-
"size": iconSize.value,
|
|
178
|
-
"class": [(rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
179
|
-
"style": {
|
|
180
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
|
|
181
|
-
}
|
|
182
|
-
}, ctx.attrs), null);
|
|
183
|
-
};
|
|
184
|
-
const fontIconDom = () => {
|
|
185
|
-
const fontIconClass = /^icon-/.test(name.value) ? name.value : `${classPrefix.value}-${name.value}`;
|
|
186
|
-
return createVNode("i", mergeProps({
|
|
187
|
-
"class": [classPrefix.value, fontIconClass, (rotate == null ? void 0 : rotate.value) === "infinite" && ns.m("spin")],
|
|
188
|
-
"style": {
|
|
189
|
-
fontSize: iconSize.value,
|
|
190
|
-
color: color.value,
|
|
191
|
-
transform: `rotate(${rotate == null ? void 0 : rotate.value}deg)`
|
|
192
|
-
}
|
|
193
|
-
}, ctx.attrs), null);
|
|
194
|
-
};
|
|
195
|
-
const iconDom = () => {
|
|
196
|
-
return component.value ? svgIconDom() : isUrl(name.value) ? imgIconDom() : fontIconDom();
|
|
197
|
-
};
|
|
198
|
-
return {
|
|
199
|
-
iconDom
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
var Icon = defineComponent({
|
|
203
|
-
name: "DIcon",
|
|
204
|
-
props: iconProps,
|
|
205
|
-
emits: ["click"],
|
|
206
|
-
setup(props, ctx) {
|
|
207
|
-
const {
|
|
208
|
-
disabled,
|
|
209
|
-
operable
|
|
210
|
-
} = toRefs(props);
|
|
211
|
-
const {
|
|
212
|
-
iconDom
|
|
213
|
-
} = useIconDom(props, ctx);
|
|
214
|
-
const ns = useNamespace$1("icon");
|
|
215
|
-
const wrapClassed = computed(() => ({
|
|
216
|
-
[ns.e("container")]: true,
|
|
217
|
-
[ns.m("disabled")]: disabled.value,
|
|
218
|
-
[ns.m("operable")]: operable.value,
|
|
219
|
-
[ns.m("no-slots")]: !Object.keys(ctx.slots).length
|
|
220
|
-
}));
|
|
221
|
-
const onClick = (e) => {
|
|
222
|
-
if (disabled.value) {
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
ctx.emit("click", e);
|
|
226
|
-
};
|
|
227
|
-
return () => {
|
|
228
|
-
var _a, _b, _c, _d;
|
|
229
|
-
return createVNode("div", {
|
|
230
|
-
"class": wrapClassed.value,
|
|
231
|
-
"onClick": onClick
|
|
232
|
-
}, [(_b = (_a = ctx.slots).prefix) == null ? void 0 : _b.call(_a), iconDom(), (_d = (_c = ctx.slots).suffix) == null ? void 0 : _d.call(_c)]);
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
var iconGroup = "";
|
|
237
|
-
defineComponent({
|
|
238
|
-
name: "DIconGroup",
|
|
239
|
-
setup(_, ctx) {
|
|
240
|
-
const ns = useNamespace$1("icon-group");
|
|
241
|
-
return () => {
|
|
242
|
-
var _a, _b;
|
|
243
|
-
return createVNode("div", {
|
|
244
|
-
"class": ns.b()
|
|
245
|
-
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
76
|
function createBem(namespace, element, modifier) {
|
|
250
77
|
let cls = namespace;
|
|
251
78
|
if (element) {
|
|
@@ -428,14 +255,10 @@ var Carousel = defineComponent({
|
|
|
428
255
|
}, [createVNode("button", {
|
|
429
256
|
"class": "arrow-left",
|
|
430
257
|
"onClick": () => prev()
|
|
431
|
-
}, [createVNode(
|
|
432
|
-
"name": "arrow-left"
|
|
433
|
-
}, null)]), createVNode("button", {
|
|
258
|
+
}, [createVNode(CarouselArrowLeft, null, null)]), createVNode("button", {
|
|
434
259
|
"class": "arrow-right",
|
|
435
260
|
"onClick": () => next()
|
|
436
|
-
}, [createVNode(
|
|
437
|
-
"name": "arrow-right"
|
|
438
|
-
}, null)])]) : null, createVNode("div", {
|
|
261
|
+
}, [createVNode(CarouselArrowRight, null, null)])]) : null, createVNode("div", {
|
|
439
262
|
"class": ns.e("item-wrapper"),
|
|
440
263
|
"ref": wrapperRef
|
|
441
264
|
}, [createVNode("div", {
|
package/carousel/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(s,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("clipboard")):typeof define=="function"&&define.amd?define(["exports","vue","clipboard"],e):(s=typeof globalThis!="undefined"?globalThis:s||self,e(s.index={},s.Vue))})(this,function(s,e){"use strict";const z={arrowTrigger:{type:String,default:"hover"},autoplay:{type:Boolean,default:!1},autoplaySpeed:{type:Number,default:3e3},height:{type:String,default:"100%"},showDots:{type:Boolean,default:!0},dotTrigger:{type:String,default:"click"},dotPosition:{type:String,default:"bottom"},activeIndex:{type:Number,default:0},transitionSpeed:{type:Number,default:500}};function F(){return e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",points:"10.7071068 12.2928932 9.29289322 13.7071068 3.58578644 8 9.29289322 2.29289322 10.7071068 3.70710678 6.41421356 8"},null)])])}function L(){return e.createVNode("svg",{width:"18px",height:"18px",viewBox:"0 0 16 16",version:"1.1"},[e.createVNode("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[e.createVNode("polygon",{fill:"#293040","fill-rule":"nonzero",transform:"translate(8.146447, 8.000000) scale(-1, 1) translate(-8.146447, -8.000000) ",points:"11.7071068 12.2928932 10.2928932 13.7071068 4.58578644 8 10.2928932 2.29289322 11.7071068 3.70710678 7.41421356 8"},null)])])}function g(i,r,l){let v=i;return r&&(v+=`__${r}`),l&&(v+=`--${l}`),v}function b(i,r=!1){const l=r?`.devui-${i}`:`devui-${i}`;return{b:()=>g(l),e:c=>c?g(l,c):"",m:c=>c?g(l,"",c):"",em:(c,p)=>c&&p?g(l,c,p):""}}var H="",I=e.defineComponent({name:"DCarousel",props:z,emits:["update:activeIndex","activeIndexChange"],setup(i,{emit:r,slots:l,expose:v}){const f=b("carousel"),{height:B,showDots:M,dotPosition:c,arrowTrigger:p,autoplay:U,autoplaySpeed:P,dotTrigger:X,activeIndex:R,transitionSpeed:m}=e.toRefs(i),n=e.ref(0),T=e.ref(!1),u=e.ref(0),y=e.ref(null),o=e.ref(null),w=e.ref(null);e.watch(()=>p,()=>{T.value=p.value==="always"},{immediate:!0}),e.watch(()=>R,()=>{u.value=R.value},{immediate:!0});const C=t=>{o.value&&(o.value.style.left=`${-t*100}%`)},A=t=>{setTimeout(()=>{o.value&&(o.value.style.transition=""),t.style.transform="",C(u.value)},m.value)},D=(t,a)=>{if(y.value){const d=y.value.getBoundingClientRect();t.style.transform=`translateX(${(a?-n.value:n.value)*d.width}px)`}},_=()=>{w.value&&(clearTimeout(w.value),w.value=null)},x=t=>{_(),U.value&&P.value&&(w.value=setTimeout(()=>{t==null||t()},P.value))},h=t=>{if(t===u.value||!y.value||!o.value)return;o.value.style.transition=`left ${m.value}ms ease`;let a=u.value;if(t<0&&u.value===0){a=n.value-1;const d=o.value.children[a];D(d,!0),C(-1),A(d)}else if(t>=n.value&&u.value===n.value-1){a=0;const d=o.value.children[a];D(d,!1),C(n.value),A(d)}else a=t<0?0:t>n.value-1?n.value-1:t,C(a);u.value=a,r("update:activeIndex",a),r("activeIndexChange",a),x(()=>{h(u.value+1)})},j=()=>{h(u.value-1)},N=()=>{h(u.value+1)},k=t=>{p.value==="hover"&&(T.value=t==="enter")},E=(t,a)=>{a===X.value&&h(t)},G=t=>{n.value=t,x(N)};return e.onMounted(()=>{o.value&&(o.value.style.transition=`left ${m.value}ms ease`,o.value.style.left="0%"),x(N)}),e.onBeforeUnmount(()=>{_()}),v({prev:j,next:N,goto:h}),()=>{var d,q;const t=(q=(d=l.default)==null?void 0:d.call(l))!=null?q:[];let a=t;return a.length===1&&a[0].type===e.Fragment&&(a=(a[0].children||[]).filter(V=>(V==null?void 0:V.type)!==e.Comment)),a.length!==n.value&&G(a.length),e.createVNode("div",{class:f.b(),style:{height:B.value},onMouseenter:()=>k("enter"),onMouseleave:()=>k("leave")},[p.value!=="never"&&T.value?e.createVNode("div",{class:f.e("arrow")},[e.createVNode("button",{class:"arrow-left",onClick:()=>j()},[e.createVNode(F,null,null)]),e.createVNode("button",{class:"arrow-right",onClick:()=>N()},[e.createVNode(L,null,null)])]):null,e.createVNode("div",{class:f.e("item-wrapper"),ref:y},[e.createVNode("div",{class:f.e("item-container"),style:{width:`${n.value*100}%`},ref:o},[t])]),n.value>0&&M.value?e.createVNode("ul",{class:[f.e("dots"),c.value]},[a.map((V,$)=>e.createVNode("li",{class:{"dot-item":!0,active:u.value===$},onClick:()=>E($,"click"),onMouseenter:()=>E($,"hover"),style:{transition:`all ${m.value}ms ease`}},null))]):null])}}}),S=e.defineComponent({name:"DCarouselItem",setup(i,{slots:r}){var f;const l=b("carousel"),v=(f=r.default)==null?void 0:f.call(r);return()=>e.createVNode("div",{class:l.e("item")},[v])}}),O={title:"Carousel \u8D70\u9A6C\u706F",category:"\u6570\u636E\u5C55\u793A",status:"100%",install(i){i.component(I.name,I),i.component(S.name,S)}};s.Carousel=I,s.CarouselItem=S,s.default=O,Object.defineProperty(s,"__esModule",{value:!0}),s[Symbol.toStringTag]="Module"});
|
package/carousel/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.devui-
|
|
1
|
+
.devui-carousel{display:block;position:relative}.devui-carousel .devui-carousel__arrow{position:absolute;width:100%;top:50%}.devui-carousel .devui-carousel__arrow .arrow-left{position:absolute;top:-18px;z-index:2;cursor:pointer;width:36px;height:36px;border-radius:18px;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-hover, 0 8px 16px 0) var(--devui-light-shadow, rgba(37, 43, 58, .12));display:inline-flex;align-items:center;justify-content:center;border:0;left:10px}.devui-carousel .devui-carousel__arrow .arrow-left:hover{background:var(--devui-area, #f5f5f5)}.devui-carousel .devui-carousel__arrow .arrow-left svg polygon{fill:var(--devui-text, #252b3a)}.devui-carousel .devui-carousel__arrow .arrow-right{position:absolute;top:-18px;z-index:2;cursor:pointer;width:36px;height:36px;border-radius:18px;background:var(--devui-highlight-overlay, rgba(255, 255, 255, .8));box-shadow:var(--devui-shadow-length-hover, 0 8px 16px 0) var(--devui-light-shadow, rgba(37, 43, 58, .12));display:inline-flex;align-items:center;justify-content:center;border:0;right:10px}.devui-carousel .devui-carousel__arrow .arrow-right:hover{background:var(--devui-area, #f5f5f5)}.devui-carousel .devui-carousel__arrow .arrow-right svg polygon{fill:var(--devui-text, #252b3a)}.devui-carousel .devui-carousel__item-wrapper{position:relative;overflow:hidden;height:100%}.devui-carousel .devui-carousel__item-wrapper .devui-carousel__item-container{display:flex;height:100%;position:relative}.devui-carousel .devui-carousel__item-wrapper .devui-carousel__item-container .devui-carousel__item{flex:1;position:relative;height:100%}.devui-carousel .devui-carousel__dots{position:absolute;display:flex;justify-content:center;width:100%;list-style:none}.devui-carousel .devui-carousel__dots.bottom{bottom:8px}.devui-carousel .devui-carousel__dots.top{top:8px}.devui-carousel .devui-carousel__dots .dot-item{width:6px;height:6px;border-radius:3px;margin-right:8px;background:var(--devui-icon-fill, #71757f)}.devui-carousel .devui-carousel__dots .dot-item:hover{cursor:pointer;background:var(--devui-icon-fill-hover, #252b3a)}.devui-carousel .devui-carousel__dots .dot-item.active{width:24px;background:var(--devui-icon-fill-active, #252b3a);transition:all var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1))}.devui-carousel .devui-carousel__arrow .arrow-left,.devui-carousel .devui-carousel__arrow .arrow-right{transition:background-color var(--devui-animation-duration-slow, .3s) var(--devui-animation-ease-in-smooth, cubic-bezier(.645, .045, .355, 1))}
|
|
@@ -255,17 +255,7 @@ const useDropdownEvent = ({ id, isOpen, origin, dropdownRef, props, emit }) => {
|
|
|
255
255
|
onInvalidate(() => subscriptions.forEach((v) => v()));
|
|
256
256
|
});
|
|
257
257
|
};
|
|
258
|
-
function useDropdown(id, visible, isOpen, origin, dropdownRef,
|
|
259
|
-
const calcPopDirection = (dropdownEl) => {
|
|
260
|
-
const elementHeight = dropdownEl.offsetHeight;
|
|
261
|
-
const bottomDistance = window.innerHeight - origin.value.getBoundingClientRect().bottom;
|
|
262
|
-
const isBottomEnough = bottomDistance >= elementHeight;
|
|
263
|
-
if (!isBottomEnough) {
|
|
264
|
-
popDirection.value = "top";
|
|
265
|
-
} else {
|
|
266
|
-
popDirection.value = "bottom";
|
|
267
|
-
}
|
|
268
|
-
};
|
|
258
|
+
function useDropdown(id, visible, isOpen, origin, dropdownRef, emit) {
|
|
269
259
|
watch(visible, (newVal, oldVal) => {
|
|
270
260
|
if (oldVal === void 0) {
|
|
271
261
|
return;
|
|
@@ -289,9 +279,6 @@ function useDropdown(id, visible, isOpen, origin, dropdownRef, popDirection, emi
|
|
|
289
279
|
}
|
|
290
280
|
}
|
|
291
281
|
}
|
|
292
|
-
if (dropdownEl) {
|
|
293
|
-
calcPopDirection(dropdownEl);
|
|
294
|
-
}
|
|
295
282
|
});
|
|
296
283
|
onMounted(() => {
|
|
297
284
|
dropdownMap.set(id, { toggleEl: origin.value });
|
|
@@ -699,7 +686,7 @@ var Dropdown = defineComponent({
|
|
|
699
686
|
props,
|
|
700
687
|
emit
|
|
701
688
|
});
|
|
702
|
-
useDropdown(id, visible, isOpen, origin, dropdownRef,
|
|
689
|
+
useDropdown(id, visible, isOpen, origin, dropdownRef, emit);
|
|
703
690
|
const {
|
|
704
691
|
overlayModelValue,
|
|
705
692
|
overlayShowValue,
|
|
@@ -10625,8 +10612,7 @@ const DEFAULT_PREFIX = "icon";
|
|
|
10625
10612
|
const iconProps = {
|
|
10626
10613
|
name: {
|
|
10627
10614
|
type: String,
|
|
10628
|
-
default: ""
|
|
10629
|
-
required: true
|
|
10615
|
+
default: ""
|
|
10630
10616
|
},
|
|
10631
10617
|
size: {
|
|
10632
10618
|
type: [Number, String],
|