x-next 1.4.0 → 1.6.0
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/AI_USAGE.md +2 -2
- package/CHANGELOG.md +71 -0
- package/dist/_utils/color.d.ts +53 -0
- package/dist/components/color-picker/ColorPicker.d.ts +239 -0
- package/dist/components/color-picker/gradient-slider.d.ts +52 -0
- package/dist/components/color-picker/index.d.ts +238 -0
- package/dist/components/color-picker/panel.d.ts +721 -0
- package/dist/components/color-picker/sv-panel.d.ts +48 -0
- package/dist/components/date-picker/DatePicker.vue.d.ts +3 -3
- package/dist/components/date-picker/index.d.ts +6 -6
- package/dist/components/dropdown/Dropdown.vue.d.ts +34 -4
- package/dist/components/dropdown/DropdownButton.vue.d.ts +37 -6
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +34 -4
- package/dist/components/dropdown/dropdown-panel.vue.d.ts +30 -0
- package/dist/components/dropdown/index.d.ts +212 -29
- package/dist/components/form/FormItem.vue.d.ts +3 -3
- package/dist/components/form/form-item-label.vue.d.ts +3 -3
- package/dist/components/form/index.d.ts +6 -6
- package/dist/components/form-select/Select.d.ts +3 -3
- package/dist/components/form-select/SelectDropdown.vue.d.ts +30 -0
- package/dist/components/form-select/index.d.ts +66 -6
- package/dist/components/form-slider/Slider.vue.d.ts +3 -3
- package/dist/components/form-slider/index.d.ts +6 -6
- package/dist/components/form-slider/slider-button.vue.d.ts +3 -3
- package/dist/components/heatmap/Heatmap.d.ts +311 -0
- package/dist/components/heatmap/helpers/matrix.d.ts +58 -0
- package/dist/components/heatmap/index.d.ts +372 -0
- package/dist/components/heatmap/interface.d.ts +57 -0
- package/dist/components/image/Image.vue.d.ts +3 -3
- package/dist/components/image/ImagePreview.vue.d.ts +3 -3
- package/dist/components/image/ImagePreviewAction.d.ts +3 -3
- package/dist/components/image/ImagePreviewGroup.vue.d.ts +3 -3
- package/dist/components/image/index.d.ts +24 -24
- package/dist/components/image/preview-toolbar.vue.d.ts +3 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/components/menu/sub-menu-pop.vue.d.ts +3 -3
- package/dist/components/network/Network.vue.d.ts +1 -1
- package/dist/components/network/index.d.ts +3 -3
- package/dist/components/network/utils.d.ts +2 -0
- package/dist/components/pagination/page-item-ellipsis.vue.d.ts +9 -0
- package/dist/components/pagination/page-jumper.vue.d.ts +6 -0
- package/dist/components/pagination/page-options.vue.d.ts +6 -6
- package/dist/components/popover/Popover.d.ts +1 -1
- package/dist/components/popover/index.d.ts +3 -3
- package/dist/components/popup/Popup.d.ts +1 -1
- package/dist/components/popup/index.d.ts +3 -3
- package/dist/components/skeleton/SkeletonShape.vue.d.ts +3 -3
- package/dist/components/skeleton/index.d.ts +6 -6
- package/dist/components/spin/Spin.d.ts +38 -0
- package/dist/components/spin/index.d.ts +30 -0
- package/dist/components/steps/context.d.ts +9 -0
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/index.d.ts +3 -3
- package/dist/components/tabs/TabPane.vue.d.ts +2 -0
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +9 -3
- package/dist/components/tabs/interface.d.ts +4 -0
- package/dist/components/time-picker/TimePicker.vue.d.ts +3 -3
- package/dist/components/time-picker/index.d.ts +6 -6
- package/dist/components/tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/components/tooltip/index.d.ts +3 -3
- package/dist/components/trigger/Trigger.d.ts +1 -1
- package/dist/components/trigger/index.d.ts +3 -3
- package/dist/components/watermark/Watermark.d.ts +1 -1
- package/dist/components/watermark/index.d.ts +3 -3
- package/dist/es/_styles/palette-aliases.js +8 -0
- package/dist/es/_utils/color.js +73 -0
- package/dist/es/components/button/Button.js +2 -2
- package/dist/es/components/color-picker/ColorPicker.js +239 -0
- package/dist/es/components/color-picker/gradient-slider.js +79 -0
- package/dist/es/components/color-picker/index.js +8 -0
- package/dist/es/components/color-picker/panel.js +307 -0
- package/dist/es/components/color-picker/sv-panel.js +99 -0
- package/dist/es/components/dropdown/Dropdown.vue2.js +11 -4
- package/dist/es/components/dropdown/DropdownButton.vue.js +8 -7
- package/dist/es/components/dropdown/DropdownButton.vue2.js +19 -17
- package/dist/es/components/dropdown/DropdownSubmenu.vue.js +18 -17
- package/dist/es/components/dropdown/dropdown-panel.vue.js +17 -17
- package/dist/es/components/form-input/Input.js +7 -7
- package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
- package/dist/es/components/form-input/InputSearch.js +2 -2
- package/dist/es/components/form-input-number/InputNumber.js +12 -12
- package/dist/es/components/heatmap/Heatmap.js +334 -0
- package/dist/es/components/heatmap/helpers/matrix.js +106 -0
- package/dist/es/components/heatmap/index.js +8 -0
- package/dist/es/components/index.js +118 -114
- package/dist/es/components/menu/MenuSubMenu.js +50 -36
- package/dist/es/components/menu/sub-menu-pop.vue2.js +30 -30
- package/dist/es/components/network/Network.vue2.js +72 -72
- package/dist/es/components/network/utils.js +44 -35
- package/dist/es/components/pagination/Pagination.js +124 -112
- package/dist/es/components/pagination/page-item-ellipsis.vue.js +13 -12
- package/dist/es/components/pagination/page-item-ellipsis.vue2.js +19 -15
- package/dist/es/components/pagination/page-jumper.vue.js +13 -12
- package/dist/es/components/pagination/page-jumper.vue2.js +7 -4
- package/dist/es/components/pagination/page-options.vue.js +4 -3
- package/dist/es/components/pagination/page-options.vue2.js +17 -15
- package/dist/es/components/skeleton/Skeleton.vue.js +11 -9
- package/dist/es/components/skeleton/SkeletonLine.vue.js +9 -8
- package/dist/es/components/skeleton/SkeletonShape.vue.js +8 -7
- package/dist/es/components/spin/Spin.js +124 -60
- package/dist/es/components/steps/Step.vue2.js +51 -47
- package/dist/es/components/steps/Steps.vue2.js +22 -19
- package/dist/es/components/table/Table.js +3 -1
- package/dist/es/components/tabs/TabPane.vue.js +11 -9
- package/dist/es/components/tabs/TabPane.vue2.js +28 -24
- package/dist/es/components/tabs/tabs-nav.js +20 -18
- package/dist/es/components/tabs/tabs-tab.vue.js +10 -8
- package/dist/es/components/trigger/Trigger.js +19 -19
- package/dist/es/icons/_self/empty-better.js +25 -8
- package/dist/es/index.js +162 -158
- package/dist/es/locale/en-US.js +19 -2
- package/dist/es/locale/zh-CN.js +19 -2
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +30 -0
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/color-picker.css +1 -0
- package/dist/style/color-picker.js +2 -0
- package/dist/style/date-picker.css +1 -1
- package/dist/style/dropdown.css +1 -1
- package/dist/style/empty.css +1 -1
- package/dist/style/form-checkbox.css +1 -1
- package/dist/style/form-input-tag.css +1 -1
- package/dist/style/form-input.css +1 -1
- package/dist/style/form-radio.css +1 -1
- package/dist/style/form-textarea.css +1 -1
- package/dist/style/form.css +1 -1
- package/dist/style/heatmap.css +1 -0
- package/dist/style/heatmap.js +2 -0
- package/dist/style/image.css +1 -1
- package/dist/style/menu.css +1 -1
- package/dist/style/pagination.css +1 -1
- package/dist/style/skeleton.css +1 -1
- package/dist/style/spin.css +1 -1
- package/dist/style/steps.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style/tabs.css +1 -1
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +3 -2
- package/volar.d.ts +2 -0
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import t from "./SkeletonLine.vue2.js";
|
|
2
|
-
import { openBlock as r, createElementBlock as l, normalizeClass as n, Fragment as a, renderList as
|
|
3
|
-
import
|
|
4
|
-
function p(e, u, f,
|
|
2
|
+
import { openBlock as r, createElementBlock as l, normalizeClass as n, Fragment as a, renderList as i, normalizeStyle as m } from "vue";
|
|
3
|
+
import c from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function p(e, u, f, d, _, k) {
|
|
5
5
|
return r(), l("ul", {
|
|
6
|
-
class: n(e.className.block)
|
|
6
|
+
class: n(e.className.block),
|
|
7
|
+
"aria-hidden": "true"
|
|
7
8
|
}, [
|
|
8
|
-
(r(!0), l(a, null,
|
|
9
|
+
(r(!0), l(a, null, i(e.lines, (o, s) => (r(), l("li", {
|
|
9
10
|
key: s,
|
|
10
11
|
class: n(e.className.element("row")),
|
|
11
|
-
style:
|
|
12
|
+
style: m(o)
|
|
12
13
|
}, null, 6))), 128))
|
|
13
14
|
], 2);
|
|
14
15
|
}
|
|
15
|
-
const
|
|
16
|
+
const z = /* @__PURE__ */ c(t, [["render", p]]);
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
z as default
|
|
18
19
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { openBlock as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
return
|
|
6
|
-
class: n(e.cls)
|
|
1
|
+
import r from "./SkeletonShape.vue2.js";
|
|
2
|
+
import { openBlock as o, createElementBlock as t, normalizeClass as n } from "vue";
|
|
3
|
+
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function s(e, c, l, p, i, m) {
|
|
5
|
+
return o(), t("div", {
|
|
6
|
+
class: n(e.cls),
|
|
7
|
+
"aria-hidden": "true"
|
|
7
8
|
}, null, 2);
|
|
8
9
|
}
|
|
9
|
-
const u = /* @__PURE__ */
|
|
10
|
+
const u = /* @__PURE__ */ a(r, [["render", s]]);
|
|
10
11
|
export {
|
|
11
12
|
u as default
|
|
12
13
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { getFirstComponent as
|
|
5
|
-
import { getClassNameMixin as
|
|
6
|
-
import { useLocale as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as D, computed as s, ref as S, watch as x, onUnmounted as B, onMounted as R, onUpdated as U, createVNode as r, mergeProps as V, Fragment as A, cloneVNode as H } from "vue";
|
|
2
|
+
import O from "../../icons/animation/animation-loading.js";
|
|
3
|
+
import _ from "./dot-loading.js";
|
|
4
|
+
import { getFirstComponent as q } from "../../_utils/vue-eco.js";
|
|
5
|
+
import { getClassNameMixin as P } from "../../_utils/config.js";
|
|
6
|
+
import { useLocale as $ } from "../../locale/index.js";
|
|
7
|
+
const j = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"])', Y = /* @__PURE__ */ D({
|
|
8
8
|
name: "Spin",
|
|
9
9
|
inheritAttrs: !1,
|
|
10
10
|
props: {
|
|
@@ -28,6 +28,16 @@ const M = /* @__PURE__ */ p({
|
|
|
28
28
|
* @en Whether it is loading state (Only effective in container mode)
|
|
29
29
|
*/
|
|
30
30
|
loading: Boolean,
|
|
31
|
+
/**
|
|
32
|
+
* @zh 延迟显示加载态的时间,单位毫秒。用于避免「请求很快就结束」时闪一下加载态;
|
|
33
|
+
* 加载结束时立即收起,不会拖住已经加载好的内容(这一点与 AntDV 的双向延迟不同)
|
|
34
|
+
* @en Delay in milliseconds before showing the loading state. Prevents a flash of
|
|
35
|
+
* loading for fast requests; hiding is immediate (unlike AntDV's symmetric delay)
|
|
36
|
+
*/
|
|
37
|
+
delay: {
|
|
38
|
+
type: Number,
|
|
39
|
+
default: 0
|
|
40
|
+
},
|
|
31
41
|
/**
|
|
32
42
|
* @zh 是否使用点类型的动画
|
|
33
43
|
* @en Whether to use dot type animation
|
|
@@ -47,6 +57,14 @@ const M = /* @__PURE__ */ p({
|
|
|
47
57
|
hideIcon: {
|
|
48
58
|
type: Boolean,
|
|
49
59
|
default: !1
|
|
60
|
+
},
|
|
61
|
+
/**
|
|
62
|
+
* @zh 提示文字是否开启扫光效果(需要同时设置 tip)
|
|
63
|
+
* @en Whether the tip text uses a shimmer sweep (requires tip)
|
|
64
|
+
*/
|
|
65
|
+
tipShimmer: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: !1
|
|
50
68
|
}
|
|
51
69
|
},
|
|
52
70
|
/**
|
|
@@ -65,71 +83,117 @@ const M = /* @__PURE__ */ p({
|
|
|
65
83
|
* @slot tip
|
|
66
84
|
*/
|
|
67
85
|
setup(e, {
|
|
68
|
-
attrs:
|
|
69
|
-
slots:
|
|
86
|
+
attrs: T,
|
|
87
|
+
slots: n
|
|
70
88
|
}) {
|
|
71
|
-
const
|
|
72
|
-
t:
|
|
73
|
-
} =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
89
|
+
const a = P("spin"), {
|
|
90
|
+
t: k
|
|
91
|
+
} = $(), o = s(() => !!n.default), u = S(!1);
|
|
92
|
+
let c;
|
|
93
|
+
const v = () => {
|
|
94
|
+
c !== void 0 && (clearTimeout(c), c = void 0);
|
|
95
|
+
};
|
|
96
|
+
x(() => [e.loading, e.delay, o.value], ([t, i, d]) => {
|
|
97
|
+
if (v(), !d) {
|
|
98
|
+
u.value = !0;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (!t) {
|
|
102
|
+
u.value = !1;
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (u.value || !i || !Number.isFinite(i) || i <= 0) {
|
|
106
|
+
u.value = !0;
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
c = setTimeout(() => {
|
|
110
|
+
u.value = !0, c = void 0;
|
|
111
|
+
}, i);
|
|
112
|
+
}, {
|
|
113
|
+
immediate: !0
|
|
114
|
+
}), B(v);
|
|
115
|
+
const l = s(() => e.loading && u.value), z = s(() => [a.block, e.display === "inline" ? a.modifier("inline") : a.modifier("block"), {
|
|
116
|
+
[a.modifier("loading")]: l.value,
|
|
117
|
+
[a.modifier("with-tip")]: e.tip && !n.default,
|
|
118
|
+
/*
|
|
119
|
+
* 扫光只作用于提示文字。tip 是 prop 时 with-tip 才成立;
|
|
120
|
+
* 自定义 tip 插槽的内容结构未知,不加扫光,避免破坏使用方自己的样式。
|
|
121
|
+
*/
|
|
122
|
+
[a.modifier("tip-shimmer")]: e.tipShimmer && !!e.tip
|
|
123
|
+
}]), C = () => {
|
|
124
|
+
if (n.icon) {
|
|
125
|
+
const t = q(n.icon());
|
|
126
|
+
if (t)
|
|
127
|
+
return H(t, {
|
|
81
128
|
spin: !0
|
|
82
129
|
});
|
|
83
130
|
}
|
|
84
|
-
return
|
|
131
|
+
return n.element ? n.element() : e.dot ? r(_, {
|
|
85
132
|
size: e.size,
|
|
86
133
|
type: e.dot === "color" ? "color" : "default"
|
|
87
|
-
}, null) :
|
|
88
|
-
spin: !0,
|
|
134
|
+
}, null) : r(O, {
|
|
89
135
|
size: e.size
|
|
90
136
|
}, null);
|
|
91
|
-
},
|
|
92
|
-
var
|
|
93
|
-
const
|
|
137
|
+
}, p = () => {
|
|
138
|
+
var d;
|
|
139
|
+
const t = e.size ? {
|
|
94
140
|
fontSize: `${e.size}px`
|
|
95
|
-
} : void 0,
|
|
96
|
-
return
|
|
97
|
-
class:
|
|
98
|
-
style:
|
|
99
|
-
}, [
|
|
100
|
-
class:
|
|
101
|
-
}, [((
|
|
141
|
+
} : void 0, i = !!(n.tip ?? e.tip);
|
|
142
|
+
return r(A, null, [!e.hideIcon && r("div", {
|
|
143
|
+
class: a.element("icon"),
|
|
144
|
+
style: t
|
|
145
|
+
}, [C()]), i && r("div", {
|
|
146
|
+
class: a.element("tip")
|
|
147
|
+
}, [((d = n.tip) == null ? void 0 : d.call(n)) ?? e.tip])]);
|
|
148
|
+
}, m = typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, y = S(), f = /* @__PURE__ */ new Map(), b = () => {
|
|
149
|
+
const t = y.value;
|
|
150
|
+
t && t.querySelectorAll(j).forEach((i) => {
|
|
151
|
+
f.has(i) || (f.set(i, i.getAttribute("tabindex")), i.setAttribute("tabindex", "-1"));
|
|
152
|
+
});
|
|
153
|
+
}, h = () => {
|
|
154
|
+
f.forEach((t, i) => {
|
|
155
|
+
t === null ? i.removeAttribute("tabindex") : i.setAttribute("tabindex", t);
|
|
156
|
+
}), f.clear();
|
|
157
|
+
}, g = (t) => {
|
|
158
|
+
m || (t ? b() : h());
|
|
102
159
|
};
|
|
103
|
-
return (
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}, [
|
|
128
|
-
|
|
129
|
-
|
|
160
|
+
return x(l, g, {
|
|
161
|
+
flush: "post"
|
|
162
|
+
}), R(() => g(l.value)), U(() => {
|
|
163
|
+
!m && l.value && b();
|
|
164
|
+
}), B(() => {
|
|
165
|
+
m || h();
|
|
166
|
+
}), () => {
|
|
167
|
+
var L;
|
|
168
|
+
const {
|
|
169
|
+
class: t,
|
|
170
|
+
style: i,
|
|
171
|
+
role: d,
|
|
172
|
+
"aria-live": E,
|
|
173
|
+
"aria-busy": N,
|
|
174
|
+
"aria-label": F,
|
|
175
|
+
...I
|
|
176
|
+
} = T, M = !!(n.tip ?? e.tip), w = o.value ? l.value : !0;
|
|
177
|
+
return r("div", V(I, {
|
|
178
|
+
class: [z.value, t],
|
|
179
|
+
style: i,
|
|
180
|
+
role: d ?? (o.value ? void 0 : "status"),
|
|
181
|
+
"aria-live": E ?? (o.value && !l.value ? void 0 : "polite"),
|
|
182
|
+
"aria-busy": N ?? (o.value ? l.value : !0),
|
|
183
|
+
"aria-label": F ?? (w && !M ? k("common.loading") : void 0)
|
|
184
|
+
}), [o.value ? r(A, null, [r("div", {
|
|
185
|
+
ref: y,
|
|
186
|
+
class: a.element("children"),
|
|
187
|
+
"aria-hidden": l.value ? "true" : void 0,
|
|
188
|
+
inert: l.value ? "" : void 0
|
|
189
|
+
}, [(L = n.default) == null ? void 0 : L.call(n)]), l.value && r("div", {
|
|
190
|
+
class: a.element("mask")
|
|
191
|
+
}, [r("div", {
|
|
192
|
+
class: a.element("mask--icon")
|
|
193
|
+
}, [p()])])]) : p()]);
|
|
130
194
|
};
|
|
131
195
|
}
|
|
132
196
|
});
|
|
133
197
|
export {
|
|
134
|
-
|
|
198
|
+
Y as default
|
|
135
199
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { stepsInjectionKey as
|
|
5
|
-
import { useIndex as
|
|
6
|
-
import { getClassNameMixin as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as j, getCurrentInstance as w, inject as B, computed as o, ref as f, reactive as E, onBeforeUnmount as K } from "vue";
|
|
2
|
+
import O from "../../icons/default/check.js";
|
|
3
|
+
import _ from "../../icons/default/close.js";
|
|
4
|
+
import { stepsInjectionKey as A } from "./context.js";
|
|
5
|
+
import { useIndex as D } from "../../_hooks/use-index.js";
|
|
6
|
+
import { getClassNameMixin as v } from "../../_utils/config.js";
|
|
7
|
+
const $ = j({
|
|
8
8
|
name: "Step",
|
|
9
9
|
components: {
|
|
10
|
-
IconCheck:
|
|
11
|
-
IconClose:
|
|
10
|
+
IconCheck: O,
|
|
11
|
+
IconClose: _
|
|
12
12
|
},
|
|
13
13
|
slots: Object,
|
|
14
14
|
props: {
|
|
@@ -59,57 +59,61 @@ const T = y({
|
|
|
59
59
|
* @slot description
|
|
60
60
|
*/
|
|
61
61
|
setup(a) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
var m;
|
|
63
|
+
const i = v("steps--item"), c = w(), s = v("steps--icon"), e = B(A, void 0), b = o(() => (e == null ? void 0 : e.type) ?? "default"), d = f(), I = f(((m = e == null ? void 0 : e.registerOrder) == null ? void 0 : m.call(e)) ?? 1), { innerIndex: g } = D({
|
|
64
|
+
itemRef: d,
|
|
65
|
+
selector: `.${i.block}`,
|
|
65
66
|
parentClassName: e == null ? void 0 : e.parentCls
|
|
66
|
-
}),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
}), r = o(() => {
|
|
68
|
+
const n = g.value;
|
|
69
|
+
return (n >= 0 ? n : I.value - 1) + 1;
|
|
70
|
+
}), l = o(
|
|
71
|
+
() => a.status ?? (e == null ? void 0 : e.getStatus(r.value)) ?? "process"
|
|
72
|
+
), S = o(
|
|
73
|
+
() => (e == null ? void 0 : e.errorSteps.includes(r.value + 1)) ?? !1
|
|
70
74
|
);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
step:
|
|
75
|
-
status:
|
|
75
|
+
c && (e == null || e.addItem(
|
|
76
|
+
c.uid,
|
|
77
|
+
E({
|
|
78
|
+
step: r,
|
|
79
|
+
status: l
|
|
76
80
|
})
|
|
77
|
-
)),
|
|
78
|
-
|
|
81
|
+
)), K(() => {
|
|
82
|
+
c && (e == null || e.removeItem(c.uid));
|
|
79
83
|
});
|
|
80
|
-
const
|
|
84
|
+
const k = o(
|
|
81
85
|
() => !(e != null && e.lineLess) && ((e == null ? void 0 : e.labelPlacement) === "vertical" || (e == null ? void 0 : e.direction) === "vertical")
|
|
82
|
-
),
|
|
83
|
-
a.disabled || e == null || e.onClick(
|
|
84
|
-
},
|
|
85
|
-
!
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
), t = o(() => !!(e != null && e.changeable) && !a.disabled), u = o(() => r.value === (e == null ? void 0 : e.current)), y = (n) => {
|
|
87
|
+
a.disabled || e == null || e.onClick(r.value, n);
|
|
88
|
+
}, h = (n) => {
|
|
89
|
+
!t.value || !["Enter", " "].includes(n.key) || (n.preventDefault(), e == null || e.onClick(r.value, n));
|
|
90
|
+
}, N = o(() => [
|
|
91
|
+
i.block,
|
|
92
|
+
i.modifier(l.value),
|
|
89
93
|
{
|
|
90
|
-
[
|
|
91
|
-
[
|
|
92
|
-
[
|
|
94
|
+
[i.modifier("active")]: u.value,
|
|
95
|
+
[i.modifier("next-error")]: S.value,
|
|
96
|
+
[i.modifier("disabled")]: a.disabled
|
|
93
97
|
// [`${prefixCls}-custom`]: !!icon,
|
|
94
98
|
}
|
|
95
99
|
]);
|
|
96
100
|
return {
|
|
97
|
-
className:
|
|
98
|
-
iconClassName:
|
|
99
|
-
cls:
|
|
100
|
-
itemRef:
|
|
101
|
-
showTail:
|
|
102
|
-
stepNumber:
|
|
103
|
-
computedStatus:
|
|
104
|
-
type:
|
|
101
|
+
className: i,
|
|
102
|
+
iconClassName: s,
|
|
103
|
+
cls: N,
|
|
104
|
+
itemRef: d,
|
|
105
|
+
showTail: k,
|
|
106
|
+
stepNumber: r,
|
|
107
|
+
computedStatus: l,
|
|
108
|
+
type: b,
|
|
105
109
|
disabled: a.disabled,
|
|
106
|
-
interactive:
|
|
107
|
-
isActive:
|
|
108
|
-
handleClick:
|
|
109
|
-
handleKeydown:
|
|
110
|
+
interactive: t,
|
|
111
|
+
isActive: u,
|
|
112
|
+
handleClick: y,
|
|
113
|
+
handleKeydown: h
|
|
110
114
|
};
|
|
111
115
|
}
|
|
112
116
|
});
|
|
113
117
|
export {
|
|
114
|
-
|
|
118
|
+
$ as default
|
|
115
119
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { stepsInjectionKey as
|
|
3
|
-
import { getClassNameMixin as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as k, toRefs as N, ref as w, computed as n, reactive as m, provide as B } from "vue";
|
|
2
|
+
import { stepsInjectionKey as I } from "./context.js";
|
|
3
|
+
import { getClassNameMixin as M } from "../../_utils/config.js";
|
|
4
|
+
const $ = k({
|
|
5
5
|
name: "Steps",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -92,20 +92,22 @@ const x = S({
|
|
|
92
92
|
*/
|
|
93
93
|
change: (e, l) => !0
|
|
94
94
|
},
|
|
95
|
-
setup(e, { emit: l, slots:
|
|
96
|
-
const { type: s, lineLess: c, changeable: v } =
|
|
95
|
+
setup(e, { emit: l, slots: P }) {
|
|
96
|
+
const { type: s, lineLess: c, changeable: v } = N(e), a = M("steps"), d = w(e.defaultCurrent), r = n(() => e.current ?? d.value), o = n(
|
|
97
97
|
() => ["navigation", "arrow"].includes(e.type) ? "horizontal" : e.direction
|
|
98
|
-
), f = n(() => e.type === "dot" ?
|
|
98
|
+
), f = n(() => e.type === "dot" ? o.value === "vertical" ? "horizontal" : "vertical" : e.type === "navigation" ? "horizontal" : e.labelPlacement), y = (t) => t < r.value ? "finish" : t > r.value ? "wait" : e.status, g = (t, u) => {
|
|
99
99
|
e.changeable && (d.value = t, l("update:current", t), l("change", t, u));
|
|
100
|
-
},
|
|
101
|
-
() => Array.from(
|
|
100
|
+
}, i = m(/* @__PURE__ */ new Map()), h = n(
|
|
101
|
+
() => Array.from(i.values()).filter((t) => t.status === "error").map((t) => t.step)
|
|
102
102
|
), p = (t, u) => {
|
|
103
|
-
|
|
103
|
+
i.set(t, u);
|
|
104
104
|
}, b = (t) => {
|
|
105
|
-
|
|
106
|
-
}
|
|
105
|
+
i.delete(t);
|
|
106
|
+
};
|
|
107
|
+
let C = 0;
|
|
108
|
+
const S = () => ++C, z = n(() => [
|
|
107
109
|
a.block,
|
|
108
|
-
a.modifier(
|
|
110
|
+
a.modifier(o.value),
|
|
109
111
|
a.element(`label-${f.value}`),
|
|
110
112
|
a.modifier(`mode-${s.value}`),
|
|
111
113
|
{
|
|
@@ -114,11 +116,11 @@ const x = S({
|
|
|
114
116
|
[a.modifier("line-less")]: c.value
|
|
115
117
|
}
|
|
116
118
|
]);
|
|
117
|
-
return
|
|
118
|
-
|
|
119
|
+
return B(
|
|
120
|
+
I,
|
|
119
121
|
m({
|
|
120
122
|
type: s,
|
|
121
|
-
direction:
|
|
123
|
+
direction: o,
|
|
122
124
|
labelPlacement: f,
|
|
123
125
|
lineLess: c,
|
|
124
126
|
changeable: v,
|
|
@@ -128,13 +130,14 @@ const x = S({
|
|
|
128
130
|
addItem: p,
|
|
129
131
|
removeItem: b,
|
|
130
132
|
onClick: g,
|
|
131
|
-
parentCls: a.block
|
|
133
|
+
parentCls: a.block,
|
|
134
|
+
registerOrder: S
|
|
132
135
|
})
|
|
133
136
|
), {
|
|
134
|
-
cls:
|
|
137
|
+
cls: z
|
|
135
138
|
};
|
|
136
139
|
}
|
|
137
140
|
});
|
|
138
141
|
export {
|
|
139
|
-
|
|
142
|
+
$ as default
|
|
140
143
|
};
|
|
@@ -1033,7 +1033,9 @@ const bt = {
|
|
|
1033
1033
|
}, {
|
|
1034
1034
|
default: () => {
|
|
1035
1035
|
var e;
|
|
1036
|
-
return [((e = s.empty) == null ? void 0 : e.call(s)) ?? u(aa,
|
|
1036
|
+
return [((e = s.empty) == null ? void 0 : e.call(s)) ?? u(aa, {
|
|
1037
|
+
component: "table"
|
|
1038
|
+
}, null)];
|
|
1037
1039
|
}
|
|
1038
1040
|
})]
|
|
1039
1041
|
}), Al = (e) => {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { openBlock as a, createElementBlock as t, normalizeClass as n, renderSlot as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
function
|
|
1
|
+
import i from "./TabPane.vue2.js";
|
|
2
|
+
import { openBlock as a, createElementBlock as t, normalizeClass as n, renderSlot as o, createCommentVNode as r } from "vue";
|
|
3
|
+
import l from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const s = ["id", "tabindex", "aria-hidden", "aria-labelledby"];
|
|
5
|
+
function d(e, m, c, p, f, b) {
|
|
6
6
|
return a(), t("div", {
|
|
7
7
|
ref: "itemRef",
|
|
8
8
|
role: "tabpanel",
|
|
9
|
+
id: e.panelId,
|
|
9
10
|
tabindex: e.active ? 0 : -1,
|
|
10
11
|
"aria-hidden": !e.active,
|
|
12
|
+
"aria-labelledby": e.tabId,
|
|
11
13
|
class: n([
|
|
12
14
|
e.className.element("content--item"),
|
|
13
15
|
{ [`${e.className.element("content--item")}-active`]: e.active }
|
|
@@ -17,11 +19,11 @@ function l(e, d, c, p, f, u) {
|
|
|
17
19
|
key: 0,
|
|
18
20
|
class: n(e.className.element("pane"))
|
|
19
21
|
}, [
|
|
20
|
-
|
|
21
|
-
], 2)) :
|
|
22
|
-
], 10,
|
|
22
|
+
o(e.$slots, "default")
|
|
23
|
+
], 2)) : r("", !0)
|
|
24
|
+
], 10, s);
|
|
23
25
|
}
|
|
24
|
-
const h = /* @__PURE__ */ i
|
|
26
|
+
const h = /* @__PURE__ */ l(i, [["render", d]]);
|
|
25
27
|
export {
|
|
26
28
|
h as default
|
|
27
29
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { tabsInjectionKey as
|
|
3
|
-
import { getClassNameMixin as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as O, toRefs as j, getCurrentInstance as k, inject as K, ref as y, computed as d, reactive as N, onBeforeUnmount as R, watch as U, onUpdated as _ } from "vue";
|
|
2
|
+
import { tabsInjectionKey as $ } from "./context.js";
|
|
3
|
+
import { getClassNameMixin as h } from "../../_utils/config.js";
|
|
4
|
+
const L = O({
|
|
5
5
|
name: "TabPane",
|
|
6
6
|
props: {
|
|
7
7
|
/**
|
|
@@ -40,34 +40,38 @@ const z = I({
|
|
|
40
40
|
* @en Tab title
|
|
41
41
|
* @slot title
|
|
42
42
|
*/
|
|
43
|
-
setup(
|
|
44
|
-
var
|
|
45
|
-
const { title:
|
|
43
|
+
setup(n, { slots: s }) {
|
|
44
|
+
var m, p;
|
|
45
|
+
const { title: b, disabled: I, closable: B } = j(n), e = k(), g = h("tabs"), t = K($, {}), H = y(), u = d(() => e == null ? void 0 : e.vnode.key), l = d(() => {
|
|
46
46
|
var o;
|
|
47
|
-
return
|
|
48
|
-
}), a =
|
|
49
|
-
key:
|
|
50
|
-
title:
|
|
51
|
-
disabled:
|
|
52
|
-
closable:
|
|
53
|
-
slots:
|
|
47
|
+
return u.value === ((o = t.activeKey) == null ? void 0 : o.value);
|
|
48
|
+
}), a = y((m = t.lazyLoad) != null && m.value ? l.value : !0), i = e == null ? void 0 : e.uid, r = d(() => `x-tabs-tab-${i}`), f = d(() => `x-tabs-panel-${i}`), c = N({
|
|
49
|
+
key: u,
|
|
50
|
+
title: b,
|
|
51
|
+
disabled: I,
|
|
52
|
+
closable: B,
|
|
53
|
+
slots: s,
|
|
54
|
+
tabId: r,
|
|
55
|
+
panelId: f
|
|
54
56
|
});
|
|
55
|
-
return e != null && e.uid && ((
|
|
57
|
+
return e != null && e.uid && ((p = t.addItem) == null || p.call(t, e.uid, c)), R(() => {
|
|
56
58
|
var o;
|
|
57
59
|
e != null && e.uid && ((o = t.removeItem) == null || o.call(t, e.uid));
|
|
58
|
-
}),
|
|
59
|
-
var
|
|
60
|
-
o ? a.value || (a.value = !0) : (
|
|
61
|
-
}),
|
|
62
|
-
|
|
60
|
+
}), U(l, (o) => {
|
|
61
|
+
var v;
|
|
62
|
+
o ? a.value || (a.value = !0) : (n.destroyOnHide || (v = t.destroyOnHide) != null && v.value) && (a.value = !1);
|
|
63
|
+
}), _(() => {
|
|
64
|
+
c.slots = { ...s };
|
|
63
65
|
}), {
|
|
64
|
-
className:
|
|
66
|
+
className: g,
|
|
65
67
|
active: l,
|
|
66
|
-
itemRef:
|
|
67
|
-
mounted: a
|
|
68
|
+
itemRef: H,
|
|
69
|
+
mounted: a,
|
|
70
|
+
tabId: r,
|
|
71
|
+
panelId: f
|
|
68
72
|
};
|
|
69
73
|
}
|
|
70
74
|
});
|
|
71
75
|
export {
|
|
72
|
-
|
|
76
|
+
L as default
|
|
73
77
|
};
|