vue-devui 1.0.0-rc.0 → 1.0.0-rc.1
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/README.md +13 -0
- package/accordion/index.es.js +6 -3
- package/alert/index.es.js +28 -30
- package/alert/index.umd.js +1 -1
- package/auto-complete/index.es.js +13 -6
- package/auto-complete/index.umd.js +1 -1
- package/back-top/index.es.js +4 -2
- package/badge/index.es.js +1 -1
- package/badge/index.umd.js +1 -1
- package/badge/style.css +1 -1
- package/breadcrumb/index.es.js +2 -1
- package/button/index.es.js +39 -40
- package/button/index.umd.js +1 -1
- package/carousel/index.es.js +38 -53
- package/carousel/index.umd.js +1 -1
- package/cascader/index.es.js +16 -8
- package/cascader/style.css +1 -1
- package/color-picker/index.es.js +94 -85
- package/color-picker/index.umd.js +7 -7
- package/countdown/index.es.js +2 -1
- package/date-picker/index.es.js +40 -57
- package/date-picker/index.umd.js +1 -1
- package/dropdown/index.es.js +117 -62
- package/dropdown/index.umd.js +1 -1
- package/dropdown/style.css +1 -1
- package/editable-select/index.es.js +6 -3
- package/form/index.es.js +87 -76
- package/form/index.umd.js +11 -11
- package/form/style.css +1 -1
- package/fullscreen/index.es.js +13 -16
- package/fullscreen/index.umd.js +1 -1
- package/icon/index.es.js +39 -57
- package/icon/index.umd.js +1 -1
- package/image-preview/index.es.js +2 -1
- package/input-icon/index.es.js +38 -37
- package/input-icon/index.umd.js +1 -1
- package/input-number/index.es.js +46 -57
- package/input-number/index.umd.js +1 -1
- package/input-number/style.css +1 -1
- package/modal/index.es.js +81 -76
- package/modal/index.umd.js +1 -1
- package/modal/style.css +1 -1
- package/notification/index.es.js +38 -40
- package/notification/index.umd.js +1 -1
- package/nuxt/components/PanelBody.js +3 -0
- package/nuxt/components/PanelFooter.js +3 -0
- package/nuxt/components/PanelHeader.js +3 -0
- package/nuxt/components/Timeline.js +3 -0
- package/nuxt/components/TimelineItem.js +3 -0
- package/nuxt/components/alertProps.js +3 -0
- package/nuxt/components/fullscreenProps.js +3 -0
- package/nuxt/components/iconProps.js +2 -0
- package/nuxt/components/paginationProps.js +3 -0
- package/nuxt/components/panelProps.js +3 -0
- package/nuxt/components/searchProps.js +3 -0
- package/overlay/index.es.js +44 -37
- package/overlay/index.umd.js +1 -1
- package/overlay/style.css +1 -1
- package/package.json +8 -43
- package/pagination/index.es.js +10 -12
- package/pagination/index.umd.js +1 -1
- package/panel/index.es.js +45 -32
- package/panel/index.umd.js +1 -1
- package/popover/index.es.js +44 -37
- package/popover/index.umd.js +6 -6
- package/popover/style.css +1 -1
- package/radio/index.es.js +3 -9
- package/radio/index.umd.js +1 -1
- package/read-tip/index.es.js +6 -3
- package/result/index.es.js +38 -53
- package/result/index.umd.js +1 -1
- package/ripple/index.es.js +9 -5
- package/search/index.es.js +2 -5
- package/search/index.umd.js +4 -4
- package/select/index.es.js +42 -42
- package/select/index.umd.js +1 -1
- package/skeleton/index.es.js +17 -17
- package/skeleton/index.umd.js +1 -1
- package/slider/index.es.js +2 -1
- package/splitter/index.es.js +54 -42
- package/splitter/index.umd.js +6 -6
- package/splitter/style.css +1 -1
- package/status/index.es.js +1 -4
- package/status/index.umd.js +1 -1
- package/status/style.css +1 -1
- package/steps-guide/index.es.js +6 -3
- package/style.css +1 -1
- package/table/index.es.js +117 -62
- package/table/index.umd.js +1 -1
- package/table/style.css +1 -1
- package/tag/index.es.js +2 -1
- package/tag-input/index.es.js +4 -2
- package/time-picker/index.es.js +43 -42
- package/time-picker/index.umd.js +1 -1
- package/{time-axis → timeline}/index.d.ts +0 -0
- package/{time-axis → timeline}/index.es.js +65 -78
- package/timeline/index.umd.js +1 -0
- package/{time-axis → timeline}/package.json +1 -1
- package/timeline/style.css +1 -0
- package/tooltip/index.es.js +44 -37
- package/tooltip/index.umd.js +6 -6
- package/tooltip/style.css +1 -1
- package/transfer/index.es.js +84 -77
- package/transfer/index.umd.js +7 -7
- package/transfer/style.css +1 -1
- package/tree/index.es.js +10 -5
- package/tree-select/index.es.js +8 -4
- package/upload/index.es.js +38 -40
- package/upload/index.umd.js +1 -1
- package/vue-devui.es.js +771 -649
- package/vue-devui.umd.js +9 -9
- package/nuxt/components/TimeAxis.js +0 -3
- package/nuxt/components/TimeAxisItem.js +0 -3
- package/time-axis/index.umd.js +0 -1
- package/time-axis/style.css +0 -1
|
@@ -147,8 +147,9 @@ const useInput = (inputValue, ctx2) => {
|
|
|
147
147
|
};
|
|
148
148
|
const useLazyLoad = (dropdownRef, inputValue, filterOtion, load) => {
|
|
149
149
|
const loadMore = () => {
|
|
150
|
-
if (filterOtion !== false)
|
|
150
|
+
if (filterOtion !== false) {
|
|
151
151
|
return;
|
|
152
|
+
}
|
|
152
153
|
if (dropdownRef.value.clientHeight + dropdownRef.value.scrollTop >= dropdownRef.value.scrollHeight) {
|
|
153
154
|
load(inputValue.value);
|
|
154
155
|
}
|
|
@@ -178,8 +179,9 @@ const useKeyboardSelect = (dropdownRef, disabled, visible, hoverIndex, selectedI
|
|
|
178
179
|
if (!newIndex) {
|
|
179
180
|
newIndex = hoverIndex.value;
|
|
180
181
|
}
|
|
181
|
-
if (!["ArrowDown", "ArrowUp"].includes(direction))
|
|
182
|
+
if (!["ArrowDown", "ArrowUp"].includes(direction)) {
|
|
182
183
|
return;
|
|
184
|
+
}
|
|
183
185
|
if (direction === "ArrowUp") {
|
|
184
186
|
if (newIndex === 0) {
|
|
185
187
|
newIndex = options.value.length - 1;
|
|
@@ -206,8 +208,9 @@ const useKeyboardSelect = (dropdownRef, disabled, visible, hoverIndex, selectedI
|
|
|
206
208
|
};
|
|
207
209
|
const handleKeydown = (event) => {
|
|
208
210
|
const keyCode = event.key || event.code;
|
|
209
|
-
if (options.value.length === 0)
|
|
211
|
+
if (options.value.length === 0) {
|
|
210
212
|
return;
|
|
213
|
+
}
|
|
211
214
|
if (!visible.value) {
|
|
212
215
|
return toggleMenu();
|
|
213
216
|
}
|
package/form/index.es.js
CHANGED
|
@@ -17,8 +17,8 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { defineComponent, provide, createVNode, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref,
|
|
21
|
-
import { offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
|
|
20
|
+
import { defineComponent, provide, createVNode, toRefs, Teleport, Transition, renderSlot, isVNode, computed, onMounted, watch, onUnmounted, ref, unref, nextTick, mergeProps, Fragment, reactive, inject, onBeforeUnmount, withDirectives, resolveDirective } from "vue";
|
|
21
|
+
import { shift, offset, autoPlacement, arrow, computePosition } from "@floating-ui/dom";
|
|
22
22
|
function mitt(n) {
|
|
23
23
|
return { all: n = n || /* @__PURE__ */ new Map(), on: function(t, e) {
|
|
24
24
|
var i = n.get(t);
|
|
@@ -120,8 +120,9 @@ function isObject(obj) {
|
|
|
120
120
|
return Object.prototype.toString.call(obj).slice(8, -1) === "Object";
|
|
121
121
|
}
|
|
122
122
|
function hasKey(obj, key) {
|
|
123
|
-
if (!isObject(obj))
|
|
123
|
+
if (!isObject(obj)) {
|
|
124
124
|
return false;
|
|
125
|
+
}
|
|
125
126
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
126
127
|
}
|
|
127
128
|
function getElOffset(curEl) {
|
|
@@ -199,53 +200,54 @@ var Form = defineComponent({
|
|
|
199
200
|
}, [(_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)]);
|
|
200
201
|
}
|
|
201
202
|
});
|
|
203
|
+
const iconProps = {
|
|
204
|
+
name: {
|
|
205
|
+
type: String,
|
|
206
|
+
default: "",
|
|
207
|
+
required: true
|
|
208
|
+
},
|
|
209
|
+
size: {
|
|
210
|
+
type: String,
|
|
211
|
+
default: "inherit"
|
|
212
|
+
},
|
|
213
|
+
color: {
|
|
214
|
+
type: String,
|
|
215
|
+
default: "inherit"
|
|
216
|
+
},
|
|
217
|
+
classPrefix: {
|
|
218
|
+
type: String,
|
|
219
|
+
default: "icon"
|
|
220
|
+
}
|
|
221
|
+
};
|
|
202
222
|
var Icon = defineComponent({
|
|
203
223
|
name: "DIcon",
|
|
204
|
-
props:
|
|
205
|
-
name: {
|
|
206
|
-
type: String,
|
|
207
|
-
required: true
|
|
208
|
-
},
|
|
209
|
-
size: {
|
|
210
|
-
type: String,
|
|
211
|
-
default: "inherit"
|
|
212
|
-
},
|
|
213
|
-
color: {
|
|
214
|
-
type: String,
|
|
215
|
-
default: "inherit"
|
|
216
|
-
},
|
|
217
|
-
classPrefix: {
|
|
218
|
-
type: String,
|
|
219
|
-
default: "icon"
|
|
220
|
-
}
|
|
221
|
-
},
|
|
224
|
+
props: iconProps,
|
|
222
225
|
setup(props) {
|
|
223
|
-
return __spreadValues({}, props);
|
|
224
|
-
},
|
|
225
|
-
render() {
|
|
226
226
|
const {
|
|
227
227
|
name,
|
|
228
228
|
size,
|
|
229
229
|
color,
|
|
230
230
|
classPrefix
|
|
231
|
-
} =
|
|
232
|
-
return
|
|
233
|
-
"
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
"
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
231
|
+
} = toRefs(props);
|
|
232
|
+
return () => {
|
|
233
|
+
return /^((https?):)?\/\//.test(name.value) ? createVNode("img", {
|
|
234
|
+
"src": name.value,
|
|
235
|
+
"alt": name.value.split("/")[name.value.split("/").length - 1],
|
|
236
|
+
"style": {
|
|
237
|
+
width: size.value,
|
|
238
|
+
verticalAlign: "text-bottom"
|
|
239
|
+
}
|
|
240
|
+
}, null) : createVNode("i", {
|
|
241
|
+
"class": `${classPrefix.value} ${classPrefix.value}-${name.value}`,
|
|
242
|
+
"style": {
|
|
243
|
+
fontSize: size.value,
|
|
244
|
+
color: color.value
|
|
245
|
+
}
|
|
246
|
+
}, null);
|
|
247
|
+
};
|
|
246
248
|
}
|
|
247
249
|
});
|
|
248
|
-
var
|
|
250
|
+
var baseOverlay = "";
|
|
249
251
|
function _isSlot(s) {
|
|
250
252
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
251
253
|
}
|
|
@@ -292,43 +294,13 @@ const overlayProps = {
|
|
|
292
294
|
default: true
|
|
293
295
|
}
|
|
294
296
|
};
|
|
295
|
-
const overlayEmits = ["update:visible", "backdropClick"];
|
|
296
297
|
const fixedOverlayProps = __spreadProps(__spreadValues({}, overlayProps), {
|
|
297
298
|
overlayStyle: {
|
|
298
299
|
type: [String, Object],
|
|
299
300
|
default: void 0
|
|
300
301
|
}
|
|
301
302
|
});
|
|
302
|
-
const
|
|
303
|
-
modelValue: {
|
|
304
|
-
type: Boolean,
|
|
305
|
-
default: false
|
|
306
|
-
},
|
|
307
|
-
origin: {
|
|
308
|
-
type: Object,
|
|
309
|
-
require: true
|
|
310
|
-
},
|
|
311
|
-
position: {
|
|
312
|
-
type: Array,
|
|
313
|
-
default: ["bottom"]
|
|
314
|
-
},
|
|
315
|
-
offset: {
|
|
316
|
-
type: [Number, Object],
|
|
317
|
-
default: 8
|
|
318
|
-
},
|
|
319
|
-
align: {
|
|
320
|
-
type: String,
|
|
321
|
-
default: null
|
|
322
|
-
},
|
|
323
|
-
showArrow: {
|
|
324
|
-
type: Boolean,
|
|
325
|
-
default: false
|
|
326
|
-
},
|
|
327
|
-
isArrowCenter: {
|
|
328
|
-
type: Boolean,
|
|
329
|
-
default: true
|
|
330
|
-
}
|
|
331
|
-
};
|
|
303
|
+
const overlayEmits = ["update:visible", "backdropClick"];
|
|
332
304
|
function useOverlayLogic(props, ctx2) {
|
|
333
305
|
const backgroundClass = computed(() => {
|
|
334
306
|
return [
|
|
@@ -379,6 +351,7 @@ function useOverlayLogic(props, ctx2) {
|
|
|
379
351
|
handleOverlayBubbleCancel
|
|
380
352
|
};
|
|
381
353
|
}
|
|
354
|
+
var fixedOverlay = "";
|
|
382
355
|
defineComponent({
|
|
383
356
|
name: "DFixedOverlay",
|
|
384
357
|
props: fixedOverlayProps,
|
|
@@ -403,6 +376,36 @@ defineComponent({
|
|
|
403
376
|
});
|
|
404
377
|
}
|
|
405
378
|
});
|
|
379
|
+
const flexibleOverlayProps = {
|
|
380
|
+
modelValue: {
|
|
381
|
+
type: Boolean,
|
|
382
|
+
default: false
|
|
383
|
+
},
|
|
384
|
+
origin: {
|
|
385
|
+
type: Object,
|
|
386
|
+
require: true
|
|
387
|
+
},
|
|
388
|
+
position: {
|
|
389
|
+
type: Array,
|
|
390
|
+
default: ["bottom"]
|
|
391
|
+
},
|
|
392
|
+
offset: {
|
|
393
|
+
type: [Number, Object],
|
|
394
|
+
default: 8
|
|
395
|
+
},
|
|
396
|
+
align: {
|
|
397
|
+
type: String,
|
|
398
|
+
default: null
|
|
399
|
+
},
|
|
400
|
+
showArrow: {
|
|
401
|
+
type: Boolean,
|
|
402
|
+
default: false
|
|
403
|
+
},
|
|
404
|
+
isArrowCenter: {
|
|
405
|
+
type: Boolean,
|
|
406
|
+
default: true
|
|
407
|
+
}
|
|
408
|
+
};
|
|
406
409
|
function getScrollParent(element) {
|
|
407
410
|
const overflowRegex = /(auto|scroll|hidden)/;
|
|
408
411
|
for (let parent = element; parent = parent.parentElement; parent.parentElement !== document.body) {
|
|
@@ -456,6 +459,7 @@ function useOverlay(props, emit) {
|
|
|
456
459
|
const overlayEl = unref(overlayRef.value);
|
|
457
460
|
const arrowEl = unref(arrowRef.value);
|
|
458
461
|
const middleware = [
|
|
462
|
+
shift(),
|
|
459
463
|
offset(props.offset),
|
|
460
464
|
autoPlacement({
|
|
461
465
|
alignment: props.align,
|
|
@@ -490,7 +494,7 @@ function useOverlay(props, emit) {
|
|
|
490
494
|
originParent !== window && window.removeEventListener("scroll", updatePosition);
|
|
491
495
|
window.removeEventListener("resize", updatePosition);
|
|
492
496
|
});
|
|
493
|
-
return { arrowRef, overlayRef };
|
|
497
|
+
return { arrowRef, overlayRef, updatePosition };
|
|
494
498
|
}
|
|
495
499
|
var flexibleOverlay = "";
|
|
496
500
|
const FlexibleOverlay = defineComponent({
|
|
@@ -501,12 +505,17 @@ const FlexibleOverlay = defineComponent({
|
|
|
501
505
|
setup(props, {
|
|
502
506
|
slots,
|
|
503
507
|
attrs,
|
|
504
|
-
emit
|
|
508
|
+
emit,
|
|
509
|
+
expose
|
|
505
510
|
}) {
|
|
506
511
|
const {
|
|
507
512
|
arrowRef,
|
|
508
|
-
overlayRef
|
|
513
|
+
overlayRef,
|
|
514
|
+
updatePosition
|
|
509
515
|
} = useOverlay(props, emit);
|
|
516
|
+
expose({
|
|
517
|
+
updatePosition
|
|
518
|
+
});
|
|
510
519
|
return () => {
|
|
511
520
|
var _a;
|
|
512
521
|
return props.modelValue && createVNode("div", mergeProps({
|
|
@@ -7662,8 +7671,9 @@ function handleErrorStrategyPass(el) {
|
|
|
7662
7671
|
el.setAttribute("class", classList.join(" "));
|
|
7663
7672
|
}
|
|
7664
7673
|
function getFormControlUID(el) {
|
|
7665
|
-
if (el.tagName.toLocaleLowerCase() === "body")
|
|
7674
|
+
if (el.tagName.toLocaleLowerCase() === "body") {
|
|
7666
7675
|
return "";
|
|
7676
|
+
}
|
|
7667
7677
|
if (el.parentElement.id.startsWith("dfc-")) {
|
|
7668
7678
|
return el.parentElement.id;
|
|
7669
7679
|
} else {
|
|
@@ -7706,8 +7716,9 @@ function validateFn({ validator, modelValue, el, tipEl, isFormTag, messageShowTy
|
|
|
7706
7716
|
handleValidatePass(el, tipEl);
|
|
7707
7717
|
}).catch((err) => {
|
|
7708
7718
|
const { errors } = err;
|
|
7709
|
-
if (!errors || errors.length === 0)
|
|
7719
|
+
if (!errors || errors.length === 0) {
|
|
7710
7720
|
return;
|
|
7721
|
+
}
|
|
7711
7722
|
let msg = "";
|
|
7712
7723
|
if (typeof errors[0].message === "object") {
|
|
7713
7724
|
msg = errors[0].message.default;
|