x-next 1.14.0 → 1.16.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/catalog.md +4 -2
- package/AI_USAGE/components/alert-api.md +1 -1
- package/AI_USAGE/components/alert.md +1 -1
- package/AI_USAGE/components/bar-chart-api.md +1 -1
- package/AI_USAGE/components/bar-chart.md +1 -1
- package/AI_USAGE/components/boxicons.md +1 -1
- package/AI_USAGE/components/button-api.md +1 -1
- package/AI_USAGE/components/button.md +1 -1
- package/AI_USAGE/components/charts.md +1 -1
- package/AI_USAGE/components/checkbox-api.md +1 -1
- package/AI_USAGE/components/checkbox.md +1 -1
- package/AI_USAGE/components/color-picker-api.md +1 -1
- package/AI_USAGE/components/color-picker.md +1 -1
- package/AI_USAGE/components/config-provider-api.md +1 -1
- package/AI_USAGE/components/config-provider.md +1 -1
- package/AI_USAGE/components/date-picker-api.md +1 -1
- package/AI_USAGE/components/date-picker.md +1 -1
- package/AI_USAGE/components/dialog-api.md +1 -1
- package/AI_USAGE/components/dialog.md +1 -1
- package/AI_USAGE/components/draggable-api.md +1 -1
- package/AI_USAGE/components/draggable.md +1 -1
- package/AI_USAGE/components/drawer-api.md +1 -1
- package/AI_USAGE/components/drawer.md +30 -1
- package/AI_USAGE/components/dropdown-api.md +1 -1
- package/AI_USAGE/components/dropdown.md +1 -1
- package/AI_USAGE/components/empty-api.md +1 -1
- package/AI_USAGE/components/empty.md +1 -1
- package/AI_USAGE/components/finicon.md +1 -1
- package/AI_USAGE/components/form-api.md +1 -1
- package/AI_USAGE/components/form.md +1 -1
- package/AI_USAGE/components/grid-api.md +1 -1
- package/AI_USAGE/components/grid.md +1 -1
- package/AI_USAGE/components/heatmap-api.md +1 -1
- package/AI_USAGE/components/heatmap.md +1 -1
- package/AI_USAGE/components/icon-api.md +1 -1
- package/AI_USAGE/components/icon.md +1 -1
- package/AI_USAGE/components/image-api.md +1 -1
- package/AI_USAGE/components/image.md +1 -1
- package/AI_USAGE/components/input-api.md +1 -1
- package/AI_USAGE/components/input-number-api.md +1 -1
- package/AI_USAGE/components/input-number.md +1 -1
- package/AI_USAGE/components/input-tag-api.md +1 -1
- package/AI_USAGE/components/input-tag.md +1 -1
- package/AI_USAGE/components/input.md +1 -1
- package/AI_USAGE/components/layout-api.md +1 -1
- package/AI_USAGE/components/layout.md +1 -1
- package/AI_USAGE/components/line-chart-api.md +3 -3
- package/AI_USAGE/components/line-chart.md +28 -1
- package/AI_USAGE/components/link-api.md +1 -1
- package/AI_USAGE/components/link.md +1 -1
- package/AI_USAGE/components/menu-api.md +1 -1
- package/AI_USAGE/components/menu.md +1 -1
- package/AI_USAGE/components/message-api.md +1 -1
- package/AI_USAGE/components/message-box-api.md +1 -1
- package/AI_USAGE/components/message-box.md +1 -1
- package/AI_USAGE/components/message.md +1 -1
- package/AI_USAGE/components/network-api.md +1 -1
- package/AI_USAGE/components/network.md +1 -1
- package/AI_USAGE/components/notification-api.md +1 -1
- package/AI_USAGE/components/notification.md +1 -1
- package/AI_USAGE/components/pagination-api.md +1 -1
- package/AI_USAGE/components/pagination.md +1 -1
- package/AI_USAGE/components/pie-chart-api.md +1 -1
- package/AI_USAGE/components/pie-chart.md +1 -1
- package/AI_USAGE/components/popconfirm-api.md +1 -1
- package/AI_USAGE/components/popconfirm.md +1 -1
- package/AI_USAGE/components/popover-api.md +1 -1
- package/AI_USAGE/components/popover.md +1 -1
- package/AI_USAGE/components/popup-api.md +1 -1
- package/AI_USAGE/components/popup.md +1 -1
- package/AI_USAGE/components/progress-api.md +1 -1
- package/AI_USAGE/components/progress.md +1 -1
- package/AI_USAGE/components/radio-api.md +1 -1
- package/AI_USAGE/components/radio.md +1 -1
- package/AI_USAGE/components/rate-api.md +1 -1
- package/AI_USAGE/components/rate.md +1 -1
- package/AI_USAGE/components/resize-box-api.md +1 -1
- package/AI_USAGE/components/resize-box.md +1 -1
- package/AI_USAGE/components/scrollbar-api.md +1 -1
- package/AI_USAGE/components/scrollbar.md +1 -1
- package/AI_USAGE/components/select-api.md +1 -1
- package/AI_USAGE/components/select.md +1 -1
- package/AI_USAGE/components/skeleton-api.md +1 -1
- package/AI_USAGE/components/skeleton.md +1 -1
- package/AI_USAGE/components/slider-api.md +1 -1
- package/AI_USAGE/components/slider.md +1 -1
- package/AI_USAGE/components/space-api.md +1 -1
- package/AI_USAGE/components/space.md +1 -1
- package/AI_USAGE/components/spin-api.md +1 -1
- package/AI_USAGE/components/spin.md +1 -1
- package/AI_USAGE/components/steps-api.md +1 -1
- package/AI_USAGE/components/steps.md +1 -1
- package/AI_USAGE/components/switch-api.md +1 -1
- package/AI_USAGE/components/switch.md +1 -1
- package/AI_USAGE/components/table-api.md +1 -1
- package/AI_USAGE/components/table.md +44 -1
- package/AI_USAGE/components/tabs-api.md +1 -1
- package/AI_USAGE/components/tabs.md +1 -1
- package/AI_USAGE/components/tag-api.md +1 -1
- package/AI_USAGE/components/tag.md +1 -1
- package/AI_USAGE/components/textarea-api.md +1 -1
- package/AI_USAGE/components/textarea.md +1 -1
- package/AI_USAGE/components/time-picker-api.md +1 -1
- package/AI_USAGE/components/time-picker.md +1 -1
- package/AI_USAGE/components/time-range-selector-api.md +1 -1
- package/AI_USAGE/components/time-range-selector.md +1 -1
- package/AI_USAGE/components/timeline-api.md +1 -1
- package/AI_USAGE/components/timeline.md +1 -1
- package/AI_USAGE/components/tooltip-api.md +1 -1
- package/AI_USAGE/components/tooltip.md +1 -1
- package/AI_USAGE/components/tree-select-api.md +498 -0
- package/AI_USAGE/components/tree-select.md +744 -0
- package/AI_USAGE/components/trend-chart-api.md +1 -1
- package/AI_USAGE/components/trend-chart.md +1 -1
- package/AI_USAGE/components/trigger-api.md +1 -1
- package/AI_USAGE/components/trigger.md +1 -1
- package/AI_USAGE/components/upload-api.md +1 -1
- package/AI_USAGE/components/upload.md +1 -1
- package/AI_USAGE/components/watermark-api.md +1 -1
- package/AI_USAGE/components/watermark.md +1 -1
- package/AI_USAGE/core.md +1 -1
- package/AI_USAGE/index.md +3 -2
- package/AI_USAGE/recipes/form-on-demand.md +1 -1
- package/AI_USAGE.md +1326 -5
- package/CHANGELOG.md +32 -0
- package/dist/_props/css.d.ts +2 -1
- package/dist/components/_components/input-label/input-label.d.ts +3 -0
- package/dist/components/bar-chart/BarChart.d.ts +1 -1
- package/dist/components/bar-chart/index.d.ts +3 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/components/line-chart/LineChart.d.ts +1 -1
- package/dist/components/line-chart/index.d.ts +3 -3
- package/dist/components/line-chart/interface.d.ts +2 -2
- package/dist/components/tree-select/TreeNode.vue.d.ts +478 -0
- package/dist/components/tree-select/TreeSelect.d.ts +1549 -0
- package/dist/components/tree-select/TreeSelectDropdown.vue.d.ts +569 -0
- package/dist/components/tree-select/hooks/use-tree-select.d.ts +92 -0
- package/dist/components/tree-select/index.d.ts +3321 -0
- package/dist/components/tree-select/interface.d.ts +203 -0
- package/dist/components/tree-select/utils.d.ts +64 -0
- package/dist/es/_styles/palette-aliases.js +3 -0
- package/dist/es/components/_components/feedback-icon/index.vue2.js +10 -10
- package/dist/es/components/_components/input-label/input-label.js +69 -65
- package/dist/es/components/_components/select-view/select-view.js +1 -0
- package/dist/es/components/button/Button.js +9 -9
- package/dist/es/components/drawer/src/Drawer.vue.js +26 -26
- package/dist/es/components/form-switch/Switch.vue2.js +18 -18
- package/dist/es/components/image/Image.vue2.js +13 -13
- package/dist/es/components/image/ImagePreview.vue2.js +33 -33
- package/dist/es/components/index.js +55 -52
- package/dist/es/components/link/Link.vue2.js +12 -12
- package/dist/es/components/message/message.vue2.js +13 -13
- package/dist/es/components/spin/Spin.js +28 -28
- package/dist/es/components/tag/Tag.vue2.js +22 -22
- package/dist/es/components/timeline/src/Timeline.js +7 -7
- package/dist/es/components/tree-select/TreeNode.vue.js +91 -0
- package/dist/es/components/tree-select/TreeNode.vue2.js +162 -0
- package/dist/es/components/tree-select/TreeSelect.js +865 -0
- package/dist/es/components/tree-select/TreeSelectDropdown.vue.js +57 -0
- package/dist/es/components/tree-select/TreeSelectDropdown.vue2.js +79 -0
- package/dist/es/components/tree-select/hooks/use-tree-select.js +376 -0
- package/dist/es/components/tree-select/index.js +13 -0
- package/dist/es/components/tree-select/utils.js +181 -0
- package/dist/es/icons/animation/animation-loading.js +2 -2
- package/dist/es/index.js +71 -68
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/style/base.css +1 -1
- package/dist/style/dependencies.json +10 -0
- package/dist/style/drawer.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style/tree-select.css +1 -0
- package/dist/style/tree-select.js +8 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +2 -1
- package/volar.d.ts +2 -0
|
@@ -3,9 +3,9 @@ import { Button as p, ButtonGroup as m } from "./button/index.js";
|
|
|
3
3
|
import { ConfigProvider as x } from "./config-provider/index.js";
|
|
4
4
|
import { Dialog as n } from "./dialog/index.js";
|
|
5
5
|
import { Drawer as u } from "./drawer/index.js";
|
|
6
|
-
import { Dropdown as c, DropdownButton as d, DropdownGroup as T, DropdownOption as
|
|
6
|
+
import { Dropdown as c, DropdownButton as d, DropdownGroup as T, DropdownOption as S, DropdownSubmenu as P } from "./dropdown/index.js";
|
|
7
7
|
import { Empty as I } from "./empty/index.js";
|
|
8
|
-
import { DatePicker as
|
|
8
|
+
import { DatePicker as w, MonthPicker as L, QuarterPicker as b, RangePicker as s, WeekPicker as C, YearPicker as h } from "./date-picker/index.js";
|
|
9
9
|
import { Form as y, FormItem as G } from "./form/index.js";
|
|
10
10
|
import { Checkbox as B, CheckboxGroup as M } from "./form-checkbox/index.js";
|
|
11
11
|
import { Input as A, InputGroup as E, InputPassword as _, InputSearch as N } from "./form-input/index.js";
|
|
@@ -21,8 +21,8 @@ import { BarChart as mo } from "./bar-chart/index.js";
|
|
|
21
21
|
import { Draggable as xo } from "./draggable/index.js";
|
|
22
22
|
import { Col as no, Grid as io, GridItem as uo, Row as lo } from "./grid/index.js";
|
|
23
23
|
import { Heatmap as To } from "./heatmap/index.js";
|
|
24
|
-
import { Image as
|
|
25
|
-
import { Layout as
|
|
24
|
+
import { Image as Po, ImagePreview as go, ImagePreviewAction as Io, ImagePreviewGroup as ko } from "./image/index.js";
|
|
25
|
+
import { Layout as Lo, LayoutContent as bo, LayoutFooter as so, LayoutHeader as Co, LayoutSidebar as ho } from "./layout/index.js";
|
|
26
26
|
import { LineChart as yo } from "./line-chart/index.js";
|
|
27
27
|
import { Link as vo } from "./link/index.js";
|
|
28
28
|
import { Menu as Mo, MenuItem as Ro, MenuItemGroup as Ao, MenuSubMenu as Eo } from "./menu/index.js";
|
|
@@ -41,29 +41,30 @@ import { Scrollbar as mr } from "./scrollbar-v2/index.js";
|
|
|
41
41
|
import { Skeleton as xr, SkeletonLine as ar, SkeletonShape as nr } from "./skeleton/index.js";
|
|
42
42
|
import { Space as ur } from "./space/index.js";
|
|
43
43
|
import { Spin as cr } from "./spin/index.js";
|
|
44
|
-
import { Step as Tr, Steps as
|
|
44
|
+
import { Step as Tr, Steps as Sr } from "./steps/index.js";
|
|
45
45
|
import { Table as gr, TableColumn as Ir } from "./table/index.js";
|
|
46
|
-
import { TabPane as
|
|
47
|
-
import { Tag as
|
|
46
|
+
import { TabPane as wr, Tabs as Lr } from "./tabs/index.js";
|
|
47
|
+
import { Tag as sr } from "./tag/index.js";
|
|
48
48
|
import { TimePicker as hr } from "./time-picker/index.js";
|
|
49
49
|
import { TimeRangeSelector as yr } from "./time-range-selector/index.js";
|
|
50
50
|
import { Timeline as vr } from "./timeline/index.js";
|
|
51
51
|
import { TimelineItem as Mr } from "./timeline-item/index.js";
|
|
52
52
|
import { Tooltip as Ar } from "./tooltip/index.js";
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import { default as
|
|
60
|
-
import { default as
|
|
61
|
-
import { default as
|
|
62
|
-
import { default as
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
53
|
+
import { TreeSelect as _r, TreeSelectDropdown as Nr } from "./tree-select/index.js";
|
|
54
|
+
import { TrendChart as jr } from "./trend-chart/index.js";
|
|
55
|
+
import { Trigger as Hr } from "./trigger/index.js";
|
|
56
|
+
import { Upload as Wr } from "./upload/index.js";
|
|
57
|
+
import { Watermark as zr } from "./watermark/index.js";
|
|
58
|
+
import { TABLE_LOCALE_EN_US as Yr, TABLE_LOCALE_ZH_CN as Zr, formatLocaleText as qr } from "./table/locale.js";
|
|
59
|
+
import { default as Vr } from "./table/table-tbody.js";
|
|
60
|
+
import { default as $r } from "./table/table-td.js";
|
|
61
|
+
import { default as re } from "./table/table-th.js";
|
|
62
|
+
import { default as te } from "./table/table-thead.js";
|
|
63
|
+
import { default as me } from "./table/table-tr.js";
|
|
64
|
+
import { configProviderInjectionKey as xe } from "./config-provider/context.js";
|
|
65
|
+
import { formInjectionKey as ne, formItemInjectionKey as ie } from "./form/context.js";
|
|
66
|
+
import { vDraggable as le } from "./draggable/directive.js";
|
|
67
|
+
import { vWatermark as de } from "./watermark/directive.js";
|
|
67
68
|
export {
|
|
68
69
|
e as Alert,
|
|
69
70
|
mo as BarChart,
|
|
@@ -74,22 +75,22 @@ export {
|
|
|
74
75
|
no as Col,
|
|
75
76
|
to as ColorPicker,
|
|
76
77
|
x as ConfigProvider,
|
|
77
|
-
|
|
78
|
+
w as DatePicker,
|
|
78
79
|
n as Dialog,
|
|
79
80
|
xo as Draggable,
|
|
80
81
|
u as Drawer,
|
|
81
82
|
c as Dropdown,
|
|
82
83
|
d as DropdownButton,
|
|
83
84
|
T as DropdownGroup,
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
S as DropdownOption,
|
|
86
|
+
P as DropdownSubmenu,
|
|
86
87
|
I as Empty,
|
|
87
88
|
y as Form,
|
|
88
89
|
G as FormItem,
|
|
89
90
|
io as Grid,
|
|
90
91
|
uo as GridItem,
|
|
91
92
|
To as Heatmap,
|
|
92
|
-
|
|
93
|
+
Po as Image,
|
|
93
94
|
go as ImagePreview,
|
|
94
95
|
Io as ImagePreviewAction,
|
|
95
96
|
ko as ImagePreviewGroup,
|
|
@@ -99,9 +100,9 @@ export {
|
|
|
99
100
|
_ as InputPassword,
|
|
100
101
|
N as InputSearch,
|
|
101
102
|
H as InputTag,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
Lo as Layout,
|
|
104
|
+
bo as LayoutContent,
|
|
105
|
+
so as LayoutFooter,
|
|
105
106
|
Co as LayoutHeader,
|
|
106
107
|
ho as LayoutSidebar,
|
|
107
108
|
yo as LineChart,
|
|
@@ -111,7 +112,7 @@ export {
|
|
|
111
112
|
Ao as MenuItemGroup,
|
|
112
113
|
Eo as MenuSubMenu,
|
|
113
114
|
No as Message,
|
|
114
|
-
|
|
115
|
+
L as MonthPicker,
|
|
115
116
|
jo as Network,
|
|
116
117
|
Ho as Notification,
|
|
117
118
|
Wo as Pagination,
|
|
@@ -120,10 +121,10 @@ export {
|
|
|
120
121
|
qo as Popover,
|
|
121
122
|
Vo as Popup,
|
|
122
123
|
$o as Progress,
|
|
123
|
-
|
|
124
|
+
b as QuarterPicker,
|
|
124
125
|
W as Radio,
|
|
125
126
|
U as RadioGroup,
|
|
126
|
-
|
|
127
|
+
s as RangePicker,
|
|
127
128
|
rr as Rate,
|
|
128
129
|
tr as ResizeBox,
|
|
129
130
|
lo as Row,
|
|
@@ -139,36 +140,38 @@ export {
|
|
|
139
140
|
ur as Space,
|
|
140
141
|
cr as Spin,
|
|
141
142
|
Tr as Step,
|
|
142
|
-
|
|
143
|
+
Sr as Steps,
|
|
143
144
|
$ as Switch,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
Yr as TABLE_LOCALE_EN_US,
|
|
146
|
+
Zr as TABLE_LOCALE_ZH_CN,
|
|
147
|
+
wr as TabPane,
|
|
147
148
|
gr as Table,
|
|
148
149
|
Ir as TableColumn,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
Lr as Tabs,
|
|
151
|
+
sr as Tag,
|
|
152
|
+
Vr as Tbody,
|
|
153
|
+
$r as Td,
|
|
153
154
|
ro as Textarea,
|
|
154
|
-
|
|
155
|
-
|
|
155
|
+
re as Th,
|
|
156
|
+
te as Thead,
|
|
156
157
|
hr as TimePicker,
|
|
157
158
|
yr as TimeRangeSelector,
|
|
158
159
|
vr as Timeline,
|
|
159
160
|
Mr as TimelineItem,
|
|
160
161
|
Ar as Tooltip,
|
|
161
|
-
|
|
162
|
-
_r as
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
162
|
+
me as Tr,
|
|
163
|
+
_r as TreeSelect,
|
|
164
|
+
Nr as TreeSelectDropdown,
|
|
165
|
+
jr as TrendChart,
|
|
166
|
+
Hr as Trigger,
|
|
167
|
+
Wr as Upload,
|
|
168
|
+
zr as Watermark,
|
|
166
169
|
C as WeekPicker,
|
|
167
170
|
h as YearPicker,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
xe as configProviderInjectionKey,
|
|
172
|
+
ne as formInjectionKey,
|
|
173
|
+
ie as formItemInjectionKey,
|
|
174
|
+
qr as formatLocaleText,
|
|
175
|
+
le as vDraggable,
|
|
176
|
+
de as vWatermark
|
|
174
177
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as v, computed as t } from "vue";
|
|
2
|
+
import g from "../../icons/default/link.js";
|
|
3
3
|
import h from "../../icons/animation/animation-loading.js";
|
|
4
4
|
import { hasPropOrSlot as b } from "../../_utils/use-prop-or-slot.js";
|
|
5
5
|
import { getClassNameMixin as k } from "../../_utils/config.js";
|
|
6
|
-
const
|
|
6
|
+
const D = v({
|
|
7
7
|
name: "Link",
|
|
8
|
-
components: { IconLink:
|
|
8
|
+
components: { IconLink: g, IconLoading: h },
|
|
9
9
|
props: {
|
|
10
10
|
/**
|
|
11
11
|
* @zh 链接地址
|
|
@@ -61,18 +61,18 @@ const C = g({
|
|
|
61
61
|
*/
|
|
62
62
|
click: (e) => !0
|
|
63
63
|
},
|
|
64
|
-
setup(e, { slots:
|
|
65
|
-
const o = k("link"), r = b(e,
|
|
66
|
-
if (
|
|
64
|
+
setup(e, { slots: c, emit: l }) {
|
|
65
|
+
const o = k("link"), r = b(e, c, "icon"), i = t(() => e.disabled || e.loading), d = t(() => i.value ? void 0 : e.href), a = t(() => !e.href), s = t(() => a.value ? "button" : void 0), u = t(() => i.value ? -1 : a.value ? 0 : void 0), f = (n) => {
|
|
66
|
+
if (i.value) {
|
|
67
67
|
n.preventDefault();
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
l("click", n);
|
|
71
71
|
}, m = (n) => {
|
|
72
|
-
a.value && (n.key !== "Enter" && n.key !== " " || (n.preventDefault(), !
|
|
72
|
+
a.value && (n.key !== "Enter" && n.key !== " " || (n.preventDefault(), !i.value && l("click", n)));
|
|
73
73
|
};
|
|
74
74
|
return {
|
|
75
|
-
cls:
|
|
75
|
+
cls: t(() => [
|
|
76
76
|
o.block,
|
|
77
77
|
o.modifier(`status-${e.status}`),
|
|
78
78
|
{
|
|
@@ -84,8 +84,8 @@ const C = g({
|
|
|
84
84
|
}
|
|
85
85
|
]),
|
|
86
86
|
className: o,
|
|
87
|
-
isUnavailable:
|
|
88
|
-
mergedHref:
|
|
87
|
+
isUnavailable: i,
|
|
88
|
+
mergedHref: d,
|
|
89
89
|
role: s,
|
|
90
90
|
showIcon: r,
|
|
91
91
|
tabIndex: u,
|
|
@@ -95,5 +95,5 @@ const C = g({
|
|
|
95
95
|
}
|
|
96
96
|
});
|
|
97
97
|
export {
|
|
98
|
-
|
|
98
|
+
D as default
|
|
99
99
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as v, computed as t, ref as b, onMounted as
|
|
1
|
+
import { defineComponent as v, computed as t, ref as b, onMounted as I, onUpdated as M, onUnmounted as B } from "vue";
|
|
2
2
|
import { getComponentPrefix as p, getClassNameMixin as w } from "../../_utils/config.js";
|
|
3
3
|
import F from "../_components/icon-hover/index.vue.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import L from "../../icons/default/close-circle-fill.js";
|
|
5
|
+
import N from "../../icons/default/close.js";
|
|
6
|
+
import x from "../../icons/default/check-circle-fill.js";
|
|
7
7
|
import O from "../../icons/default/exclamation-circle-fill.js";
|
|
8
8
|
import H from "../../icons/default/info-circle-fill.js";
|
|
9
9
|
import S from "../../icons/default/minus-circle-fill.js";
|
|
@@ -13,9 +13,9 @@ const J = v({
|
|
|
13
13
|
name: p("Message"),
|
|
14
14
|
components: {
|
|
15
15
|
IconHover: F,
|
|
16
|
-
Close:
|
|
17
|
-
CloseCircleFill:
|
|
18
|
-
CheckCircleFill:
|
|
16
|
+
Close: N,
|
|
17
|
+
CloseCircleFill: L,
|
|
18
|
+
CheckCircleFill: x,
|
|
19
19
|
ExclamationCircleFill: O,
|
|
20
20
|
InfoCircleFill: H,
|
|
21
21
|
MinusCircleFill: S,
|
|
@@ -98,11 +98,11 @@ const J = v({
|
|
|
98
98
|
c();
|
|
99
99
|
}, e.duration));
|
|
100
100
|
};
|
|
101
|
-
|
|
101
|
+
I(() => {
|
|
102
102
|
i.value = !0, s();
|
|
103
|
-
}),
|
|
103
|
+
}), M(() => {
|
|
104
104
|
e.resetOnUpdate && s();
|
|
105
|
-
}),
|
|
105
|
+
}), B(() => {
|
|
106
106
|
l();
|
|
107
107
|
});
|
|
108
108
|
const f = t(() => ({
|
|
@@ -116,7 +116,7 @@ const J = v({
|
|
|
116
116
|
e.resetOnHover && s();
|
|
117
117
|
}, y = t(
|
|
118
118
|
() => e.showIcon && (e.type !== "normal" || !!e.icon)
|
|
119
|
-
), r = t(() => e.icon),
|
|
119
|
+
), r = t(() => e.icon), g = t(() => !!r.value), h = t(
|
|
120
120
|
() => u("message.closeLabel", { id: e.id ? ` ${e.id}` : "" })
|
|
121
121
|
);
|
|
122
122
|
return {
|
|
@@ -126,14 +126,14 @@ const J = v({
|
|
|
126
126
|
visible: i,
|
|
127
127
|
hasIcon: y,
|
|
128
128
|
iconRender: r,
|
|
129
|
-
hasCustomIcon:
|
|
129
|
+
hasCustomIcon: g,
|
|
130
130
|
handleClose: c,
|
|
131
131
|
handleMouseEnter: d,
|
|
132
132
|
handleMouseLeave: C,
|
|
133
133
|
handleCloseMouseDown: (a) => {
|
|
134
134
|
a.preventDefault();
|
|
135
135
|
},
|
|
136
|
-
closeLabel:
|
|
136
|
+
closeLabel: h
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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 T, cloneVNode as H } from "vue";
|
|
2
2
|
import O from "../../icons/animation/animation-loading.js";
|
|
3
3
|
import _ from "./dot-loading.js";
|
|
4
4
|
import { getFirstComponent as q } from "../../_utils/vue-eco.js";
|
|
@@ -83,17 +83,17 @@ const j = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-
|
|
|
83
83
|
* @slot tip
|
|
84
84
|
*/
|
|
85
85
|
setup(e, {
|
|
86
|
-
attrs:
|
|
87
|
-
slots:
|
|
86
|
+
attrs: k,
|
|
87
|
+
slots: i
|
|
88
88
|
}) {
|
|
89
89
|
const a = P("spin"), {
|
|
90
|
-
t:
|
|
91
|
-
} = $(), o = s(() => !!
|
|
90
|
+
t: z
|
|
91
|
+
} = $(), o = s(() => !!i.default), u = S(!1);
|
|
92
92
|
let c;
|
|
93
93
|
const v = () => {
|
|
94
94
|
c !== void 0 && (clearTimeout(c), c = void 0);
|
|
95
95
|
};
|
|
96
|
-
x(() => [e.loading, e.delay, o.value], ([t,
|
|
96
|
+
x(() => [e.loading, e.delay, o.value], ([t, n, d]) => {
|
|
97
97
|
if (v(), !d) {
|
|
98
98
|
u.value = !0;
|
|
99
99
|
return;
|
|
@@ -102,33 +102,33 @@ const j = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-
|
|
|
102
102
|
u.value = !1;
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
|
-
if (u.value || !
|
|
105
|
+
if (u.value || !n || !Number.isFinite(n) || n <= 0) {
|
|
106
106
|
u.value = !0;
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
c = setTimeout(() => {
|
|
110
110
|
u.value = !0, c = void 0;
|
|
111
|
-
},
|
|
111
|
+
}, n);
|
|
112
112
|
}, {
|
|
113
113
|
immediate: !0
|
|
114
114
|
}), B(v);
|
|
115
|
-
const l = s(() => e.loading && u.value),
|
|
115
|
+
const l = s(() => e.loading && u.value), A = s(() => [a.block, e.display === "inline" ? a.modifier("inline") : a.modifier("block"), {
|
|
116
116
|
[a.modifier("loading")]: l.value,
|
|
117
|
-
[a.modifier("with-tip")]: e.tip && !
|
|
117
|
+
[a.modifier("with-tip")]: e.tip && !i.default,
|
|
118
118
|
/*
|
|
119
119
|
* 扫光只作用于提示文字。tip 是 prop 时 with-tip 才成立;
|
|
120
120
|
* 自定义 tip 插槽的内容结构未知,不加扫光,避免破坏使用方自己的样式。
|
|
121
121
|
*/
|
|
122
122
|
[a.modifier("tip-shimmer")]: e.tipShimmer && !!e.tip
|
|
123
123
|
}]), C = () => {
|
|
124
|
-
if (
|
|
125
|
-
const t = q(
|
|
124
|
+
if (i.icon) {
|
|
125
|
+
const t = q(i.icon());
|
|
126
126
|
if (t)
|
|
127
127
|
return H(t, {
|
|
128
128
|
spin: !0
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
return
|
|
131
|
+
return i.element ? i.element() : e.dot ? r(_, {
|
|
132
132
|
size: e.size,
|
|
133
133
|
type: e.dot === "color" ? "color" : "default"
|
|
134
134
|
}, null) : r(O, {
|
|
@@ -138,21 +138,21 @@ const j = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-
|
|
|
138
138
|
var d;
|
|
139
139
|
const t = e.size ? {
|
|
140
140
|
fontSize: `${e.size}px`
|
|
141
|
-
} : void 0,
|
|
142
|
-
return r(
|
|
141
|
+
} : void 0, n = !!(i.tip ?? e.tip);
|
|
142
|
+
return r(T, null, [!e.hideIcon && r("div", {
|
|
143
143
|
class: a.element("icon"),
|
|
144
144
|
style: t
|
|
145
|
-
}, [C()]),
|
|
145
|
+
}, [C()]), n && r("div", {
|
|
146
146
|
class: a.element("tip")
|
|
147
|
-
}, [((d =
|
|
147
|
+
}, [((d = i.tip) == null ? void 0 : d.call(i)) ?? e.tip])]);
|
|
148
148
|
}, m = typeof HTMLElement < "u" && "inert" in HTMLElement.prototype, y = S(), f = /* @__PURE__ */ new Map(), b = () => {
|
|
149
149
|
const t = y.value;
|
|
150
|
-
t && t.querySelectorAll(j).forEach((
|
|
151
|
-
f.has(
|
|
150
|
+
t && t.querySelectorAll(j).forEach((n) => {
|
|
151
|
+
f.has(n) || (f.set(n, n.getAttribute("tabindex")), n.setAttribute("tabindex", "-1"));
|
|
152
152
|
});
|
|
153
153
|
}, h = () => {
|
|
154
|
-
f.forEach((t,
|
|
155
|
-
t === null ?
|
|
154
|
+
f.forEach((t, n) => {
|
|
155
|
+
t === null ? n.removeAttribute("tabindex") : n.setAttribute("tabindex", t);
|
|
156
156
|
}), f.clear();
|
|
157
157
|
}, g = (t) => {
|
|
158
158
|
m || (t ? b() : h());
|
|
@@ -167,26 +167,26 @@ const j = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-
|
|
|
167
167
|
var L;
|
|
168
168
|
const {
|
|
169
169
|
class: t,
|
|
170
|
-
style:
|
|
170
|
+
style: n,
|
|
171
171
|
role: d,
|
|
172
172
|
"aria-live": E,
|
|
173
173
|
"aria-busy": N,
|
|
174
174
|
"aria-label": F,
|
|
175
175
|
...I
|
|
176
|
-
} =
|
|
176
|
+
} = k, M = !!(i.tip ?? e.tip), w = o.value ? l.value : !0;
|
|
177
177
|
return r("div", V(I, {
|
|
178
|
-
class: [
|
|
179
|
-
style:
|
|
178
|
+
class: [A.value, t],
|
|
179
|
+
style: n,
|
|
180
180
|
role: d ?? (o.value ? void 0 : "status"),
|
|
181
181
|
"aria-live": E ?? (o.value && !l.value ? void 0 : "polite"),
|
|
182
182
|
"aria-busy": N ?? (o.value ? l.value : !0),
|
|
183
|
-
"aria-label": F ?? (w && !M ?
|
|
184
|
-
}), [o.value ? r(
|
|
183
|
+
"aria-label": F ?? (w && !M ? z("common.loading") : void 0)
|
|
184
|
+
}), [o.value ? r(T, null, [r("div", {
|
|
185
185
|
ref: y,
|
|
186
186
|
class: a.element("children"),
|
|
187
187
|
"aria-hidden": l.value ? "true" : void 0,
|
|
188
188
|
inert: l.value ? "" : void 0
|
|
189
|
-
}, [(L =
|
|
189
|
+
}, [(L = i.default) == null ? void 0 : L.call(i)]), l.value && r("div", {
|
|
190
190
|
class: a.element("mask")
|
|
191
191
|
}, [r("div", {
|
|
192
192
|
class: a.element("mask--icon")
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as g, toRefs as B, computed as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { defineComponent as g, toRefs as B, computed as l, ref as r } from "vue";
|
|
2
|
+
import L from "../_components/icon-hover/index.vue.js";
|
|
3
|
+
import _ from "../../icons/animation/animation-loading.js";
|
|
4
|
+
import I from "../../icons/default/close.js";
|
|
5
5
|
import { TAG_COLORS as f } from "./interface.js";
|
|
6
|
-
import { getClassNameMixin as
|
|
7
|
-
import { useLocale as
|
|
6
|
+
import { getClassNameMixin as S } from "../../_utils/config.js";
|
|
7
|
+
import { useLocale as z } from "../../locale/index.js";
|
|
8
8
|
const T = g({
|
|
9
9
|
name: "Tag",
|
|
10
10
|
components: {
|
|
11
|
-
IconHover:
|
|
12
|
-
Close:
|
|
13
|
-
AnimationLoading:
|
|
11
|
+
IconHover: L,
|
|
12
|
+
Close: I,
|
|
13
|
+
AnimationLoading: _
|
|
14
14
|
},
|
|
15
15
|
props: {
|
|
16
16
|
/**
|
|
@@ -143,7 +143,7 @@ const T = g({
|
|
|
143
143
|
* @slot close-icon
|
|
144
144
|
*/
|
|
145
145
|
setup(e, { emit: t }) {
|
|
146
|
-
const { size: m } = B(e),
|
|
146
|
+
const { size: m } = B(e), o = S("tag"), { t: v } = z(), b = l(() => e.color && f.includes(e.color)), d = l(() => e.color && !f.includes(e.color)), n = r(e.defaultVisible), u = r(e.defaultChecked), s = l(() => e.visible ?? n.value), a = l(
|
|
147
147
|
() => e.selectable ? e.checked ?? u.value : !0
|
|
148
148
|
), h = (c) => {
|
|
149
149
|
n.value = !1, t("update:visible", !1), t("close", c);
|
|
@@ -152,26 +152,26 @@ const T = g({
|
|
|
152
152
|
const i = !a.value;
|
|
153
153
|
u.value = i, t("update:checked", i), t("check", i, c);
|
|
154
154
|
}
|
|
155
|
-
}, C =
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
}, C = l(() => [
|
|
156
|
+
o.block,
|
|
157
|
+
o.modifier(`size-${m.value}`),
|
|
158
158
|
{
|
|
159
|
-
[
|
|
160
|
-
[
|
|
161
|
-
[
|
|
162
|
-
[
|
|
163
|
-
[
|
|
164
|
-
[
|
|
165
|
-
[
|
|
159
|
+
[o.modifier("loading")]: e.loading,
|
|
160
|
+
[o.modifier("hide")]: !s.value,
|
|
161
|
+
[o.modifier(`color-${e == null ? void 0 : e.color}`)]: b.value,
|
|
162
|
+
[o.modifier("bordered")]: e.bordered,
|
|
163
|
+
[o.modifier("selectable")]: e.selectable,
|
|
164
|
+
[o.modifier("checked")]: a.value,
|
|
165
|
+
[o.modifier("custom-color")]: d.value
|
|
166
166
|
}
|
|
167
|
-
]), y =
|
|
167
|
+
]), y = l(() => {
|
|
168
168
|
if (d.value && a.value)
|
|
169
169
|
return {
|
|
170
170
|
backgroundColor: e.color
|
|
171
171
|
};
|
|
172
172
|
});
|
|
173
173
|
return {
|
|
174
|
-
className:
|
|
174
|
+
className: o,
|
|
175
175
|
cls: C,
|
|
176
176
|
style: y,
|
|
177
177
|
computedVisible: s,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as b, computed as f, toRefs as A, ref as I, provide as R, createVNode as l } from "vue";
|
|
2
2
|
import N from "./TimelineItem.js";
|
|
3
3
|
import { timelineProps as x } from "./props.js";
|
|
4
4
|
import { timelineInjectionKey as k } from "./context.js";
|
|
5
5
|
import { getClassNameMixin as L } from "../../../_utils/config.js";
|
|
6
6
|
import _ from "../../../icons/animation/animation-loading.js";
|
|
7
|
-
const j = "TimelineItem", q = /* @__PURE__ */
|
|
7
|
+
const j = "TimelineItem", q = /* @__PURE__ */ b({
|
|
8
8
|
name: "Timeline",
|
|
9
9
|
components: {},
|
|
10
10
|
props: x,
|
|
@@ -17,7 +17,7 @@ const j = "TimelineItem", q = /* @__PURE__ */ P({
|
|
|
17
17
|
direction: g,
|
|
18
18
|
mode: h,
|
|
19
19
|
labelPosition: y
|
|
20
|
-
} =
|
|
20
|
+
} = A(o), c = I(0), a = f(() => !!o.pending), v = () => l("span", {
|
|
21
21
|
class: r.element("pending-dot")
|
|
22
22
|
}, [l(_, null, null)]), T = () => a.value ? l(N, {
|
|
23
23
|
lineType: "dashed",
|
|
@@ -39,10 +39,10 @@ const j = "TimelineItem", q = /* @__PURE__ */ P({
|
|
|
39
39
|
return n.forEach((i) => {
|
|
40
40
|
Array.isArray(i.children) ? e += m(i.children) : e += 1;
|
|
41
41
|
}), e;
|
|
42
|
-
},
|
|
42
|
+
}, C = (n) => {
|
|
43
43
|
const e = T(), i = e ? [...d(n), e] : d(n);
|
|
44
44
|
return c.value = m(i), i;
|
|
45
|
-
},
|
|
45
|
+
}, P = {
|
|
46
46
|
reverse: p,
|
|
47
47
|
parentCls: r.block,
|
|
48
48
|
count: c,
|
|
@@ -51,12 +51,12 @@ const j = "TimelineItem", q = /* @__PURE__ */ P({
|
|
|
51
51
|
mode: h,
|
|
52
52
|
labelPosition: y
|
|
53
53
|
};
|
|
54
|
-
return
|
|
54
|
+
return R(k, P), () => {
|
|
55
55
|
var n;
|
|
56
56
|
return l("div", {
|
|
57
57
|
role: "list",
|
|
58
58
|
class: u.value
|
|
59
|
-
}, [
|
|
59
|
+
}, [C((n = t.default) == null ? void 0 : n.call(t))]);
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
});
|