x-next 1.3.1 → 1.5.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/constant.d.ts +1 -1
- package/dist/_utils/palette.d.ts +6 -14
- package/dist/components/alert/Alert.vue.d.ts +9 -9
- package/dist/components/alert/index.d.ts +6 -6
- package/dist/components/button/ButtonGroup.vue.d.ts +22 -18
- package/dist/components/date-picker/DatePanel.vue.d.ts +342 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts +343 -2
- package/dist/components/date-picker/index.d.ts +1765 -1083
- package/dist/components/dropdown/DropdownButton.vue.d.ts +2 -1
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/form-input-tag/index.d.ts +26 -25
- package/dist/components/form-input-tag/interface.d.ts +8 -0
- package/dist/components/link/Link.vue.d.ts +4 -4
- package/dist/components/link/index.d.ts +6 -6
- package/dist/components/message/index.d.ts +3 -3
- package/dist/components/message/message.vue.d.ts +1 -1
- package/dist/components/notification/Notification.d.ts +1 -1
- package/dist/components/notification/index.d.ts +3 -3
- package/dist/components/popconfirm/src/types.d.ts +1 -1
- package/dist/components/progress/Progress.vue.d.ts +3 -3
- package/dist/components/progress/index.d.ts +3 -3
- package/dist/components/steps/context.d.ts +9 -0
- package/dist/components/tabs/TabPane.vue.d.ts +2 -0
- package/dist/components/tabs/index.d.ts +6 -0
- package/dist/components/tabs/interface.d.ts +4 -0
- package/dist/components/tag/Tag.vue.d.ts +14 -0
- package/dist/components/tag/index.d.ts +9 -0
- package/dist/components/tag/interface.d.ts +5 -0
- package/dist/components/trend-chart/components/TrendChart.d.ts +127 -17
- package/dist/components/trend-chart/components/trend-chart-curve.d.ts +27 -7
- package/dist/components/trend-chart/components/trend-chart-labels.d.ts +4 -0
- package/dist/components/trend-chart/helpers/getPadding.d.ts +3 -2
- package/dist/components/trend-chart/index.d.ts +223 -28
- package/dist/components/trend-chart/props.d.ts +63 -5
- package/dist/es/_styles/palette-aliases.js +182 -127
- package/dist/es/_utils/palette.js +49 -43
- package/dist/es/components/_components/picker/input-range.vue2.js +10 -10
- package/dist/es/components/_components/picker/input.vue2.js +20 -20
- package/dist/es/components/_components/select-view/select-view.js +2 -2
- package/dist/es/components/alert/Alert.vue.js +2 -2
- package/dist/es/components/alert/Alert.vue2.js +21 -20
- package/dist/es/components/button/Button.js +17 -17
- package/dist/es/components/button/ButtonGroup.vue2.js +11 -9
- package/dist/es/components/date-picker/DatePanel.vue.js +71 -62
- package/dist/es/components/date-picker/DatePanel.vue2.js +50 -40
- package/dist/es/components/date-picker/DatePicker.vue2.js +1 -1
- 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/form/form-item-label.vue.js +25 -22
- package/dist/es/components/form/form-item-label.vue2.js +1 -1
- package/dist/es/components/form-checkbox/icon-check.js +12 -43
- package/dist/es/components/form-input/InputPassword.vue2.js +2 -2
- package/dist/es/components/form-input/InputSearch.js +1 -1
- package/dist/es/components/form-input-number/InputNumber.js +4 -4
- package/dist/es/components/form-input-tag/InputTag.js +168 -147
- package/dist/es/components/form-input-tag/utils.js +21 -19
- package/dist/es/components/form-textarea/Textarea.vue2.js +1 -1
- package/dist/es/components/link/Link.vue2.js +1 -1
- 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/pagination/Pagination.js +73 -70
- package/dist/es/components/popconfirm/src/popup.vue.js +1 -1
- package/dist/es/components/progress/Progress.vue2.js +1 -1
- 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 +1 -1
- package/dist/es/components/table/table-th.js +2 -2
- 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-button.js +2 -2
- package/dist/es/components/tabs/tabs-nav.js +21 -19
- package/dist/es/components/tabs/tabs-tab.vue.js +10 -8
- package/dist/es/components/tag/Tag.vue.js +20 -20
- package/dist/es/components/tag/Tag.vue2.js +35 -28
- package/dist/es/components/time-picker/TimePanel.vue.js +30 -29
- package/dist/es/components/time-picker/TimePicker.vue2.js +1 -1
- package/dist/es/components/time-picker/TimeRangePanel.js +26 -23
- package/dist/es/components/trend-chart/components/TrendChart.js +208 -142
- package/dist/es/components/trend-chart/components/trend-chart-curve.js +124 -59
- package/dist/es/components/trend-chart/components/trend-chart-labels.js +43 -41
- package/dist/es/components/trend-chart/helpers/getPadding.js +3 -3
- package/dist/es/components/trend-chart/props.js +101 -33
- package/dist/es/components/trend-chart/themes.js +15 -15
- package/dist/es/components/watermark/controller.js +40 -40
- package/dist/es/icons/default/calendar.js +15 -0
- package/dist/es/icons/default/clock-circle.js +15 -0
- package/dist/es/icons/default/double-left.js +15 -0
- package/dist/es/icons/default/double-right.js +15 -0
- package/dist/es/icons/default/down.js +16 -0
- package/dist/es/icons/default/eye-invisible.js +20 -0
- package/dist/es/icons/default/eye.js +18 -0
- package/dist/es/icons/default/left.js +15 -0
- package/dist/es/icons/default/minus.js +16 -0
- package/dist/es/icons/default/plus.js +16 -0
- package/dist/es/icons/default/question-circle.js +18 -0
- package/dist/es/icons/default/right.js +15 -0
- package/dist/es/icons/default/search.js +16 -0
- package/dist/es/icons/default/up.js +16 -0
- package/dist/es/icons/icon.js +26 -25
- package/dist/es/icons/public/boxicons/basic.js +1893 -0
- package/dist/es/icons/public/boxicons/brands.js +304 -0
- package/dist/es/icons/public/boxicons/filled.js +1893 -0
- package/dist/es/icons/public/boxicons/index.js +24 -0
- package/dist/es/icons/public/boxicons/names.js +4082 -0
- package/dist/es/icons/registry.js +15 -15
- package/dist/es/locale/en-US.js +2 -1
- package/dist/es/locale/zh-CN.js +2 -1
- package/dist/es/style.css +1 -1
- package/dist/icons/default/calendar.d.ts +93 -0
- package/dist/icons/default/clock-circle.d.ts +93 -0
- package/dist/icons/{_self/down.d.ts → default/double-left.d.ts} +6 -0
- package/dist/icons/{_self/eye-invisible.d.ts → default/double-right.d.ts} +6 -0
- package/dist/icons/default/down.d.ts +93 -0
- package/dist/icons/default/eye-invisible.d.ts +93 -0
- package/dist/icons/default/eye.d.ts +93 -0
- package/dist/icons/{_self/eye.d.ts → default/left.d.ts} +7 -0
- package/dist/icons/default/minus.d.ts +93 -0
- package/dist/icons/{_self → default}/plus.d.ts +7 -0
- package/dist/icons/default/question-circle.d.ts +93 -0
- package/dist/icons/{_self/minus.d.ts → default/right.d.ts} +7 -0
- package/dist/icons/{_self → default}/search.d.ts +7 -0
- package/dist/icons/{_self → default}/up.d.ts +7 -0
- package/dist/icons/public/boxicons/basic.cjs +1 -0
- package/dist/icons/public/boxicons/basic.d.ts +2 -0
- package/dist/icons/public/boxicons/brands.cjs +1 -0
- package/dist/icons/public/boxicons/brands.d.ts +2 -0
- package/dist/icons/public/boxicons/filled.cjs +1 -0
- package/dist/icons/public/boxicons/filled.d.ts +2 -0
- package/dist/icons/public/boxicons/index.cjs +1 -0
- package/dist/icons/public/boxicons/index.d.ts +10 -0
- package/dist/icons/public/boxicons/names.d.ts +10 -0
- package/dist/icons/registry.d.ts +5 -0
- package/dist/index.cjs +4 -4
- package/dist/index.umd.js +4 -4
- package/dist/locale/interface.d.ts +2 -0
- package/dist/style/alert.css +1 -1
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/date-picker.css +1 -1
- package/dist/style/dialog.css +1 -1
- package/dist/style/drawer.css +1 -1
- package/dist/style/dropdown.css +1 -1
- package/dist/style/form-input-number.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-select.css +1 -1
- package/dist/style/form-textarea.css +1 -1
- package/dist/style/form.css +1 -1
- package/dist/style/link.css +1 -1
- package/dist/style/menu.css +1 -1
- package/dist/style/message-box.css +1 -1
- package/dist/style/network.css +1 -1
- package/dist/style/pagination.css +1 -1
- package/dist/style/popconfirm.css +1 -1
- package/dist/style/popover.css +1 -1
- package/dist/style/popup.css +1 -1
- package/dist/style/progress.css +1 -1
- package/dist/style/rate.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/tag.css +1 -1
- package/dist/style/time-picker.css +1 -1
- package/dist/style/time-range-selector.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +31 -4
- package/dist/es/icons/_self/down.js +0 -16
- package/dist/es/icons/_self/eye-invisible.js +0 -13
- package/dist/es/icons/_self/eye.js +0 -13
- package/dist/es/icons/_self/minus.js +0 -13
- package/dist/es/icons/_self/plus.js +0 -12
- package/dist/es/icons/_self/question-message.js +0 -12
- package/dist/es/icons/_self/search.js +0 -13
- package/dist/es/icons/_self/up.js +0 -16
- package/dist/es/icons/_ui/calendar.js +0 -13
- package/dist/es/icons/_ui/time.js +0 -12
|
@@ -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
|
};
|
|
@@ -5,7 +5,7 @@ import { getGroupColumns as Gl, mapArrayWithChildren as Ul, mapRawTableData as Y
|
|
|
5
5
|
import { useRowSelection as Jl } from "./hooks/use-row-selection.js";
|
|
6
6
|
import { useExpand as Ql } from "./hooks/use-expand.js";
|
|
7
7
|
import { usePagination as Xl } from "./hooks/use-pagination.js";
|
|
8
|
-
import Zl from "../../icons/
|
|
8
|
+
import Zl from "../../icons/default/plus.js";
|
|
9
9
|
import ea from "../../icons/default/minus-circle-fill.js";
|
|
10
10
|
import { Spin as ta } from "../spin/index.js";
|
|
11
11
|
import { Pagination as la } from "../pagination/index.js";
|
|
@@ -3,8 +3,8 @@ import { Checkbox as ne } from "../form-checkbox/index.js";
|
|
|
3
3
|
import { Radio as oe } from "../form-radio/index.js";
|
|
4
4
|
import { Button as N } from "../button/index.js";
|
|
5
5
|
import { Trigger as ie } from "../trigger/index.js";
|
|
6
|
-
import re from "../../icons/
|
|
7
|
-
import ue from "../../icons/
|
|
6
|
+
import re from "../../icons/default/down.js";
|
|
7
|
+
import ue from "../../icons/default/up.js";
|
|
8
8
|
import ae from "../../icons/default/filter.js";
|
|
9
9
|
import { useColumnSorter as ce } from "./hooks/use-column-sorter.js";
|
|
10
10
|
import { useColumnFilter as me } from "./hooks/use-column-filter.js";
|
|
@@ -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
|
};
|
|
@@ -2,8 +2,8 @@ import { defineComponent as d, computed as u, createVNode as n, isVNode as f } f
|
|
|
2
2
|
import m from "../_components/icon-hover/index.vue.js";
|
|
3
3
|
import s from "../../icons/_self/left.js";
|
|
4
4
|
import b from "../../icons/_self/right.js";
|
|
5
|
-
import y from "../../icons/
|
|
6
|
-
import v from "../../icons/
|
|
5
|
+
import y from "../../icons/default/up.js";
|
|
6
|
+
import v from "../../icons/default/down.js";
|
|
7
7
|
import { getClassNameMixin as x } from "../../_utils/config.js";
|
|
8
8
|
import { useLocale as h } from "../../locale/index.js";
|
|
9
9
|
function g(t) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as ae, toRefs as le, ref as
|
|
1
|
+
import { defineComponent as ae, toRefs as le, ref as b, computed as h, watch as H, nextTick as I, onMounted as ie, createVNode as r } from "vue";
|
|
2
2
|
import { getTabListStyle as ne, updateScrollOffset as oe } from "./utils.js";
|
|
3
3
|
import re from "./tabs-tab.vue.js";
|
|
4
4
|
import W from "./tabs-button.js";
|
|
5
5
|
import ue from "./tabs-nav-ink.vue.js";
|
|
6
6
|
import se from "../_components/icon-hover/index.vue.js";
|
|
7
|
-
import de from "../../icons/
|
|
7
|
+
import de from "../../icons/default/plus.js";
|
|
8
8
|
import O from "../../_container/resize-observer.js";
|
|
9
9
|
import { isUndefined as P, isNumber as fe } from "../../_utils/is.js";
|
|
10
10
|
import { getClassNameMixin as ce } from "../../_utils/config.js";
|
|
@@ -56,7 +56,9 @@ const Re = /* @__PURE__ */ ae({
|
|
|
56
56
|
default: !0
|
|
57
57
|
},
|
|
58
58
|
scrollPosition: {
|
|
59
|
-
|
|
59
|
+
/* ScrollPosition 含 number(滚动到指定像素),只声明 String 会让
|
|
60
|
+
`:scroll-position="200"` 触发 prop 类型校验告警 */
|
|
61
|
+
type: [String, Number],
|
|
60
62
|
default: "auto"
|
|
61
63
|
}
|
|
62
64
|
},
|
|
@@ -73,10 +75,10 @@ const Re = /* @__PURE__ */ ae({
|
|
|
73
75
|
scrollPosition: s
|
|
74
76
|
} = le(a), u = ce("tabs--nav"), {
|
|
75
77
|
t: q
|
|
76
|
-
} = ve(), n =
|
|
78
|
+
} = ve(), n = b(), m = b(), g = b({}), y = h(() => {
|
|
77
79
|
if (!P(S.value))
|
|
78
80
|
return g.value[S.value];
|
|
79
|
-
}), C =
|
|
81
|
+
}), C = b(), L = h(() => a.editable && ["line", "card", "card-gutter"].includes(a.type)), d = b(!1), B = b(0), k = b(0), o = b(0), M = () => {
|
|
80
82
|
var e, t;
|
|
81
83
|
return (T.value === "vertical" ? (e = n.value) == null ? void 0 : e.offsetHeight : (t = n.value) == null ? void 0 : t.offsetWidth) ?? 0;
|
|
82
84
|
}, D = () => !m.value || !n.value ? 0 : T.value === "vertical" ? m.value.offsetHeight - n.value.offsetHeight : m.value.offsetWidth - n.value.offsetWidth, w = () => {
|
|
@@ -84,9 +86,9 @@ const Re = /* @__PURE__ */ ae({
|
|
|
84
86
|
}, K = () => n.value && m.value ? a.direction === "vertical" ? m.value.offsetHeight > n.value.offsetHeight : m.value.offsetWidth > n.value.offsetWidth : !1, f = (e) => {
|
|
85
87
|
(!n.value || !m.value || e < 0) && (e = 0), o.value = Math.min(e, k.value);
|
|
86
88
|
}, E = () => {
|
|
87
|
-
if (!
|
|
89
|
+
if (!y.value || !n.value || !d.value) return;
|
|
88
90
|
oe(n.value, T.value);
|
|
89
|
-
const e = T.value === "horizontal", t = e ? "offsetLeft" : "offsetTop", c = e ? "offsetWidth" : "offsetHeight", l =
|
|
91
|
+
const e = T.value === "horizontal", t = e ? "offsetLeft" : "offsetTop", c = e ? "offsetWidth" : "offsetHeight", l = y.value[t], i = y.value[c], v = n.value[c], ee = window.getComputedStyle(y.value), te = e ? s.value === "end" ? "marginRight" : "marginLeft" : s.value === "end" ? "marginBottom" : "marginTop", x = parseFloat(ee[te]) || 0;
|
|
90
92
|
s.value === "auto" ? l < o.value ? f(l - x) : l + i > o.value + v && f(l + i - v + x) : s.value === "center" ? f(l + (i - v + x) / 2) : s.value === "start" ? f(l - x) : s.value === "end" ? f(l + i - v + x) : fe(s.value) && f(l - s.value);
|
|
91
93
|
}, U = (e) => {
|
|
92
94
|
if (!d.value) return;
|
|
@@ -99,7 +101,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
99
101
|
}, j = (e, t) => {
|
|
100
102
|
z("click", e, t);
|
|
101
103
|
}, F = () => a.tabs.filter((e) => !e.disabled), V = (e) => {
|
|
102
|
-
|
|
104
|
+
I(() => {
|
|
103
105
|
var t;
|
|
104
106
|
(t = g.value[e]) == null || t.focus();
|
|
105
107
|
});
|
|
@@ -115,27 +117,27 @@ const Re = /* @__PURE__ */ ae({
|
|
|
115
117
|
}
|
|
116
118
|
}, Y = (e, t) => {
|
|
117
119
|
z("delete", e, t);
|
|
118
|
-
},
|
|
120
|
+
}, N = (e) => {
|
|
119
121
|
const t = e === "previous" ? o.value - B.value : o.value + B.value;
|
|
120
122
|
f(t);
|
|
121
123
|
}, G = () => {
|
|
122
124
|
w(), C.value && C.value.$forceUpdate();
|
|
123
125
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
H($, () => {
|
|
127
|
+
I(() => {
|
|
126
128
|
const e = new Set(a.tabs.map((t) => String(t.key)));
|
|
127
129
|
Object.keys(g.value).forEach((t) => {
|
|
128
130
|
e.has(t) || delete g.value[t];
|
|
129
131
|
}), w();
|
|
130
132
|
});
|
|
131
|
-
}),
|
|
133
|
+
}), H([p, s], () => {
|
|
132
134
|
setTimeout(() => {
|
|
133
135
|
E();
|
|
134
136
|
}, 0);
|
|
135
137
|
}), ie(() => {
|
|
136
138
|
w();
|
|
137
139
|
});
|
|
138
|
-
const
|
|
140
|
+
const A = () => !L.value || !a.showAddButton ? null : r(se, {
|
|
139
141
|
as: "button",
|
|
140
142
|
"aria-label": q("tabs.add"),
|
|
141
143
|
class: u.element("add-btn"),
|
|
@@ -162,7 +164,7 @@ const Re = /* @__PURE__ */ ae({
|
|
|
162
164
|
type: "previous",
|
|
163
165
|
direction: a.direction,
|
|
164
166
|
disabled: o.value <= 0,
|
|
165
|
-
onClick:
|
|
167
|
+
onClick: N
|
|
166
168
|
}, null), r(O, {
|
|
167
169
|
onResize: () => w()
|
|
168
170
|
}, {
|
|
@@ -192,22 +194,22 @@ const Re = /* @__PURE__ */ ae({
|
|
|
192
194
|
var l, i;
|
|
193
195
|
return [((i = (l = t.slots).title) == null ? void 0 : i.call(l)) ?? t.title];
|
|
194
196
|
}
|
|
195
|
-
})), a.type === "line" &&
|
|
197
|
+
})), a.type === "line" && y.value && r(ue, {
|
|
196
198
|
ref: C,
|
|
197
|
-
activeTabRef:
|
|
199
|
+
activeTabRef: y.value,
|
|
198
200
|
direction: a.direction,
|
|
199
201
|
disabled: !1,
|
|
200
202
|
animation: a.animation
|
|
201
203
|
}, null)])]
|
|
202
|
-
}), !d.value &&
|
|
204
|
+
}), !d.value && A()])]
|
|
203
205
|
}), d.value && r(W, {
|
|
204
206
|
type: "next",
|
|
205
207
|
direction: a.direction,
|
|
206
208
|
disabled: o.value >= k.value,
|
|
207
|
-
onClick:
|
|
209
|
+
onClick: N
|
|
208
210
|
}, null), r("div", {
|
|
209
211
|
class: u.element("extra")
|
|
210
|
-
}, [d.value &&
|
|
212
|
+
}, [d.value && A(), (e = R.extra) == null ? void 0 : e.call(R)])]);
|
|
211
213
|
};
|
|
212
214
|
}
|
|
213
215
|
});
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as a, openBlock as o, createElementBlock as
|
|
1
|
+
import i from "./tabs-tab.vue2.js";
|
|
2
|
+
import { resolveComponent as a, openBlock as o, createElementBlock as n, mergeProps as r, createElementVNode as d, normalizeClass as t, renderSlot as c, createBlock as b, withModifiers as m, withCtx as p, createVNode as f, createCommentVNode as u } from "vue";
|
|
3
3
|
import v from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const h = ["tabindex", "aria-selected", "aria-disabled"];
|
|
4
|
+
const h = ["id", "tabindex", "aria-selected", "aria-disabled", "aria-controls"];
|
|
5
5
|
function k(e, C, N, $, B, V) {
|
|
6
|
-
const
|
|
7
|
-
return o(),
|
|
6
|
+
const l = a("icon-close"), s = a("icon-hover");
|
|
7
|
+
return o(), n("div", r({
|
|
8
8
|
role: "tab",
|
|
9
|
+
id: e.tab.tabId,
|
|
9
10
|
tabindex: e.active && !e.tab.disabled ? 0 : -1,
|
|
10
11
|
"aria-selected": e.active,
|
|
11
12
|
"aria-disabled": e.tab.disabled || void 0,
|
|
13
|
+
"aria-controls": e.tab.panelId,
|
|
12
14
|
class: e.cls
|
|
13
15
|
}, e.eventHandlers), [
|
|
14
16
|
d("span", {
|
|
@@ -16,7 +18,7 @@ function k(e, C, N, $, B, V) {
|
|
|
16
18
|
}, [
|
|
17
19
|
c(e.$slots, "default")
|
|
18
20
|
], 2),
|
|
19
|
-
e.editable && e.tab.closable ? (o(), b(
|
|
21
|
+
e.editable && e.tab.closable ? (o(), b(s, {
|
|
20
22
|
key: 0,
|
|
21
23
|
as: "button",
|
|
22
24
|
"aria-label": e.t("tabs.close", { title: String(e.tab.title ?? e.tab.key) }),
|
|
@@ -24,13 +26,13 @@ function k(e, C, N, $, B, V) {
|
|
|
24
26
|
onClick: m(e.handleDelete, ["stop"])
|
|
25
27
|
}, {
|
|
26
28
|
default: p(() => [
|
|
27
|
-
f(
|
|
29
|
+
f(l)
|
|
28
30
|
]),
|
|
29
31
|
_: 1
|
|
30
32
|
}, 8, ["aria-label", "class", "onClick"])) : u("", !0)
|
|
31
33
|
], 16, h);
|
|
32
34
|
}
|
|
33
|
-
const E = /* @__PURE__ */ v(
|
|
35
|
+
const E = /* @__PURE__ */ v(i, [["render", k]]);
|
|
34
36
|
export {
|
|
35
37
|
E as default
|
|
36
38
|
};
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import k from "./Tag.vue2.js";
|
|
2
|
-
import { resolveComponent as t, openBlock as o, createElementBlock as
|
|
2
|
+
import { resolveComponent as t, openBlock as o, createElementBlock as s, normalizeStyle as f, normalizeClass as l, renderSlot as a, createCommentVNode as n, createBlock as u, withModifiers as C, withCtx as g, createVNode as r } from "vue";
|
|
3
3
|
import y from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
function $(e, i, h, N,
|
|
4
|
+
function $(e, i, b, h, N, v) {
|
|
5
5
|
const m = t("close"), c = t("icon-hover"), p = t("animation-loading");
|
|
6
|
-
return e.computedVisible ? (o(),
|
|
6
|
+
return e.computedVisible ? (o(), s("span", {
|
|
7
7
|
key: 0,
|
|
8
|
-
class:
|
|
8
|
+
class: l(e.cls),
|
|
9
9
|
style: f(e.style),
|
|
10
10
|
onClick: i[0] || (i[0] = (...d) => e.handleClick && e.handleClick(...d))
|
|
11
11
|
}, [
|
|
12
|
-
e.$slots.icon ? (o(),
|
|
12
|
+
e.$slots.icon ? (o(), s("span", {
|
|
13
13
|
key: 0,
|
|
14
|
-
class:
|
|
14
|
+
class: l(e.className.element("icon"))
|
|
15
15
|
}, [
|
|
16
|
-
|
|
17
|
-
], 2)) :
|
|
18
|
-
e.nowrap ? (o(),
|
|
16
|
+
a(e.$slots, "icon")
|
|
17
|
+
], 2)) : n("", !0),
|
|
18
|
+
e.nowrap ? (o(), s("span", {
|
|
19
19
|
key: 1,
|
|
20
|
-
class:
|
|
20
|
+
class: l(e.className.element("text"))
|
|
21
21
|
}, [
|
|
22
|
-
|
|
23
|
-
], 2)) :
|
|
22
|
+
a(e.$slots, "default")
|
|
23
|
+
], 2)) : a(e.$slots, "default", { key: 2 }),
|
|
24
24
|
e.closable ? (o(), u(c, {
|
|
25
25
|
key: 3,
|
|
26
26
|
as: "button",
|
|
27
|
-
"aria-label": e.t("common.closeTarget", { target: e.t("common.tag") }),
|
|
27
|
+
"aria-label": e.closeAriaLabel ?? e.t("common.closeTarget", { target: e.t("common.tag") }),
|
|
28
28
|
prefix: "tag",
|
|
29
|
-
class:
|
|
29
|
+
class: l(e.className.element("close-icon")),
|
|
30
30
|
onClick: C(e.handleClose, ["stop"])
|
|
31
31
|
}, {
|
|
32
32
|
default: g(() => [
|
|
33
|
-
|
|
33
|
+
a(e.$slots, "close-icon", {}, () => [
|
|
34
34
|
r(m)
|
|
35
35
|
])
|
|
36
36
|
]),
|
|
37
37
|
_: 3
|
|
38
|
-
}, 8, ["aria-label", "class", "onClick"])) :
|
|
39
|
-
e.loading ? (o(),
|
|
38
|
+
}, 8, ["aria-label", "class", "onClick"])) : n("", !0),
|
|
39
|
+
e.loading ? (o(), s("span", {
|
|
40
40
|
key: 4,
|
|
41
|
-
class:
|
|
41
|
+
class: l(e.className.element("loading-icon"))
|
|
42
42
|
}, [
|
|
43
43
|
r(p)
|
|
44
|
-
], 2)) :
|
|
45
|
-
], 6)) :
|
|
44
|
+
], 2)) : n("", !0)
|
|
45
|
+
], 6)) : n("", !0);
|
|
46
46
|
}
|
|
47
47
|
const z = /* @__PURE__ */ y(k, [["render", $]]);
|
|
48
48
|
export {
|