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
|
@@ -4,159 +4,163 @@ 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
6
|
import { Dropdown as c, DropdownButton as d, DropdownGroup as T, DropdownOption as S, DropdownSubmenu as g } from "./dropdown/index.js";
|
|
7
|
-
import { Empty as
|
|
8
|
-
import { DatePicker as b, MonthPicker as s, QuarterPicker as w, RangePicker as L, WeekPicker as
|
|
7
|
+
import { Empty as I } from "./empty/index.js";
|
|
8
|
+
import { DatePicker as b, MonthPicker as s, QuarterPicker as w, RangePicker as L, WeekPicker as C, YearPicker as D } from "./date-picker/index.js";
|
|
9
9
|
import { Form as G, FormItem as h } from "./form/index.js";
|
|
10
10
|
import { Checkbox as M, CheckboxGroup as R } from "./form-checkbox/index.js";
|
|
11
11
|
import { Input as B, InputGroup as E, InputPassword as _, InputSearch as N } from "./form-input/index.js";
|
|
12
12
|
import { InputNumber as j } from "./form-input-number/index.js";
|
|
13
|
-
import { InputTag as
|
|
14
|
-
import { Radio as
|
|
13
|
+
import { InputTag as H } from "./form-input-tag/index.js";
|
|
14
|
+
import { Radio as W, RadioGroup as z } from "./form-radio/index.js";
|
|
15
15
|
import { Select as U, SelectDropdown as Y, SelectOption as Z, SelectOptionGroup as q } from "./form-select/index.js";
|
|
16
16
|
import { Slider as V } from "./form-slider/index.js";
|
|
17
17
|
import { Switch as $ } from "./form-switch/index.js";
|
|
18
18
|
import { Textarea as ro } from "./form-textarea/index.js";
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import { default as Fr } from "./table/table-
|
|
55
|
-
import { default as
|
|
56
|
-
import { default as zr } from "./table/table-
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
19
|
+
import { ColorPicker as to } from "./color-picker/index.js";
|
|
20
|
+
import { Draggable as mo } from "./draggable/index.js";
|
|
21
|
+
import { Col as xo, Grid as ao, GridItem as no, Row as io } from "./grid/index.js";
|
|
22
|
+
import { Heatmap as lo } from "./heatmap/index.js";
|
|
23
|
+
import { Image as To, ImagePreview as So, ImagePreviewAction as go, ImagePreviewGroup as Po } from "./image/index.js";
|
|
24
|
+
import { Layout as ko, LayoutContent as bo, LayoutFooter as so, LayoutHeader as wo, LayoutSidebar as Lo } from "./layout/index.js";
|
|
25
|
+
import { Link as Do } from "./link/index.js";
|
|
26
|
+
import { Menu as Go, MenuItem as ho, MenuItemGroup as vo, MenuSubMenu as Mo } from "./menu/index.js";
|
|
27
|
+
import { Message as Ao } from "./message/index.js";
|
|
28
|
+
import { Network as Eo } from "./network/index.js";
|
|
29
|
+
import { Notification as No } from "./notification/index.js";
|
|
30
|
+
import { Pagination as jo } from "./pagination/index.js";
|
|
31
|
+
import { Popconfirm as Ho } from "./popconfirm/index.js";
|
|
32
|
+
import { Popover as Wo } from "./popover/index.js";
|
|
33
|
+
import { Popup as Qo } from "./popup/index.js";
|
|
34
|
+
import { Progress as Yo } from "./progress/index.js";
|
|
35
|
+
import { Rate as qo } from "./rate/index.js";
|
|
36
|
+
import { ResizeBox as Vo } from "./resize-box/index.js";
|
|
37
|
+
import { Scrollbar as $o } from "./scrollbar-v2/index.js";
|
|
38
|
+
import { Skeleton as rr, SkeletonLine as er, SkeletonShape as tr } from "./skeleton/index.js";
|
|
39
|
+
import { Space as mr } from "./space/index.js";
|
|
40
|
+
import { Spin as xr } from "./spin/index.js";
|
|
41
|
+
import { Step as nr, Steps as ir } from "./steps/index.js";
|
|
42
|
+
import { Table as lr, TableColumn as cr } from "./table/index.js";
|
|
43
|
+
import { TabPane as Tr, Tabs as Sr } from "./tabs/index.js";
|
|
44
|
+
import { Tag as Pr } from "./tag/index.js";
|
|
45
|
+
import { TimePicker as kr } from "./time-picker/index.js";
|
|
46
|
+
import { TimeRangeSelector as sr } from "./time-range-selector/index.js";
|
|
47
|
+
import { Timeline as Lr } from "./timeline/index.js";
|
|
48
|
+
import { TimelineItem as Dr } from "./timeline-item/index.js";
|
|
49
|
+
import { Tooltip as Gr } from "./tooltip/index.js";
|
|
50
|
+
import { TrendChart as vr } from "./trend-chart/index.js";
|
|
51
|
+
import { Trigger as Rr } from "./trigger/index.js";
|
|
52
|
+
import { Watermark as Br } from "./watermark/index.js";
|
|
53
|
+
import { TABLE_LOCALE_EN_US as _r, TABLE_LOCALE_ZH_CN as Nr, formatLocaleText as Or } from "./table/locale.js";
|
|
54
|
+
import { default as Fr } from "./table/table-tbody.js";
|
|
55
|
+
import { default as Kr } from "./table/table-td.js";
|
|
56
|
+
import { default as zr } from "./table/table-th.js";
|
|
57
|
+
import { default as Ur } from "./table/table-thead.js";
|
|
58
|
+
import { default as Zr } from "./table/table-tr.js";
|
|
59
|
+
import { configProviderInjectionKey as Jr } from "./config-provider/context.js";
|
|
60
|
+
import { formInjectionKey as Xr, formItemInjectionKey as $r } from "./form/context.js";
|
|
61
|
+
import { vDraggable as re } from "./draggable/directive.js";
|
|
62
|
+
import { vWatermark as te } from "./watermark/directive.js";
|
|
61
63
|
export {
|
|
62
64
|
e as Alert,
|
|
63
65
|
p as Button,
|
|
64
66
|
m as ButtonGroup,
|
|
65
67
|
M as Checkbox,
|
|
66
68
|
R as CheckboxGroup,
|
|
67
|
-
|
|
69
|
+
xo as Col,
|
|
70
|
+
to as ColorPicker,
|
|
68
71
|
x as ConfigProvider,
|
|
69
72
|
b as DatePicker,
|
|
70
73
|
n as Dialog,
|
|
71
|
-
|
|
74
|
+
mo as Draggable,
|
|
72
75
|
u as Drawer,
|
|
73
76
|
c as Dropdown,
|
|
74
77
|
d as DropdownButton,
|
|
75
78
|
T as DropdownGroup,
|
|
76
79
|
S as DropdownOption,
|
|
77
80
|
g as DropdownSubmenu,
|
|
78
|
-
|
|
81
|
+
I as Empty,
|
|
79
82
|
G as Form,
|
|
80
83
|
h as FormItem,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
ao as Grid,
|
|
85
|
+
no as GridItem,
|
|
86
|
+
lo as Heatmap,
|
|
87
|
+
To as Image,
|
|
88
|
+
So as ImagePreview,
|
|
89
|
+
go as ImagePreviewAction,
|
|
90
|
+
Po as ImagePreviewGroup,
|
|
87
91
|
B as Input,
|
|
88
92
|
E as InputGroup,
|
|
89
93
|
j as InputNumber,
|
|
90
94
|
_ as InputPassword,
|
|
91
95
|
N as InputSearch,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
H as InputTag,
|
|
97
|
+
ko as Layout,
|
|
98
|
+
bo as LayoutContent,
|
|
99
|
+
so as LayoutFooter,
|
|
100
|
+
wo as LayoutHeader,
|
|
101
|
+
Lo as LayoutSidebar,
|
|
102
|
+
Do as Link,
|
|
103
|
+
Go as Menu,
|
|
104
|
+
ho as MenuItem,
|
|
105
|
+
vo as MenuItemGroup,
|
|
106
|
+
Mo as MenuSubMenu,
|
|
107
|
+
Ao as Message,
|
|
104
108
|
s as MonthPicker,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
Eo as Network,
|
|
110
|
+
No as Notification,
|
|
111
|
+
jo as Pagination,
|
|
112
|
+
Ho as Popconfirm,
|
|
113
|
+
Wo as Popover,
|
|
114
|
+
Qo as Popup,
|
|
115
|
+
Yo as Progress,
|
|
112
116
|
w as QuarterPicker,
|
|
113
|
-
|
|
117
|
+
W as Radio,
|
|
114
118
|
z as RadioGroup,
|
|
115
119
|
L as RangePicker,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
qo as Rate,
|
|
121
|
+
Vo as ResizeBox,
|
|
122
|
+
io as Row,
|
|
123
|
+
$o as Scrollbar,
|
|
120
124
|
U as Select,
|
|
121
125
|
Y as SelectDropdown,
|
|
122
126
|
Z as SelectOption,
|
|
123
127
|
q as SelectOptionGroup,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
128
|
+
rr as Skeleton,
|
|
129
|
+
er as SkeletonLine,
|
|
130
|
+
tr as SkeletonShape,
|
|
127
131
|
V as Slider,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
mr as Space,
|
|
133
|
+
xr as Spin,
|
|
134
|
+
nr as Step,
|
|
135
|
+
ir as Steps,
|
|
132
136
|
$ as Switch,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
_r as TABLE_LOCALE_EN_US,
|
|
138
|
+
Nr as TABLE_LOCALE_ZH_CN,
|
|
139
|
+
Tr as TabPane,
|
|
140
|
+
lr as Table,
|
|
141
|
+
cr as TableColumn,
|
|
142
|
+
Sr as Tabs,
|
|
143
|
+
Pr as Tag,
|
|
144
|
+
Fr as Tbody,
|
|
145
|
+
Kr as Td,
|
|
142
146
|
ro as Textarea,
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
147
|
+
zr as Th,
|
|
148
|
+
Ur as Thead,
|
|
149
|
+
kr as TimePicker,
|
|
150
|
+
sr as TimeRangeSelector,
|
|
151
|
+
Lr as Timeline,
|
|
152
|
+
Dr as TimelineItem,
|
|
153
|
+
Gr as Tooltip,
|
|
154
|
+
Zr as Tr,
|
|
155
|
+
vr as TrendChart,
|
|
156
|
+
Rr as Trigger,
|
|
157
|
+
Br as Watermark,
|
|
158
|
+
C as WeekPicker,
|
|
159
|
+
D as YearPicker,
|
|
160
|
+
Jr as configProviderInjectionKey,
|
|
161
|
+
Xr as formInjectionKey,
|
|
162
|
+
$r as formItemInjectionKey,
|
|
163
|
+
Or as formatLocaleText,
|
|
164
|
+
re as vDraggable,
|
|
165
|
+
te as vWatermark
|
|
162
166
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as h, createVNode as s, mergeProps as y, toRefs as x, computed as a, provide as C, toRef as b } from "vue";
|
|
2
2
|
import g from "./sub-menu-inline.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
3
|
+
import I from "./sub-menu-pop.vue.js";
|
|
4
|
+
import v from "./hooks/use-menu.js";
|
|
5
|
+
import k from "./hooks/use-level.js";
|
|
6
|
+
import K from "../../icons/_self/menu/down.js";
|
|
7
|
+
import _ from "../../icons/_self/dropdown/more.js";
|
|
8
|
+
import D from "./hooks/use-menu-context.js";
|
|
9
|
+
import P from "./hooks/use-menu-data-collector.js";
|
|
10
|
+
import { DataCollectorInjectionKey as w } from "./context.js";
|
|
11
|
+
const R = {
|
|
11
12
|
/**
|
|
12
13
|
* @zh 子菜单的标题
|
|
13
14
|
* @en The title of the submenu
|
|
@@ -51,9 +52,9 @@ const w = {
|
|
|
51
52
|
_internalSkipCollect: {
|
|
52
53
|
type: Boolean
|
|
53
54
|
}
|
|
54
|
-
},
|
|
55
|
+
}, q = /* @__PURE__ */ h({
|
|
55
56
|
name: "SubMenu",
|
|
56
|
-
props:
|
|
57
|
+
props: R,
|
|
57
58
|
slots: Object,
|
|
58
59
|
/**
|
|
59
60
|
* @zh 菜单的图标
|
|
@@ -81,47 +82,60 @@ const w = {
|
|
|
81
82
|
}) {
|
|
82
83
|
const {
|
|
83
84
|
key: n
|
|
84
|
-
} =
|
|
85
|
+
} = v(), {
|
|
85
86
|
level: d
|
|
86
|
-
} =
|
|
87
|
+
} = k(), {
|
|
87
88
|
popup: o
|
|
88
|
-
} =
|
|
89
|
+
} = x(e), t = D(), i = a(() => {
|
|
89
90
|
const {
|
|
90
|
-
mode:
|
|
91
|
-
collapsed:
|
|
91
|
+
mode: p,
|
|
92
|
+
collapsed: c,
|
|
92
93
|
inTrigger: m
|
|
93
94
|
} = t;
|
|
94
|
-
return !!(typeof o.value == "function" ? o.value(d.value) : o.value) ||
|
|
95
|
+
return !!(typeof o.value == "function" ? o.value(d.value) : o.value) || c || m || p !== "vertical";
|
|
95
96
|
}), {
|
|
96
97
|
subMenuKeys: l,
|
|
97
98
|
menuItemKeys: f
|
|
98
99
|
} = e._internalSkipCollect ? {
|
|
99
100
|
subMenuKeys: a(() => []),
|
|
100
101
|
menuItemKeys: a(() => [])
|
|
101
|
-
} :
|
|
102
|
+
} : P({
|
|
102
103
|
key: n.value,
|
|
103
104
|
type: "subMenu"
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
});
|
|
106
|
+
e._internalSkipCollect && C(w, {
|
|
107
|
+
collectSubMenu: () => {
|
|
108
|
+
},
|
|
109
|
+
removeSubMenu: () => {
|
|
110
|
+
},
|
|
111
|
+
collectMenuItem: () => {
|
|
112
|
+
},
|
|
113
|
+
removeMenuItem: () => {
|
|
114
|
+
},
|
|
115
|
+
reportMenuData: () => {
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
const M = a(() => {
|
|
119
|
+
const p = t.selectedKeys || [], c = (m) => {
|
|
120
|
+
for (let r = 0; r < p.length; r++) {
|
|
121
|
+
const S = p[r];
|
|
108
122
|
if (m.includes(S))
|
|
109
123
|
return !0;
|
|
110
124
|
}
|
|
111
125
|
return !1;
|
|
112
126
|
};
|
|
113
|
-
return
|
|
127
|
+
return c(l.value) || c(f.value);
|
|
114
128
|
});
|
|
115
129
|
return {
|
|
116
130
|
subMenuKeys: l,
|
|
117
131
|
menuItemKeys: f,
|
|
118
|
-
isChildrenSelected:
|
|
132
|
+
isChildrenSelected: M,
|
|
119
133
|
props: e,
|
|
120
134
|
attrs: u,
|
|
121
135
|
computedKey: n,
|
|
122
|
-
computedPopup:
|
|
123
|
-
expandIconDown:
|
|
124
|
-
expandIconRight:
|
|
136
|
+
computedPopup: i,
|
|
137
|
+
expandIconDown: b(t, "expandIconDown"),
|
|
138
|
+
expandIconRight: b(t, "expandIconRight")
|
|
125
139
|
};
|
|
126
140
|
},
|
|
127
141
|
render() {
|
|
@@ -132,30 +146,30 @@ const w = {
|
|
|
132
146
|
computedPopup: d,
|
|
133
147
|
expandIconDown: o,
|
|
134
148
|
expandIconRight: t,
|
|
135
|
-
isChildrenSelected:
|
|
149
|
+
isChildrenSelected: i
|
|
136
150
|
} = this, l = {
|
|
137
151
|
...this.$slots,
|
|
138
|
-
"expand-icon-down": this.$slots["expand-icon-down"] || o || (() => [
|
|
139
|
-
"expand-icon-right": this.$slots["expand-icon-right"] || t || (() => [
|
|
152
|
+
"expand-icon-down": this.$slots["expand-icon-down"] || o || (() => [s(K, null, null)]),
|
|
153
|
+
"expand-icon-right": this.$slots["expand-icon-right"] || t || (() => [s(_, null, null)])
|
|
140
154
|
};
|
|
141
|
-
return d ?
|
|
155
|
+
return d ? s(I, y({
|
|
142
156
|
key: n,
|
|
143
157
|
title: e.title,
|
|
144
158
|
selectable: e.selectable,
|
|
145
159
|
disabled: e.disabled,
|
|
146
|
-
isChildrenSelected:
|
|
160
|
+
isChildrenSelected: i,
|
|
147
161
|
popupMaxHeight: e.popupMaxHeight,
|
|
148
162
|
_internalSkipCollect: e._internalSkipCollect
|
|
149
|
-
}, u), l) :
|
|
163
|
+
}, u), l) : s(g, y({
|
|
150
164
|
key: n,
|
|
151
165
|
title: e.title,
|
|
152
166
|
disabled: e.disabled,
|
|
153
|
-
isChildrenSelected:
|
|
167
|
+
isChildrenSelected: i,
|
|
154
168
|
_internalSkipCollect: e._internalSkipCollect
|
|
155
169
|
}, u), l);
|
|
156
170
|
}
|
|
157
171
|
});
|
|
158
172
|
export {
|
|
159
|
-
|
|
160
|
-
|
|
173
|
+
q as default,
|
|
174
|
+
R as menuSubMenuProps
|
|
161
175
|
};
|
|
@@ -2,10 +2,10 @@ import { defineComponent as S, toRefs as B, computed as o, ref as P } from "vue"
|
|
|
2
2
|
import { Trigger as $ } from "../trigger/index.js";
|
|
3
3
|
import H from "./base-menu.vue.js";
|
|
4
4
|
import N from "./hooks/use-menu.js";
|
|
5
|
-
import
|
|
6
|
-
import { omit as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
5
|
+
import _ from "./hooks/use-level.js";
|
|
6
|
+
import { omit as I } from "../../_utils/omit.js";
|
|
7
|
+
import K from "./indent.vue.js";
|
|
8
|
+
import V from "./hooks/use-menu-context.js";
|
|
9
9
|
import R from "../../_container/render-function.js";
|
|
10
10
|
import { isNumber as T } from "../../_utils/is.js";
|
|
11
11
|
import { getClassNameMixin as w } from "../../_utils/config.js";
|
|
@@ -14,7 +14,7 @@ const Q = S({
|
|
|
14
14
|
components: {
|
|
15
15
|
Menu: H,
|
|
16
16
|
Trigger: $,
|
|
17
|
-
MenuIndent:
|
|
17
|
+
MenuIndent: K,
|
|
18
18
|
RenderFunction: R
|
|
19
19
|
},
|
|
20
20
|
inheritAttrs: !1,
|
|
@@ -39,57 +39,57 @@ const Q = S({
|
|
|
39
39
|
type: Boolean
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
|
-
setup(
|
|
43
|
-
const { key: l } = N(), { level:
|
|
44
|
-
() =>
|
|
42
|
+
setup(s) {
|
|
43
|
+
const { key: l } = N(), { level: a } = _(), { selectable: u, disabled: p, isChildrenSelected: C, popupMaxHeight: x } = B(s), t = V(), { onSubMenuClick: r, onMenuItemClick: n } = t, m = o(() => t.prefixCls), f = o(() => t.mode), v = o(() => t.selectedKeys || []), i = o(() => `${m.value}-pop`), d = o(
|
|
44
|
+
() => u.value && v.value.includes(l.value) || C.value
|
|
45
45
|
), M = o(() => [
|
|
46
|
-
`${
|
|
47
|
-
`${
|
|
46
|
+
`${i.value}`,
|
|
47
|
+
`${i.value}-header`,
|
|
48
48
|
{
|
|
49
|
-
[`${
|
|
49
|
+
[`${m.value}-selected`]: d.value
|
|
50
50
|
}
|
|
51
|
-
]), h = o(() =>
|
|
52
|
-
|
|
53
|
-
}, y = w("trigger"),
|
|
51
|
+
]), h = o(() => f.value === "horizontal" && !t.inTrigger), g = P(!1), c = (e) => {
|
|
52
|
+
g.value = e;
|
|
53
|
+
}, y = w("trigger"), k = o(() => {
|
|
54
54
|
var e;
|
|
55
55
|
return [
|
|
56
|
-
`${
|
|
56
|
+
`${i.value}-trigger`,
|
|
57
57
|
{
|
|
58
|
-
[`${
|
|
58
|
+
[`${i.value}-trigger-dark`]: t.theme === "dark"
|
|
59
59
|
},
|
|
60
60
|
// @ts-ignore
|
|
61
61
|
(e = t.triggerProps) == null ? void 0 : e.class
|
|
62
62
|
];
|
|
63
|
-
}),
|
|
63
|
+
}), b = o(() => I(t.triggerProps || {}, ["class"]));
|
|
64
64
|
return {
|
|
65
|
-
menuPrefixCls:
|
|
66
|
-
mode:
|
|
67
|
-
level:
|
|
65
|
+
menuPrefixCls: m,
|
|
66
|
+
mode: f,
|
|
67
|
+
level: a,
|
|
68
68
|
classNames: M,
|
|
69
|
-
isSelected:
|
|
70
|
-
disabled:
|
|
71
|
-
selectedKeys:
|
|
69
|
+
isSelected: d,
|
|
70
|
+
disabled: p,
|
|
71
|
+
selectedKeys: v,
|
|
72
72
|
needPopOnBottom: h,
|
|
73
|
-
popVisible:
|
|
73
|
+
popVisible: g,
|
|
74
74
|
className: y,
|
|
75
|
-
triggerClassNames:
|
|
76
|
-
triggerProps:
|
|
75
|
+
triggerClassNames: k,
|
|
76
|
+
triggerProps: b,
|
|
77
77
|
menuContext: t,
|
|
78
78
|
popupMenuStyles: o(() => {
|
|
79
79
|
const e = x.value ?? t.popupMaxHeight;
|
|
80
80
|
return T(e) ? { maxHeight: `${e}px` } : e ? {} : { maxHeight: "unset" };
|
|
81
81
|
}),
|
|
82
82
|
onClick: () => {
|
|
83
|
-
|
|
83
|
+
p.value || s._internalSkipCollect || (r && r(l.value, a.value), u.value && n && n(l.value));
|
|
84
84
|
},
|
|
85
85
|
onKeydown: (e) => {
|
|
86
|
-
|
|
86
|
+
p.value || s._internalSkipCollect || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r && r(l.value, a.value), c(!0), u.value && n && n(l.value));
|
|
87
87
|
},
|
|
88
88
|
onMenuItemClick: (e) => {
|
|
89
|
-
n && n(e),
|
|
89
|
+
n && n(e), c(!1);
|
|
90
90
|
},
|
|
91
91
|
onVisibleChange: (e) => {
|
|
92
|
-
|
|
92
|
+
c(e);
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
}
|