vft 0.0.429 → 0.0.430
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/attributes.json +1 -1
- package/es/components/alert/alert.vue2.js +38 -38
- package/es/components/autocomplete/autocomplete.vue2.js +82 -82
- package/es/components/avatar/avatar.vue2.js +23 -23
- package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
- package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
- package/es/components/button/button.vue2.js +37 -37
- package/es/components/card/card.vue2.js +19 -19
- package/es/components/carousel/carousel.vue2.js +75 -75
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader-panel/index.vue2.js +2 -2
- package/es/components/cascader-panel/menu.vue2.js +2 -2
- package/es/components/cascader-panel/node.vue2.js +3 -4
- package/es/components/checkbox/checkbox-button.vue2.js +52 -52
- package/es/components/checkbox/checkbox-group.vue2.js +26 -26
- package/es/components/checkbox/checkbox.vue2.js +57 -57
- package/es/components/clamp/clamp.vue2.js +14 -14
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
- package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
- package/es/components/col/col.vue2.js +20 -20
- package/es/components/color-picker/color-picker.vue2.js +126 -128
- package/es/components/color-picker/components/sv-panel.vue.js +2 -2
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/context-menu/context-menu.vue2.js +18 -18
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +2 -2
- package/es/components/descriptions/description.vue2.js +44 -44
- package/es/components/descriptions/descriptions-row.vue2.js +12 -12
- package/es/components/dialog/dialog-content.vue2.js +31 -31
- package/es/components/dialog/dialog.vue2.js +46 -46
- package/es/components/divider/divider.vue2.js +19 -19
- package/es/components/drawer/drawer.vue2.js +41 -41
- package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
- package/es/components/dropdown/dropdown-item.vue2.js +28 -28
- package/es/components/dropdown/dropdown.vue2.js +124 -124
- package/es/components/form/form-item.vue2.js +71 -71
- package/es/components/header-layout/header-layout.vue2.js +25 -25
- package/es/components/icon/icon.vue2.js +15 -15
- package/es/components/icon-text/icon-text.vue2.js +28 -28
- package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
- package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
- package/es/components/image/image.vue2.js +63 -63
- package/es/components/image-viewer/image-viewer.vue2.js +88 -88
- package/es/components/infinite-scroll/index.d.ts +1 -1
- package/es/components/input/input.vue2.js +112 -112
- package/es/components/input-number/input-number.vue2.js +100 -100
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/link/link.vue2.js +20 -20
- package/es/components/list-cell/list-cell.vue2.js +19 -19
- package/es/components/logo/logo.vue2.js +22 -22
- package/es/components/menu/menu-item-group.vue2.js +8 -8
- package/es/components/menu/menu-item.vue2.js +48 -48
- package/es/components/message/message.vue2.js +66 -66
- package/es/components/modal/modal-footer-action.vue2.js +25 -25
- package/es/components/modal/modal.vue2.js +40 -40
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
- package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
- package/es/components/pagination/components/jumper.vue2.js +18 -18
- package/es/components/pagination/components/next.vue2.js +11 -11
- package/es/components/pagination/components/pager.vue2.js +74 -74
- package/es/components/pagination/components/prev.vue2.js +9 -9
- package/es/components/pagination/components/sizes.vue2.js +18 -18
- package/es/components/pagination/components/total.vue2.js +8 -8
- package/es/components/popconfirm/popconfirm.vue2.js +47 -47
- package/es/components/popover/popover.vue2.js +28 -28
- package/es/components/popper/trigger.vue2.js +9 -9
- package/es/components/progress/progress.vue2.js +87 -87
- package/es/components/qrcode/qrcode.vue2.js +31 -31
- package/es/components/radio/radio-button.vue2.js +17 -17
- package/es/components/radio/radio-group.vue2.js +35 -35
- package/es/components/router-view-content/router-view-content.vue2.js +25 -25
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
- package/es/components/row/row.vue2.js +5 -5
- package/es/components/scrollbar/bar.vue2.js +16 -16
- package/es/components/scrollbar/scrollbar.vue2.js +48 -48
- package/es/components/scrollbar/thumb.vue2.js +27 -27
- package/es/components/search/search.vue2.js +29 -29
- package/es/components/select/index.d.ts +1 -1
- package/es/components/select/select.vue.d.ts +1 -1
- package/es/components/side-menu/index.d.ts +2 -8
- package/es/components/side-menu/side-menu.vue.d.ts +5 -59
- package/es/components/side-menu/types.d.ts +107 -0
- package/es/components/skeleton/skeleton-item.vue2.js +9 -9
- package/es/components/skeleton/skeleton.vue2.js +14 -14
- package/es/components/slider/button.vue2.js +54 -54
- package/es/components/slider/slider.vue2.js +106 -106
- package/es/components/steps/item.vue2.js +56 -56
- package/es/components/steps/steps.vue2.js +16 -16
- package/es/components/super-form/super-form-action.vue2.js +28 -28
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/switch/switch.vue2.js +108 -108
- package/es/components/table/field.d.ts +4 -4
- package/es/components/teleport/teleport.vue2.js +6 -6
- package/es/components/time-picker/common/picker.vue.d.ts +1 -1
- package/es/components/time-picker/index.d.ts +2 -2
- package/es/components/time-picker/time-picker.d.ts +1 -1
- package/es/components/timeline/timeline-item.vue2.js +20 -20
- package/es/components/tooltip/content.vue2.js +57 -57
- package/es/components/tooltip/tooltip.vue2.js +66 -66
- package/es/components/tooltip/trigger.vue2.js +42 -42
- package/es/components/tree/tree.vue2.js +72 -72
- package/es/components/upload/upload-content.vue2.js +85 -85
- package/es/components/upload/upload-list.vue2.js +70 -70
- package/es/components/upload/upload.vue2.js +86 -86
- package/es/components/verify-code/verify-code.vue2.js +18 -18
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/avatar/avatar.vue2.cjs +1 -1
- package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
- package/lib/components/breadcrumb/breadcrumb-item.vue2.cjs +1 -1
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/card/card.vue2.cjs +1 -1
- package/lib/components/carousel/carousel.vue2.cjs +1 -1
- package/lib/components/cascader-panel/index.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
- package/lib/components/cascader-panel/node.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
- package/lib/components/clamp/clamp.vue2.cjs +1 -1
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/clamp-tooltip/clamp-tooltip.vue2.cjs +1 -1
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker.d.ts +1 -1
- package/lib/components/date-picker/index.d.ts +2 -2
- package/lib/components/descriptions/description.vue2.cjs +1 -1
- package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/divider/divider.vue2.cjs +1 -1
- package/lib/components/drawer/drawer.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/infinite-scroll/index.d.ts +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-number/input-number.vue2.cjs +1 -1
- package/lib/components/link/link.vue2.cjs +1 -1
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/logo/logo.vue2.cjs +1 -1
- package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/next.vue2.cjs +1 -1
- package/lib/components/pagination/components/pager.vue2.cjs +1 -1
- package/lib/components/pagination/components/prev.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/popper/trigger.vue2.cjs +1 -1
- package/lib/components/progress/progress.vue2.cjs +5 -5
- package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
- package/lib/components/radio/radio-button.vue2.cjs +1 -1
- package/lib/components/radio/radio-group.vue2.cjs +1 -1
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
- package/lib/components/row/row.vue2.cjs +1 -1
- package/lib/components/scrollbar/bar.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +1 -1
- package/lib/components/select/select.vue.d.ts +1 -1
- package/lib/components/side-menu/index.d.ts +2 -8
- package/lib/components/side-menu/side-menu.vue.d.ts +5 -59
- package/lib/components/side-menu/types.d.ts +107 -0
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
- package/lib/components/slider/button.vue2.cjs +1 -1
- package/lib/components/slider/slider.vue2.cjs +1 -1
- package/lib/components/steps/item.vue2.cjs +1 -1
- package/lib/components/steps/steps.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/field.d.ts +4 -4
- package/lib/components/teleport/teleport.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
- package/lib/components/time-picker/index.d.ts +2 -2
- package/lib/components/time-picker/time-picker.d.ts +1 -1
- package/lib/components/timeline/timeline-item.vue2.cjs +1 -1
- package/lib/components/tooltip/content.vue2.cjs +1 -1
- package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
- package/lib/components/tooltip/trigger.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/tags.json +1 -1
- package/theme-style/src/mixins/mixins.scss +1 -0
- package/web-types.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as $, reactive as oe, getCurrentInstance as ie, computed as d, toRefs as D, provide as re, createElementBlock as r, openBlock as o, unref as e, normalizeClass as u, createElementVNode as V, createBlock as I, createCommentVNode as S, normalizeStyle as p, createVNode as ne, Fragment as k, renderList as B } from "vue";
|
|
2
2
|
import "@popperjs/core";
|
|
3
3
|
import "../form/index.js";
|
|
4
|
-
import { VftInputNumber as
|
|
4
|
+
import { VftInputNumber as ue } from "../input-number/index.js";
|
|
5
5
|
import "@vueuse/core";
|
|
6
6
|
import "@vft/utils";
|
|
7
7
|
import "../config-provider/hooks/use-global-config.js";
|
|
8
8
|
import "lodash-es";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as se } from "../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "../../hooks/use-z-index/index.js";
|
|
12
|
-
import
|
|
12
|
+
import M from "./button.vue2.js";
|
|
13
13
|
import { useLifecycle as me } from "./composables/use-lifecycle.js";
|
|
14
14
|
import { useMarks as de } from "./composables/use-marks.js";
|
|
15
|
-
import { useSlide as
|
|
15
|
+
import { useSlide as ce } from "./composables/use-slide.js";
|
|
16
16
|
import "./composables/use-slider-button.js";
|
|
17
17
|
import { useStops as ve } from "./composables/use-stops.js";
|
|
18
18
|
import { useWatch as fe } from "./composables/use-watch.js";
|
|
19
|
-
import { sliderContextKey as
|
|
19
|
+
import { sliderContextKey as pe } from "./constants.js";
|
|
20
20
|
import be from "./marker.js";
|
|
21
21
|
import { sliderEmits as ye } from "./slider.js";
|
|
22
22
|
import { useFormItemInputId as ge } from "../form/hooks/use-form-item.js";
|
|
23
|
-
import { useFormSize as
|
|
24
|
-
const
|
|
23
|
+
import { useFormSize as xe } from "../form/hooks/use-form-common-props.js";
|
|
24
|
+
const Ve = ["id", "role", "aria-labelledby"], Se = { key: 1 }, ke = $({
|
|
25
25
|
name: "vft-slider"
|
|
26
|
-
}), He = /* @__PURE__ */
|
|
27
|
-
...
|
|
26
|
+
}), He = /* @__PURE__ */ $({
|
|
27
|
+
...ke,
|
|
28
28
|
props: {
|
|
29
29
|
modelValue: { default: 0 },
|
|
30
30
|
id: {},
|
|
@@ -53,171 +53,171 @@ const Se = ["id", "role", "aria-labelledby"], ke = { key: 1 }, he = K({
|
|
|
53
53
|
validateEvent: { type: Boolean, default: !0 }
|
|
54
54
|
},
|
|
55
55
|
emits: ye,
|
|
56
|
-
setup(
|
|
57
|
-
const
|
|
56
|
+
setup(a, { expose: K, emit: P }) {
|
|
57
|
+
const z = P, l = se("slider"), s = oe({
|
|
58
58
|
firstValue: 0,
|
|
59
59
|
secondValue: 0,
|
|
60
60
|
oldValue: 0,
|
|
61
61
|
dragging: !1,
|
|
62
62
|
sliderSize: 1
|
|
63
|
-
}),
|
|
64
|
-
elFormItem:
|
|
63
|
+
}), n = ie(), {
|
|
64
|
+
elFormItem: b,
|
|
65
65
|
slider: R,
|
|
66
66
|
firstButton: j,
|
|
67
67
|
secondButton: q,
|
|
68
|
-
sliderDisabled:
|
|
69
|
-
minValue:
|
|
70
|
-
maxValue:
|
|
68
|
+
sliderDisabled: c,
|
|
69
|
+
minValue: C,
|
|
70
|
+
maxValue: T,
|
|
71
71
|
runwayStyle: A,
|
|
72
72
|
barStyle: G,
|
|
73
|
-
resetSize:
|
|
74
|
-
emitChange:
|
|
75
|
-
onSliderWrapperPrevent:
|
|
73
|
+
resetSize: L,
|
|
74
|
+
emitChange: E,
|
|
75
|
+
onSliderWrapperPrevent: y,
|
|
76
76
|
onSliderClick: H,
|
|
77
|
-
onSliderDown:
|
|
78
|
-
setFirstValue:
|
|
77
|
+
onSliderDown: g,
|
|
78
|
+
setFirstValue: F,
|
|
79
79
|
setSecondValue: J
|
|
80
|
-
} =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
), { inputId:
|
|
86
|
-
formItemContext:
|
|
87
|
-
}),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
{ [
|
|
92
|
-
]),
|
|
93
|
-
fe(
|
|
94
|
-
const ee =
|
|
95
|
-
const
|
|
96
|
-
const
|
|
97
|
-
return
|
|
80
|
+
} = ce(n.props, s, z), { stops: O, getStopStyle: h } = ve(
|
|
81
|
+
n.props,
|
|
82
|
+
s,
|
|
83
|
+
C,
|
|
84
|
+
T
|
|
85
|
+
), { inputId: U, isLabeledByFormItem: N } = ge(n.props, {
|
|
86
|
+
formItemContext: b
|
|
87
|
+
}), W = xe(), Q = d(() => a.inputSize || W.value), X = d(() => a.formatValueText ? a.formatValueText(m.value) : `${m.value}`), Y = d(() => a.rangeEndLabel || ""), Z = d(() => a.formatValueText ? a.formatValueText(v.value) : `${v.value}`), _ = d(() => [
|
|
88
|
+
l.b(),
|
|
89
|
+
l.m(W.value),
|
|
90
|
+
l.is("vertical", a.vertical),
|
|
91
|
+
{ [l.m("with-input")]: a.showInput }
|
|
92
|
+
]), w = de(n.props);
|
|
93
|
+
fe(n.props, s, C, T, z, b);
|
|
94
|
+
const ee = d(() => {
|
|
95
|
+
const x = [a.min, a.max, a.step].map((i) => {
|
|
96
|
+
const t = `${i}`.split(".")[1];
|
|
97
|
+
return t ? t.length : 0;
|
|
98
98
|
});
|
|
99
|
-
return Math.max.apply(null,
|
|
100
|
-
}), { sliderWrapper: ae } = me(
|
|
101
|
-
|
|
99
|
+
return Math.max.apply(null, x);
|
|
100
|
+
}), { sliderWrapper: ae } = me(n.props, s, L), { firstValue: m, secondValue: v, sliderSize: te } = D(s), le = (x) => {
|
|
101
|
+
s.dragging = x;
|
|
102
102
|
};
|
|
103
|
-
return
|
|
104
|
-
...
|
|
105
|
-
sliderSize:
|
|
106
|
-
disabled:
|
|
103
|
+
return re(pe, {
|
|
104
|
+
...D(n.props),
|
|
105
|
+
sliderSize: te,
|
|
106
|
+
disabled: c.value,
|
|
107
107
|
precision: ee,
|
|
108
|
-
emitChange:
|
|
109
|
-
resetSize:
|
|
110
|
-
updateDragging:
|
|
111
|
-
}),
|
|
108
|
+
emitChange: E,
|
|
109
|
+
resetSize: L,
|
|
110
|
+
updateDragging: le
|
|
111
|
+
}), K({
|
|
112
112
|
onSliderClick: H
|
|
113
|
-
}), (
|
|
114
|
-
id: a.range ? e(
|
|
113
|
+
}), (x, i) => (o(), r("div", {
|
|
114
|
+
id: a.range ? e(U) : void 0,
|
|
115
115
|
ref_key: "sliderWrapper",
|
|
116
116
|
ref: ae,
|
|
117
117
|
class: u(_.value),
|
|
118
118
|
role: a.range ? "group" : void 0,
|
|
119
|
-
"aria-labelledby": a.range && e(
|
|
119
|
+
"aria-labelledby": a.range && e(N) ? e(b)?.labelId : void 0,
|
|
120
120
|
onTouchstart: i[2] || (i[2] = //@ts-ignore
|
|
121
|
-
(...
|
|
121
|
+
(...t) => e(y) && e(y)(...t)),
|
|
122
122
|
onTouchmove: i[3] || (i[3] = //@ts-ignore
|
|
123
|
-
(...
|
|
123
|
+
(...t) => e(y) && e(y)(...t))
|
|
124
124
|
}, [
|
|
125
|
-
|
|
125
|
+
V("div", {
|
|
126
126
|
ref_key: "slider",
|
|
127
127
|
ref: R,
|
|
128
128
|
class: u([
|
|
129
|
-
e(
|
|
129
|
+
e(l).e("runway"),
|
|
130
130
|
{ "show-input": a.showInput && !a.range },
|
|
131
|
-
e(
|
|
131
|
+
e(l).is("disabled", e(c))
|
|
132
132
|
]),
|
|
133
|
-
style:
|
|
133
|
+
style: p(e(A)),
|
|
134
134
|
onMousedown: i[0] || (i[0] = //@ts-ignore
|
|
135
|
-
(...
|
|
135
|
+
(...t) => e(g) && e(g)(...t)),
|
|
136
136
|
onTouchstart: i[1] || (i[1] = //@ts-ignore
|
|
137
|
-
(...
|
|
137
|
+
(...t) => e(g) && e(g)(...t))
|
|
138
138
|
}, [
|
|
139
|
-
|
|
140
|
-
class: u(e(
|
|
141
|
-
style:
|
|
139
|
+
V("div", {
|
|
140
|
+
class: u(e(l).e("bar")),
|
|
141
|
+
style: p(e(G))
|
|
142
142
|
}, null, 6),
|
|
143
|
-
ne(
|
|
144
|
-
id: a.range ? void 0 : e(
|
|
143
|
+
ne(M, {
|
|
144
|
+
id: a.range ? void 0 : e(U),
|
|
145
145
|
ref_key: "firstButton",
|
|
146
146
|
ref: j,
|
|
147
|
-
"model-value": e(
|
|
147
|
+
"model-value": e(m),
|
|
148
148
|
vertical: a.vertical,
|
|
149
149
|
"tooltip-class": a.tooltipClass,
|
|
150
150
|
placement: a.placement,
|
|
151
151
|
role: "slider",
|
|
152
|
-
"aria-labelledby": !a.range && e(
|
|
152
|
+
"aria-labelledby": !a.range && e(N) ? e(b)?.labelId : void 0,
|
|
153
153
|
"aria-valuemin": a.min,
|
|
154
|
-
"aria-valuemax": a.range ? e(
|
|
155
|
-
"aria-valuenow": e(
|
|
154
|
+
"aria-valuemax": a.range ? e(v) : a.max,
|
|
155
|
+
"aria-valuenow": e(m),
|
|
156
156
|
"aria-valuetext": X.value,
|
|
157
157
|
"aria-orientation": a.vertical ? "vertical" : "horizontal",
|
|
158
|
-
"aria-disabled": e(
|
|
159
|
-
"onUpdate:modelValue": e(
|
|
158
|
+
"aria-disabled": e(c),
|
|
159
|
+
"onUpdate:modelValue": e(F)
|
|
160
160
|
}, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]),
|
|
161
|
-
a.range ? (
|
|
161
|
+
a.range ? (o(), I(M, {
|
|
162
162
|
key: 0,
|
|
163
163
|
ref_key: "secondButton",
|
|
164
164
|
ref: q,
|
|
165
|
-
"model-value": e(
|
|
165
|
+
"model-value": e(v),
|
|
166
166
|
vertical: a.vertical,
|
|
167
167
|
"tooltip-class": a.tooltipClass,
|
|
168
168
|
placement: a.placement,
|
|
169
169
|
role: "slider",
|
|
170
170
|
"aria-label": Y.value,
|
|
171
|
-
"aria-valuemin": e(
|
|
171
|
+
"aria-valuemin": e(m),
|
|
172
172
|
"aria-valuemax": a.max,
|
|
173
|
-
"aria-valuenow": e(
|
|
173
|
+
"aria-valuenow": e(v),
|
|
174
174
|
"aria-valuetext": Z.value,
|
|
175
175
|
"aria-orientation": a.vertical ? "vertical" : "horizontal",
|
|
176
|
-
"aria-disabled": e(
|
|
176
|
+
"aria-disabled": e(c),
|
|
177
177
|
"onUpdate:modelValue": e(J)
|
|
178
|
-
}, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) :
|
|
179
|
-
a.showStops ? (
|
|
180
|
-
(
|
|
181
|
-
key:
|
|
182
|
-
class: u(e(
|
|
183
|
-
style:
|
|
178
|
+
}, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : S("", !0),
|
|
179
|
+
a.showStops ? (o(), r("div", Se, [
|
|
180
|
+
(o(!0), r(k, null, B(e(O), (t, f) => (o(), r("div", {
|
|
181
|
+
key: f,
|
|
182
|
+
class: u(e(l).e("stop")),
|
|
183
|
+
style: p(e(h)(t))
|
|
184
184
|
}, null, 6))), 128))
|
|
185
|
-
])) :
|
|
186
|
-
e(
|
|
187
|
-
|
|
188
|
-
(
|
|
189
|
-
key:
|
|
190
|
-
style:
|
|
191
|
-
class: u([e(
|
|
185
|
+
])) : S("", !0),
|
|
186
|
+
e(w).length > 0 ? (o(), r(k, { key: 2 }, [
|
|
187
|
+
V("div", null, [
|
|
188
|
+
(o(!0), r(k, null, B(e(w), (t, f) => (o(), r("div", {
|
|
189
|
+
key: f,
|
|
190
|
+
style: p(e(h)(t.position)),
|
|
191
|
+
class: u([e(l).e("stop"), e(l).e("marks-stop")])
|
|
192
192
|
}, null, 6))), 128))
|
|
193
193
|
]),
|
|
194
|
-
|
|
195
|
-
class: u(e(
|
|
194
|
+
V("div", {
|
|
195
|
+
class: u(e(l).e("marks"))
|
|
196
196
|
}, [
|
|
197
|
-
(
|
|
198
|
-
key:
|
|
199
|
-
mark:
|
|
200
|
-
style:
|
|
197
|
+
(o(!0), r(k, null, B(e(w), (t, f) => (o(), I(e(be), {
|
|
198
|
+
key: f,
|
|
199
|
+
mark: t.mark,
|
|
200
|
+
style: p(e(h)(t.position))
|
|
201
201
|
}, null, 8, ["mark", "style"]))), 128))
|
|
202
202
|
], 2)
|
|
203
|
-
], 64)) :
|
|
203
|
+
], 64)) : S("", !0)
|
|
204
204
|
], 38),
|
|
205
|
-
a.showInput && !a.range ? (
|
|
205
|
+
a.showInput && !a.range ? (o(), I(e(ue), {
|
|
206
206
|
key: 0,
|
|
207
207
|
ref: "input",
|
|
208
|
-
"model-value": e(
|
|
209
|
-
class: u(e(
|
|
208
|
+
"model-value": e(m),
|
|
209
|
+
class: u(e(l).e("input")),
|
|
210
210
|
step: a.step,
|
|
211
|
-
disabled: e(
|
|
211
|
+
disabled: e(c),
|
|
212
212
|
controls: a.showInputControls,
|
|
213
213
|
min: a.min,
|
|
214
214
|
max: a.max,
|
|
215
215
|
debounce: a.debounce,
|
|
216
216
|
size: Q.value,
|
|
217
|
-
"onUpdate:modelValue": e(
|
|
218
|
-
onChange: e(
|
|
219
|
-
}, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "debounce", "size", "onUpdate:modelValue", "onChange"])) :
|
|
220
|
-
], 42,
|
|
217
|
+
"onUpdate:modelValue": e(F),
|
|
218
|
+
onChange: e(E)
|
|
219
|
+
}, null, 8, ["model-value", "class", "step", "disabled", "controls", "min", "max", "debounce", "size", "onUpdate:modelValue", "onChange"])) : S("", !0)
|
|
220
|
+
], 42, Ve));
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
export {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftIcon as
|
|
1
|
+
import { defineComponent as K, ref as N, inject as Y, getCurrentInstance as q, onMounted as x, watch as F, computed as n, reactive as G, onBeforeUnmount as H, createElementBlock as a, openBlock as i, normalizeClass as l, normalizeStyle as D, createCommentVNode as y, createElementVNode as m, unref as t, renderSlot as p, createTextVNode as $, toDisplayString as k, createBlock as V, mergeProps as Q } from "vue";
|
|
2
|
+
import { VftIcon as I } from "../icon/index.js";
|
|
3
3
|
import "@vueuse/core";
|
|
4
|
-
import { singleAttrToObj as
|
|
4
|
+
import { singleAttrToObj as R, isNumber as X } from "@vft/utils";
|
|
5
5
|
import "../config-provider/hooks/use-global-config.js";
|
|
6
6
|
import "lodash-es";
|
|
7
7
|
import "../form/index.js";
|
|
8
|
-
import { useNamespace as
|
|
8
|
+
import { useNamespace as Z } from "../../hooks/use-namespace/index.js";
|
|
9
9
|
import "../../hooks/use-model-toggle/index.js";
|
|
10
10
|
import "@popperjs/core";
|
|
11
11
|
import "../../hooks/use-z-index/index.js";
|
|
12
|
-
import { STEPS_INJECTION_KEY as
|
|
13
|
-
const ee =
|
|
12
|
+
import { STEPS_INJECTION_KEY as _ } from "./tokens.js";
|
|
13
|
+
const ee = K({
|
|
14
14
|
name: "VftStep"
|
|
15
|
-
}), de = /* @__PURE__ */
|
|
15
|
+
}), de = /* @__PURE__ */ K({
|
|
16
16
|
...ee,
|
|
17
17
|
props: {
|
|
18
18
|
title: {},
|
|
@@ -20,10 +20,10 @@ const ee = D({
|
|
|
20
20
|
description: {},
|
|
21
21
|
status: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
setup(v) {
|
|
24
|
+
const B = v, e = Z("step"), c = N(-1), E = N({}), f = N(""), o = Y(_), h = q();
|
|
25
|
+
x(() => {
|
|
26
|
+
F(
|
|
27
27
|
[
|
|
28
28
|
() => o.props.active,
|
|
29
29
|
() => o.props.processStatus,
|
|
@@ -35,45 +35,45 @@ const ee = D({
|
|
|
35
35
|
{ immediate: !0 }
|
|
36
36
|
);
|
|
37
37
|
});
|
|
38
|
-
const
|
|
39
|
-
() =>
|
|
40
|
-
), r = n(() =>
|
|
38
|
+
const P = n(
|
|
39
|
+
() => R(B.icon, "icon")
|
|
40
|
+
), r = n(() => B.status || f.value), O = n(() => {
|
|
41
41
|
const s = o.steps.value[c.value - 1];
|
|
42
42
|
return s ? s.currentStatus : "wait";
|
|
43
|
-
}),
|
|
43
|
+
}), g = n(() => o.props.alignCenter), T = n(() => o.props.direction === "vertical"), u = n(() => o.props.simple), C = n(() => o.props.contentPosition === "top"), b = n(() => o.steps.value.length), W = n(() => o.steps.value[b.value - 1]?.uid === h.uid), S = n(() => u.value ? "" : o.props.space), A = n(() => [
|
|
44
44
|
e.b(),
|
|
45
45
|
e.is(u.value ? "simple" : o.props.direction),
|
|
46
|
-
e.is("flex",
|
|
47
|
-
e.is("center",
|
|
48
|
-
e.is("content-top",
|
|
46
|
+
e.is("flex", W.value && !S.value && !g.value),
|
|
47
|
+
e.is("center", g.value && !T.value && !u.value),
|
|
48
|
+
e.is("content-top", C.value),
|
|
49
49
|
e.is(r.value)
|
|
50
50
|
]), J = n(() => {
|
|
51
51
|
const s = {
|
|
52
|
-
flexBasis:
|
|
52
|
+
flexBasis: X(S.value) ? `${S.value}px` : S.value ? S.value : `${100 / (b.value - (g.value ? 0 : 1))}%`
|
|
53
53
|
};
|
|
54
|
-
return
|
|
54
|
+
return T.value || W.value && (s.maxWidth = `${100 / b.value}%`), s;
|
|
55
55
|
}), L = (s) => {
|
|
56
56
|
c.value = s;
|
|
57
57
|
}, M = (s) => {
|
|
58
|
-
const
|
|
59
|
-
transitionDelay: `${
|
|
60
|
-
},
|
|
61
|
-
|
|
58
|
+
const d = s === "wait", w = {
|
|
59
|
+
transitionDelay: `${d ? "-" : ""}${150 * c.value}ms`
|
|
60
|
+
}, z = s === o.props.processStatus || d ? 0 : 100;
|
|
61
|
+
w.borderWidth = z && !u.value ? "1px" : 0, w[o.props.direction === "vertical" ? "height" : "width"] = `${z}%`, E.value = w;
|
|
62
62
|
}, U = (s) => {
|
|
63
|
-
s > c.value ?
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
uid:
|
|
68
|
-
getVnode: () =>
|
|
63
|
+
s > c.value ? f.value = o.props.finishStatus : s === c.value && O.value !== "error" ? f.value = o.props.processStatus : f.value = "wait";
|
|
64
|
+
const d = o.steps.value[c.value - 1];
|
|
65
|
+
d && d.calcProgress(f.value);
|
|
66
|
+
}, j = G({
|
|
67
|
+
uid: h.uid,
|
|
68
|
+
getVnode: () => h.vnode,
|
|
69
69
|
currentStatus: r,
|
|
70
70
|
setIndex: L,
|
|
71
71
|
calcProgress: M
|
|
72
72
|
});
|
|
73
|
-
return o.addStep(
|
|
74
|
-
o.removeStep(
|
|
75
|
-
}), (s,
|
|
76
|
-
style:
|
|
73
|
+
return o.addStep(j), H(() => {
|
|
74
|
+
o.removeStep(j);
|
|
75
|
+
}), (s, d) => (i(), a("div", {
|
|
76
|
+
style: D(J.value),
|
|
77
77
|
class: l(A.value)
|
|
78
78
|
}, [
|
|
79
79
|
s.$slots.top ? (i(), a("div", {
|
|
@@ -81,59 +81,59 @@ const ee = D({
|
|
|
81
81
|
class: l(t(e).e("top-slot"))
|
|
82
82
|
}, [
|
|
83
83
|
p(s.$slots, "top")
|
|
84
|
-
], 2)) :
|
|
84
|
+
], 2)) : C.value ? (i(), a("div", {
|
|
85
85
|
key: 1,
|
|
86
86
|
class: l(t(e).e("main"))
|
|
87
87
|
}, [
|
|
88
|
-
|
|
88
|
+
m("div", {
|
|
89
89
|
class: l([t(e).e("title"), t(e).is(r.value)])
|
|
90
90
|
}, [
|
|
91
91
|
p(s.$slots, "title", {}, () => [
|
|
92
|
-
k(
|
|
92
|
+
$(k(v.title), 1)
|
|
93
93
|
])
|
|
94
94
|
], 2),
|
|
95
95
|
u.value ? (i(), a("div", {
|
|
96
96
|
key: 0,
|
|
97
97
|
class: l(t(e).e("arrow"))
|
|
98
|
-
}, null, 2)) :
|
|
99
|
-
|
|
98
|
+
}, null, 2)) : y("", !0),
|
|
99
|
+
m("div", {
|
|
100
100
|
class: l([t(e).e("description"), t(e).is(r.value)])
|
|
101
101
|
}, [
|
|
102
102
|
p(s.$slots, "description", {}, () => [
|
|
103
|
-
k(
|
|
103
|
+
$(k(v.description), 1)
|
|
104
104
|
])
|
|
105
105
|
], 2)
|
|
106
|
-
], 2)) :
|
|
107
|
-
|
|
106
|
+
], 2)) : y("", !0),
|
|
107
|
+
m("div", {
|
|
108
108
|
class: l([t(e).e("head"), t(e).is(r.value)])
|
|
109
109
|
}, [
|
|
110
|
-
u.value ?
|
|
110
|
+
u.value ? y("", !0) : (i(), a("div", {
|
|
111
111
|
key: 0,
|
|
112
112
|
class: l(t(e).e("line"))
|
|
113
113
|
}, [
|
|
114
|
-
|
|
114
|
+
m("i", {
|
|
115
115
|
class: l(t(e).e("line-inner")),
|
|
116
|
-
style:
|
|
116
|
+
style: D(E.value)
|
|
117
117
|
}, null, 6)
|
|
118
118
|
], 2)),
|
|
119
|
-
|
|
120
|
-
class: l([t(e).e("icon"), t(e).is(
|
|
119
|
+
m("div", {
|
|
120
|
+
class: l([t(e).e("icon"), t(e).is(v.icon || s.$slots.icon ? "icon" : "text")])
|
|
121
121
|
}, [
|
|
122
122
|
p(s.$slots, "icon", {}, () => [
|
|
123
|
-
|
|
123
|
+
P.value?.icon ? (i(), V(t(I), Q({ key: 0 }, P.value, {
|
|
124
124
|
class: t(e).e("icon-inner")
|
|
125
|
-
}), null, 16, ["class"])) : r.value === "success" ? (i(),
|
|
125
|
+
}), null, 16, ["class"])) : r.value === "success" ? (i(), V(t(I), {
|
|
126
126
|
key: 1,
|
|
127
127
|
class: l([t(e).e("icon-inner"), t(e).is("status")]),
|
|
128
128
|
icon: "icon-check"
|
|
129
|
-
}, null, 8, ["class"])) : r.value === "error" ? (i(),
|
|
129
|
+
}, null, 8, ["class"])) : r.value === "error" ? (i(), V(t(I), {
|
|
130
130
|
key: 2,
|
|
131
131
|
class: l([t(e).e("icon-inner"), t(e).is("status")]),
|
|
132
132
|
icon: "icon-close"
|
|
133
|
-
}, null, 8, ["class"])) : u.value ?
|
|
133
|
+
}, null, 8, ["class"])) : u.value ? y("", !0) : (i(), a("div", {
|
|
134
134
|
key: 3,
|
|
135
135
|
class: l(t(e).e("icon-inner"))
|
|
136
|
-
},
|
|
136
|
+
}, k(c.value + 1), 3))
|
|
137
137
|
])
|
|
138
138
|
], 2)
|
|
139
139
|
], 2),
|
|
@@ -142,15 +142,15 @@ const ee = D({
|
|
|
142
142
|
class: l(t(e).e("bottom-slot"))
|
|
143
143
|
}, [
|
|
144
144
|
p(s.$slots, "bottom")
|
|
145
|
-
], 2)) :
|
|
145
|
+
], 2)) : C.value ? y("", !0) : (i(), a("div", {
|
|
146
146
|
key: 3,
|
|
147
147
|
class: l(t(e).e("main"))
|
|
148
148
|
}, [
|
|
149
|
-
|
|
149
|
+
m("div", {
|
|
150
150
|
class: l([t(e).e("title"), t(e).is(r.value)])
|
|
151
151
|
}, [
|
|
152
152
|
p(s.$slots, "title", {}, () => [
|
|
153
|
-
k(
|
|
153
|
+
$(k(v.title), 1)
|
|
154
154
|
])
|
|
155
155
|
], 2),
|
|
156
156
|
u.value ? (i(), a("div", {
|
|
@@ -161,7 +161,7 @@ const ee = D({
|
|
|
161
161
|
class: l([t(e).e("description"), t(e).is(r.value)])
|
|
162
162
|
}, [
|
|
163
163
|
p(s.$slots, "description", {}, () => [
|
|
164
|
-
k(
|
|
164
|
+
$(k(v.description), 1)
|
|
165
165
|
])
|
|
166
166
|
], 2))
|
|
167
167
|
], 2))
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CHANGE_EVENT as
|
|
1
|
+
import { defineComponent as m, getCurrentInstance as u, watch as a, provide as h, createElementBlock as S, openBlock as C, normalizeClass as v, unref as i, renderSlot as E, createVNode as N } from "vue";
|
|
2
|
+
import { CHANGE_EVENT as _ } from "../../constants/event.js";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
5
5
|
import "../config-provider/hooks/use-global-config.js";
|
|
@@ -11,9 +11,9 @@ import { useOrderedChildren as I } from "../../hooks/use-ordered-children/index.
|
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
13
|
import { STEPS_INJECTION_KEY as g } from "./tokens.js";
|
|
14
|
-
const T =
|
|
14
|
+
const T = m({
|
|
15
15
|
name: "vft-steps"
|
|
16
|
-
}),
|
|
16
|
+
}), K = /* @__PURE__ */ m({
|
|
17
17
|
...T,
|
|
18
18
|
props: {
|
|
19
19
|
space: {},
|
|
@@ -26,30 +26,30 @@ const T = p({
|
|
|
26
26
|
contentPosition: { default: "bottom" }
|
|
27
27
|
},
|
|
28
28
|
emits: ["change"],
|
|
29
|
-
setup(
|
|
30
|
-
const s =
|
|
31
|
-
children:
|
|
32
|
-
addChild:
|
|
33
|
-
removeChild:
|
|
29
|
+
setup(o, { emit: p }) {
|
|
30
|
+
const s = o, l = p, n = B("steps"), {
|
|
31
|
+
children: r,
|
|
32
|
+
addChild: c,
|
|
33
|
+
removeChild: d,
|
|
34
34
|
ChildrenSorter: f
|
|
35
35
|
} = I(u(), "VftStep");
|
|
36
|
-
return
|
|
37
|
-
|
|
36
|
+
return a(r, () => {
|
|
37
|
+
r.value.forEach((e, t) => {
|
|
38
38
|
e.setIndex(t);
|
|
39
39
|
});
|
|
40
|
-
}), h(g, { props: s, steps:
|
|
40
|
+
}), h(g, { props: s, steps: r, addStep: c, removeStep: d }), a(
|
|
41
41
|
() => s.active,
|
|
42
42
|
(e, t) => {
|
|
43
|
-
l(
|
|
43
|
+
l(_, e, t);
|
|
44
44
|
}
|
|
45
45
|
), (e, t) => (C(), S("div", {
|
|
46
|
-
class: v([
|
|
46
|
+
class: v([i(n).b(), i(n).m(o.simple ? "simple" : o.direction)])
|
|
47
47
|
}, [
|
|
48
48
|
E(e.$slots, "default"),
|
|
49
|
-
|
|
49
|
+
N(i(f))
|
|
50
50
|
], 2));
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
53
|
export {
|
|
54
|
-
|
|
54
|
+
K as default
|
|
55
55
|
};
|