kui-vue 3.2.4 → 3.2.5
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/components/_tool/utils.js +2 -2
- package/components/alert/styles/index.less +19 -19
- package/components/avatar/styles/index.less +3 -3
- package/components/backtop/styles/index.less +2 -2
- package/components/badge/demo/dot.md +1 -1
- package/components/badge/demo/dynamic.md +1 -1
- package/components/badge/demo/max.md +1 -1
- package/components/badge/styles/index.less +21 -21
- package/components/base/input.jsx +16 -10
- package/components/breadcrumb/styles/index.less +4 -4
- package/components/button/button.jsx +14 -8
- package/components/button/buttonGroup.jsx +6 -6
- package/components/button/demo/base.md +2 -1
- package/components/button/demo/disabled.md +14 -16
- package/components/button/demo/group.md +2 -2
- package/components/button/demo/index.vue +6 -2
- package/components/button/demo/light.md +26 -0
- package/components/button/demo/loading.md +1 -1
- package/components/button/demo/normal.md +25 -0
- package/components/button/demo/size.md +2 -2
- package/components/button/demo/solid.md +16 -0
- package/components/button/demo/with-icon.md +4 -3
- package/components/button/index.md +3 -3
- package/components/button/styles/index.less +106 -45
- package/components/card/demo/base.md +1 -1
- package/components/card/demo/border.md +2 -2
- package/components/card/styles/index.less +6 -6
- package/components/carousel/styles/index.less +1 -1
- package/components/checkbox/demo/group-vertical.md +47 -0
- package/components/checkbox/demo/index.vue +4 -0
- package/components/checkbox/demo/options.md +46 -0
- package/components/checkbox/group.jsx +9 -3
- package/components/checkbox/index.md +8 -7
- package/components/checkbox/styles/index.less +30 -20
- package/components/collapse/styles/index.less +10 -10
- package/components/colorPicker/styles/index.less +14 -14
- package/components/datePicker/datepicker.jsx +11 -3
- package/components/datePicker/demo/index.vue +2 -0
- package/components/datePicker/demo/theme.md +34 -0
- package/components/datePicker/index.md +4 -1
- package/components/datePicker/styles/calendar.less +39 -38
- package/components/datePicker/styles/datepicker.less +37 -20
- package/components/divider/styles/index.less +6 -6
- package/components/drawer/styles/index.less +12 -10
- package/components/dropdown/demo/base.md +4 -4
- package/components/dropdown/demo/cascading.md +3 -3
- package/components/dropdown/demo/divider.md +3 -3
- package/components/dropdown/styles/index.less +4 -4
- package/components/empty/styles/index.less +2 -2
- package/components/form/demo/base.md +25 -2
- package/components/form/demo/index.vue +1 -1
- package/components/form/demo/valid.md +9 -0
- package/components/form/form.jsx +2 -0
- package/components/form/formitem.jsx +18 -10
- package/components/form/styles/index.less +17 -13
- package/components/grid/styles/index.less +1 -1
- package/components/icon/demo/base.md +4 -4
- package/components/icon/demo/search.vue +6 -9
- package/components/image/styles/index.less +18 -18
- package/components/index.js +3 -1
- package/components/input/demo/index.vue +3 -1
- package/components/input/demo/theme.md +39 -0
- package/components/input/index.md +9 -6
- package/components/input/input.jsx +10 -3
- package/components/input/styles/index.less +120 -78
- package/components/input/textarea.jsx +1 -0
- package/components/layout/demo/base.md +5 -3
- package/components/layout/demo/index.vue +0 -2
- package/components/layout/demo/info.md +0 -2
- package/components/layout/demo/layout1.md +40 -47
- package/components/layout/demo/layout2.md +42 -49
- package/components/layout/demo/layout3.md +44 -22
- package/components/layout/demo/layout4.md +19 -18
- package/components/layout/demo/layout5.md +47 -44
- package/components/layout/styles/index.less +1 -6
- package/components/loading/styles/index.less +4 -4
- package/components/menu/demo/accrodion.md +2 -2
- package/components/menu/demo/base.md +5 -13
- package/components/menu/demo/collapsed.md +2 -2
- package/components/menu/demo/index.vue +0 -2
- package/components/menu/demo/inline.md +6 -10
- package/components/menu/demo/mode.md +2 -2
- package/components/menu/demo/theme.md +2 -2
- package/components/menu/demo/vertical.md +2 -2
- package/components/menu/index.md +0 -3
- package/components/menu/menu.jsx +4 -4
- package/components/menu/menuitem.jsx +1 -13
- package/components/menu/styles/dropmenu.less +28 -20
- package/components/menu/styles/index.less +148 -251
- package/components/menu/submenu.jsx +4 -64
- package/components/message/group.jsx +1 -1
- package/components/message/styles/index.less +13 -8
- package/components/modal/demo/base.md +15 -2
- package/components/modal/demo/custom.md +2 -2
- package/components/modal/demo/more.md +6 -6
- package/components/modal/modal.jsx +11 -5
- package/components/modal/styles/index.less +24 -17
- package/components/notice/styles/index.less +14 -13
- package/components/page/styles/index.less +16 -16
- package/components/popconfirm/styles/index.less +6 -6
- package/components/poptip/styles/index.less +10 -9
- package/components/progress/styles/index.less +13 -13
- package/components/radio/button.jsx +2 -2
- package/components/radio/demo/button.md +3 -3
- package/components/radio/demo/group-vertical.md +46 -0
- package/components/radio/demo/index.vue +4 -0
- package/components/radio/demo/options.md +43 -0
- package/components/radio/group.jsx +14 -8
- package/components/radio/index.md +11 -9
- package/components/radio/styles/index.less +33 -22
- package/components/rate/styles/index.less +2 -2
- package/components/select/demo/icon.md +40 -0
- package/components/select/demo/index.vue +4 -0
- package/components/select/demo/size.md +5 -5
- package/components/select/demo/theme.md +46 -0
- package/components/select/index.md +5 -2
- package/components/select/select.jsx +20 -13
- package/components/select/styles/index.less +113 -49
- package/components/slider/slider.jsx +9 -4
- package/components/slider/styles/index.less +7 -7
- package/components/space/demo/align.md +1 -1
- package/components/spin/styles/index.less +7 -11
- package/components/steps/styles/index.less +11 -11
- package/components/styles/color.less +158 -0
- package/components/styles/index.less +3 -1
- package/components/styles/sys.less +34 -0
- package/components/styles/var.less +150 -0
- package/components/switch/styles/index.less +11 -11
- package/components/table/styles/index.less +29 -32
- package/components/tabs/styles/index.less +20 -19
- package/components/tag/styles/index.less +45 -45
- package/components/timeline/styles/index.less +5 -5
- package/components/tooltip/styles/index.less +19 -18
- package/components/tree/styles/index.less +15 -15
- package/components/treeselect/styles/index.less +5 -5
- package/components/upload/demo/accept.md +68 -0
- package/components/upload/demo/avatar.md +40 -0
- package/components/upload/demo/base.md +40 -0
- package/components/upload/demo/custom.md +47 -0
- package/components/upload/demo/directory.md +36 -0
- package/components/upload/demo/drag.md +0 -0
- package/components/upload/demo/draggable.md +45 -0
- package/components/upload/demo/exceed.md +42 -0
- package/components/upload/demo/file-list.md +42 -0
- package/components/upload/demo/form.md +120 -0
- package/components/upload/demo/index.vue +37 -0
- package/components/upload/demo/info.md +10 -0
- package/components/upload/demo/picture.md +54 -0
- package/components/upload/index.md +26 -0
- package/components/upload/styles/index.less +258 -0
- package/components/upload/upload.jsx +336 -0
- package/dist/k-ui.css +1 -1
- package/dist/k-ui.js +2 -2
- package/package.json +9 -4
- package/components/button/demo/hollow.md +0 -15
- package/components/layout/demo/layout6.md +0 -142
- package/components/menu/demo/vertical-affix.md +0 -69
- package/components/styles/dark.less +0 -70
- package/components/styles/global-dark.less +0 -36
- package/components/styles/global.less +0 -44
- package/components/upload/upload.vue +0 -137
- package/dist/k-ui-dark.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '../../styles/
|
|
1
|
+
@import '../../styles/var.less';
|
|
2
2
|
@import 'dropmenu.less';
|
|
3
3
|
.k-menu {
|
|
4
4
|
display: block;
|
|
@@ -8,27 +8,35 @@
|
|
|
8
8
|
font-size: 14px;
|
|
9
9
|
position: relative;
|
|
10
10
|
zoom: 1;
|
|
11
|
-
|
|
11
|
+
background: var(--kui-color-back);
|
|
12
12
|
list-style: none;
|
|
13
|
-
color:
|
|
14
|
-
transition: background-color .3s cubic-bezier(.645, .045, .355, 1), width .3s cubic-bezier(.645, .045, .355, 1);
|
|
13
|
+
color: var(--kui-color-font);
|
|
14
|
+
// transition: background-color .3s cubic-bezier(.645, .045, .355, 1), width .3s cubic-bezier(.645, .045, .355, 1);
|
|
15
|
+
transition: width .3s cubic-bezier(.645, .045, .355, 1);
|
|
15
16
|
ol, ul, li {
|
|
16
17
|
list-style: none !important;
|
|
17
18
|
margin: 0;
|
|
18
19
|
}
|
|
19
|
-
&:after, &:before {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
20
|
+
// &:after, &:before {
|
|
21
|
+
// content: "";
|
|
22
|
+
// display: table;
|
|
23
|
+
// }
|
|
23
24
|
.k-menu-item-divider {
|
|
24
25
|
height: 1px;
|
|
25
26
|
margin: 4px 0;
|
|
26
27
|
overflow: hidden;
|
|
27
28
|
line-height: 0;
|
|
28
|
-
background-color:
|
|
29
|
+
background-color: var(--kui-color-border);
|
|
30
|
+
}
|
|
31
|
+
.k-menu-icon-temp {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
width: 20px;
|
|
34
|
+
height: 20px;
|
|
35
|
+
margin-right: 8px;
|
|
29
36
|
}
|
|
30
37
|
.k-menu-item-icon, .k-menu-submenu-inner .k-icon {
|
|
31
38
|
margin-right: 8px;
|
|
39
|
+
font-size: 20px;
|
|
32
40
|
// vertical-align: middle;
|
|
33
41
|
}
|
|
34
42
|
.k-menu-item-icon+a {
|
|
@@ -58,46 +66,45 @@
|
|
|
58
66
|
transition: font-size .3s cubic-bezier(.215, .61, .355, 1), padding .3s cubic-bezier(.215, .61, .355, 1);
|
|
59
67
|
// transition: all .3s cubic-bezier(.215, .61, .355, 1);
|
|
60
68
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
.k-menu-submenu-affix-item-text {
|
|
72
|
-
font-size: 12px;
|
|
73
|
-
box-sizing: border-box;
|
|
74
|
-
padding: 3px 5px;
|
|
75
|
-
display: inline-block;
|
|
76
|
-
max-width: 100%;
|
|
77
|
-
white-space: nowrap;
|
|
78
|
-
text-overflow: ellipsis;
|
|
79
|
-
overflow: hidden;
|
|
80
|
-
border-radius: 2px;
|
|
81
|
-
cursor: pointer;
|
|
82
|
-
border: 1px solid transparent;
|
|
83
|
-
&:hover {
|
|
84
|
-
color: @main;
|
|
85
|
-
border: 1px solid fade(@main, 30%);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
69
|
+
//light
|
|
70
|
+
.k-menu-item-group-title {
|
|
71
|
+
font-size: 12px;
|
|
72
|
+
color: var(--kui-color-icon);
|
|
73
|
+
}
|
|
74
|
+
>.k-menu-item>a {
|
|
75
|
+
color: var(--kui-color-font);
|
|
76
|
+
display: block;
|
|
77
|
+
&:hover {
|
|
78
|
+
color: var(--kui-color-main);
|
|
88
79
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
80
|
+
}
|
|
81
|
+
.k-menu-item-active, .k-menu-item-selected {
|
|
82
|
+
color: var(--kui-color-main);
|
|
83
|
+
background-color: var(--kui-color-hover);
|
|
84
|
+
a {
|
|
85
|
+
color: var(--kui-color-main);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
>.k-menu-submenu-selected, >.k-menu-submenu-active {
|
|
89
|
+
>.k-menu-submenu-title {
|
|
90
|
+
color: var(--kui-color-main);
|
|
94
91
|
}
|
|
95
92
|
}
|
|
93
|
+
.k-menu-item-disabled, .k-menu-submenu-disabled {
|
|
94
|
+
color: var(--kui-color-disable-color);
|
|
95
|
+
cursor: not-allowed;
|
|
96
|
+
}
|
|
97
|
+
.k-menu-submenu-inner{
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
}
|
|
101
|
+
//light-end
|
|
96
102
|
&-inline {
|
|
97
|
-
border-right: 1px solid
|
|
103
|
+
border-right: 1px solid var(--kui-color-border);
|
|
98
104
|
width: 100%;
|
|
105
|
+
display: inline-block;
|
|
99
106
|
.k-menu-item, .k-menu-submenu {
|
|
100
|
-
line-height:
|
|
107
|
+
line-height: 1;
|
|
101
108
|
font-size: 14px;
|
|
102
109
|
list-style: none;
|
|
103
110
|
a {
|
|
@@ -114,18 +121,24 @@
|
|
|
114
121
|
list-style: none;
|
|
115
122
|
margin: 0;
|
|
116
123
|
padding: 0;
|
|
124
|
+
|
|
117
125
|
}
|
|
118
126
|
.k-menu-item {
|
|
119
|
-
padding:
|
|
120
|
-
width: calc(100% + 1px);
|
|
127
|
+
padding: 10px 12px;
|
|
128
|
+
// width: calc(100% + 1px);
|
|
129
|
+
// width:100%;
|
|
121
130
|
box-sizing: border-box;
|
|
122
131
|
position: relative;
|
|
132
|
+
margin: 8px;
|
|
133
|
+
border-radius: var(--kui-border-radius);
|
|
134
|
+
display: flex;
|
|
135
|
+
align-items: center;
|
|
123
136
|
&::after {
|
|
124
137
|
content: '';
|
|
125
138
|
position: absolute;
|
|
126
139
|
width: 0;
|
|
127
140
|
height: 0;
|
|
128
|
-
border-right: 3px solid
|
|
141
|
+
border-right: 3px solid var(--kui-color-main);
|
|
129
142
|
top: 50%;
|
|
130
143
|
right: 0;
|
|
131
144
|
transition: all .3s cubic-bezier(.215, .61, .355, 1);
|
|
@@ -133,38 +146,71 @@
|
|
|
133
146
|
}
|
|
134
147
|
.k-menu-submenu {
|
|
135
148
|
.k-menu-item {
|
|
136
|
-
padding:
|
|
149
|
+
padding: 10px 24px 10px 12px;
|
|
150
|
+
&:first-child {
|
|
151
|
+
margin-top: 0;
|
|
152
|
+
}
|
|
137
153
|
}
|
|
138
154
|
.k-menu-submenu {
|
|
139
155
|
//doto:
|
|
140
|
-
text-indent: 12px;
|
|
156
|
+
// text-indent: 12px;
|
|
157
|
+
// padding-left: 12px;
|
|
158
|
+
.k-menu-submenu-title {
|
|
159
|
+
padding-left: 40px;
|
|
160
|
+
}
|
|
141
161
|
}
|
|
142
162
|
}
|
|
143
163
|
.k-menu-submenu-title {
|
|
144
|
-
padding:
|
|
164
|
+
padding: 10px 36px 10px 12px;
|
|
145
165
|
position: relative;
|
|
166
|
+
margin: 0 8px 8px 8px;
|
|
167
|
+
border-radius: var(--kui-border-radius);
|
|
168
|
+
font-weight: 600;
|
|
146
169
|
.k-menu-submenu-arrow {
|
|
147
170
|
position: absolute;
|
|
148
171
|
right: 16px;
|
|
149
172
|
top: 50%;
|
|
150
173
|
transform: translateY(-50%);
|
|
151
174
|
}
|
|
175
|
+
&:hover {
|
|
176
|
+
background-color: var(--kui-color-main-90);
|
|
177
|
+
}
|
|
152
178
|
}
|
|
153
179
|
.k-menu-submenu-popup {
|
|
154
180
|
transition: all 0.3s cubic-bezier(.215, .61, .355, 1);
|
|
181
|
+
.k-menu {
|
|
182
|
+
// background-color: var(--kui-color-gray-90);
|
|
183
|
+
}
|
|
155
184
|
}
|
|
156
185
|
>.k-menu-submenu-opened>.k-menu-submenu-title>.k-menu-submenu-arrow {
|
|
157
186
|
transform: rotate(-180deg) translateY(50%);
|
|
158
187
|
}
|
|
188
|
+
//light
|
|
189
|
+
.k-menu-item-selected {
|
|
190
|
+
background-color: var(--kui-color-selected);
|
|
191
|
+
&::after {
|
|
192
|
+
display: none;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
159
195
|
}
|
|
160
196
|
&-vertical {
|
|
161
197
|
width: 100%;
|
|
198
|
+
border-right: 1px solid var(--kui-color-border);
|
|
199
|
+
display: inline-block;
|
|
200
|
+
.k-menu-item-selected {
|
|
201
|
+
background-color: var(--kui-color-selected);
|
|
202
|
+
}
|
|
203
|
+
.k-menu-submenu-active, .k-menu-submenu-selected {
|
|
204
|
+
.k-menu-submenu-title {
|
|
205
|
+
color: var(--kui-color-main);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
162
208
|
.k-menu-submenu-inner {
|
|
163
209
|
white-space: nowrap;
|
|
164
210
|
padding-right: 16px;
|
|
165
211
|
}
|
|
166
212
|
>.k-menu-item, >.k-menu-submenu {
|
|
167
|
-
line-height:
|
|
213
|
+
line-height: 1;
|
|
168
214
|
position: relative;
|
|
169
215
|
cursor: pointer;
|
|
170
216
|
font-size: 14px;
|
|
@@ -172,23 +218,14 @@
|
|
|
172
218
|
list-style: none;
|
|
173
219
|
}
|
|
174
220
|
.k-menu-item, .k-menu-submenu-title {
|
|
175
|
-
padding:
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
top: 0;
|
|
182
|
-
width: 40px;
|
|
183
|
-
height: 40px;
|
|
184
|
-
line-height: 40px;
|
|
185
|
-
// top: 50%;
|
|
186
|
-
// transform: translateY(-50%);
|
|
187
|
-
font-size: 13px;
|
|
188
|
-
color: @color;
|
|
221
|
+
padding: 10px 12px;
|
|
222
|
+
margin: 8px;
|
|
223
|
+
line-height: 1;
|
|
224
|
+
border-radius: var(--kui-border-radius);
|
|
225
|
+
display: flex;
|
|
226
|
+
align-items: center;
|
|
189
227
|
&:hover {
|
|
190
|
-
|
|
191
|
-
background-color: rgba(190, 190, 190, 0.15);
|
|
228
|
+
background-color: var(--kui-color-main-90);
|
|
192
229
|
}
|
|
193
230
|
}
|
|
194
231
|
.k-menu-submenu-popup {
|
|
@@ -199,29 +236,29 @@
|
|
|
199
236
|
z-index: 1001;
|
|
200
237
|
min-width: 160px;
|
|
201
238
|
// box-shadow: 0 1px 6px rgba(0, 0, 0, .2);
|
|
202
|
-
// border-radius:
|
|
239
|
+
// border-radius: var(--kui-border-radius);
|
|
203
240
|
// margin-left: 5px;
|
|
204
241
|
>.k-menu {
|
|
205
|
-
border-radius:
|
|
242
|
+
border-radius: var(--kui-border-radius);
|
|
206
243
|
border: none;
|
|
207
244
|
margin: 0;
|
|
208
245
|
list-style: none;
|
|
209
246
|
.k-menu-item-group-title {
|
|
210
|
-
line-height:
|
|
247
|
+
line-height: 1;
|
|
211
248
|
padding: 0 12px;
|
|
212
249
|
}
|
|
213
250
|
.k-menu-item-group-list .k-menu-item {
|
|
214
251
|
position: relative;
|
|
215
252
|
}
|
|
216
253
|
.k-menu-item {
|
|
217
|
-
line-height:
|
|
254
|
+
line-height: 1;
|
|
218
255
|
&:first-child {
|
|
219
|
-
border-top-left-radius:
|
|
220
|
-
border-top-right-radius:
|
|
256
|
+
border-top-left-radius: var(--kui-border-radius);
|
|
257
|
+
border-top-right-radius: var(--kui-border-radius);
|
|
221
258
|
}
|
|
222
259
|
&:last-child {
|
|
223
|
-
border-bottom-left-radius:
|
|
224
|
-
border-bottom-right-radius:
|
|
260
|
+
border-bottom-left-radius: var(--kui-border-radius);
|
|
261
|
+
border-bottom-right-radius: var(--kui-border-radius);
|
|
225
262
|
}
|
|
226
263
|
}
|
|
227
264
|
}
|
|
@@ -238,12 +275,15 @@
|
|
|
238
275
|
}
|
|
239
276
|
}
|
|
240
277
|
&-horizontal {
|
|
241
|
-
border-bottom: 1px solid
|
|
278
|
+
border-bottom: 1px solid var(--kui-color-border);
|
|
242
279
|
white-space: nowrap;
|
|
243
280
|
font-size: 0;
|
|
244
|
-
line-height:
|
|
281
|
+
line-height: 1;
|
|
282
|
+
.k-menu-icon-temp{
|
|
283
|
+
display: none;
|
|
284
|
+
}
|
|
245
285
|
>.k-menu-item, >.k-menu-submenu {
|
|
246
|
-
|
|
286
|
+
line-height: 1;
|
|
247
287
|
margin: 0 16px;
|
|
248
288
|
position: relative;
|
|
249
289
|
cursor: pointer;
|
|
@@ -257,6 +297,12 @@
|
|
|
257
297
|
}
|
|
258
298
|
>.k-menu-item, >.k-menu-submenu-title {
|
|
259
299
|
// margin: 0 16px;
|
|
300
|
+
padding: 10px 0;
|
|
301
|
+
}
|
|
302
|
+
.k-menu-submenu-title {
|
|
303
|
+
padding: 10px 0;
|
|
304
|
+
display: flex;
|
|
305
|
+
align-items: center;
|
|
260
306
|
}
|
|
261
307
|
.k-menu-submenu {
|
|
262
308
|
.k-menu-item, .k-menu-submenu {
|
|
@@ -286,180 +332,34 @@
|
|
|
286
332
|
}
|
|
287
333
|
.k-menu-item-group-title {
|
|
288
334
|
font-size: 12px;
|
|
289
|
-
line-height:
|
|
335
|
+
line-height: 1;
|
|
290
336
|
padding: 0 12px;
|
|
291
337
|
}
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
color: @icon-color;
|
|
297
|
-
}
|
|
298
|
-
>.k-menu-item>a {
|
|
299
|
-
color: @color;
|
|
300
|
-
display: block;
|
|
301
|
-
&:hover {
|
|
302
|
-
color: @main;
|
|
303
|
-
}
|
|
338
|
+
//light
|
|
339
|
+
>.k-menu-item-selected, >.k-menu-submenu-selected, >.k-menu-item-active, >.k-menu-submenu-active {
|
|
340
|
+
border-bottom-color: var(--kui-color-main);
|
|
341
|
+
background-color: transparent;
|
|
304
342
|
}
|
|
305
|
-
.k-menu-
|
|
306
|
-
color: @main;
|
|
307
|
-
background-color: @hover-color;
|
|
308
|
-
a {
|
|
309
|
-
color: @main;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
>.k-menu-submenu-selected, >.k-menu-submenu-active {
|
|
313
|
-
>.k-menu-submenu-title {
|
|
314
|
-
color: @main;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
&.k-menu-horizontal {
|
|
318
|
-
>.k-menu-item-selected, >.k-menu-submenu-selected, >.k-menu-item-active, >.k-menu-submenu-active {
|
|
319
|
-
border-bottom-color: @main;
|
|
320
|
-
background-color: transparent;
|
|
321
|
-
}
|
|
322
|
-
.k-menu-submenu {
|
|
323
|
-
.k-menu-item-selected {
|
|
324
|
-
background-color: @selected-color;
|
|
325
|
-
}
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
&.k-menu-inline {
|
|
329
|
-
.k-menu-submenu-popup .k-menu {
|
|
330
|
-
background-color: fadeout(@border-color, 80%);
|
|
331
|
-
}
|
|
343
|
+
.k-menu-submenu {
|
|
332
344
|
.k-menu-item-selected {
|
|
333
|
-
background-color:
|
|
334
|
-
&::after {
|
|
335
|
-
top: 0;
|
|
336
|
-
height: 100%;
|
|
337
|
-
}
|
|
345
|
+
background-color: var(--kui-color-selected);
|
|
338
346
|
}
|
|
339
347
|
}
|
|
340
|
-
&.k-menu-vertical {
|
|
341
|
-
border-right: 1px solid @border-color;
|
|
342
|
-
.k-menu-item-selected {
|
|
343
|
-
background-color: @selected-color;
|
|
344
|
-
}
|
|
345
|
-
.k-menu-submenu-affix-item-active {
|
|
346
|
-
.k-menu-submenu-affix-item-text {
|
|
347
|
-
&:hover {
|
|
348
|
-
background-color: rgba(255, 255, 255, 0.3);
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
.k-menu-submenu-active, .k-menu-submenu-selected {
|
|
353
|
-
.k-menu-submenu-title {
|
|
354
|
-
color: @main;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
|
-
.k-menu-item-disabled, .k-menu-submenu-disabled {
|
|
359
|
-
color: @disable-color;
|
|
360
|
-
cursor: not-allowed;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
&-dark {
|
|
364
|
-
background-color: @dark-back !important;
|
|
365
|
-
color: @color-light;
|
|
366
|
-
.k-menu-item-group-title {
|
|
367
|
-
font-size: 12px;
|
|
368
|
-
color: @color-light;
|
|
369
|
-
}
|
|
370
|
-
.k-menu-item-active, >.k-menu-submenu-active >.k-menu-submenu-title {
|
|
371
|
-
color: #fff;
|
|
372
|
-
}
|
|
373
|
-
.k-menu-submenu-selected {
|
|
374
|
-
color: #fff;
|
|
375
|
-
a {
|
|
376
|
-
color: #fff;
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
.k-menu-item.k-menu-item-selected {
|
|
380
|
-
color: #fff;
|
|
381
|
-
background-color: @main;
|
|
382
|
-
a {
|
|
383
|
-
color: #fff;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
&.k-menu-inline {
|
|
387
|
-
border-right: 0;
|
|
388
|
-
.k-menu-item, .k-menu-submenu {
|
|
389
|
-
width: 100%;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
.k-menu-inline {
|
|
393
|
-
background-color: #161f29 !important;
|
|
394
|
-
}
|
|
395
|
-
&.k-menu-vertical {
|
|
396
|
-
border-right: 0;
|
|
397
|
-
.k-menu-item-icon-affix {
|
|
398
|
-
color: #fff;
|
|
399
|
-
opacity: .5;
|
|
400
|
-
}
|
|
401
|
-
.k-menu-submenu-affix-item {
|
|
402
|
-
color: @color-light;
|
|
403
|
-
.k-menu-submenu-affix-item-text:hover {
|
|
404
|
-
border-color: transparent;
|
|
405
|
-
color: #fff;
|
|
406
|
-
background-color: rgba(255, 255, 255, 0.3);
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
.k-menu-submenu-affix-item-active {
|
|
410
|
-
.k-menu-submenu-affix-item-text {
|
|
411
|
-
background-color: #fff;
|
|
412
|
-
color: #333;
|
|
413
|
-
border-color: #fff;
|
|
414
|
-
&:hover {
|
|
415
|
-
background-color: #fff;
|
|
416
|
-
color: #333;
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
&.k-menu-horizontal {
|
|
422
|
-
border-bottom: 0;
|
|
423
|
-
.k-menu-item, .k-menu-submenu {
|
|
424
|
-
top: 0;
|
|
425
|
-
margin: 0;
|
|
426
|
-
padding: 0 16px;
|
|
427
|
-
border-color: @dark-back;
|
|
428
|
-
border-bottom: 0;
|
|
429
|
-
}
|
|
430
|
-
.k-menu-submenu-selected {
|
|
431
|
-
background-color: @main;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
.k-menu-submenu-opened {
|
|
435
|
-
>.k-menu-submenu-title {
|
|
436
|
-
color: #fff;
|
|
437
|
-
}
|
|
438
|
-
// color: #fff;
|
|
439
|
-
}
|
|
440
|
-
>.k-menu-item>a {
|
|
441
|
-
color: @color-light;
|
|
442
|
-
display: block;
|
|
443
|
-
&:hover {
|
|
444
|
-
color: #fff;
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
.k-menu-item-disabled, .k-menu-submenu-disabled {
|
|
448
|
-
color: @disable-light-color;
|
|
449
|
-
cursor: not-allowed;
|
|
450
|
-
}
|
|
451
348
|
}
|
|
452
349
|
&-inline-collapased {
|
|
453
|
-
width:
|
|
350
|
+
width: 60px;
|
|
454
351
|
>.k-menu-submenu {
|
|
455
352
|
padding: 0;
|
|
456
353
|
}
|
|
457
354
|
>.k-menu-item, >.k-menu-submenu >.k-menu-submenu-title {
|
|
458
|
-
padding: 0
|
|
355
|
+
// padding: 0 ;
|
|
459
356
|
text-overflow: clip;
|
|
460
357
|
overflow: hidden;
|
|
358
|
+
// text-align: center;
|
|
359
|
+
padding: 10px 12px;
|
|
461
360
|
.k-icon {
|
|
462
|
-
font-size: 16px;
|
|
361
|
+
// font-size: 16px;
|
|
362
|
+
margin-right: 0;
|
|
463
363
|
}
|
|
464
364
|
}
|
|
465
365
|
&>.k-menu-submenu>.k-menu-submenu-title>.k-menu-submenu-arrow {
|
|
@@ -493,26 +393,28 @@
|
|
|
493
393
|
.k-menu {
|
|
494
394
|
margin: 0;
|
|
495
395
|
box-shadow: 0 1px 6px rgba(0, 0, 0, .2);
|
|
496
|
-
border-radius:
|
|
497
|
-
background-color:
|
|
396
|
+
border-radius: var(--kui-border-radius);
|
|
397
|
+
background-color: var(--kui-color-control-10);
|
|
498
398
|
>.k-menu-item {
|
|
499
|
-
line-height:
|
|
399
|
+
line-height: 1;
|
|
400
|
+
display: flex;
|
|
401
|
+
align-items: center;
|
|
500
402
|
&:first-child {
|
|
501
|
-
border-top-left-radius:
|
|
502
|
-
border-top-right-radius:
|
|
403
|
+
border-top-left-radius: var(--kui-border-radius);
|
|
404
|
+
border-top-right-radius: var(--kui-border-radius);
|
|
503
405
|
}
|
|
504
406
|
&:last-child {
|
|
505
|
-
border-bottom-left-radius:
|
|
506
|
-
border-bottom-right-radius:
|
|
407
|
+
border-bottom-left-radius: var(--kui-border-radius);
|
|
408
|
+
border-bottom-right-radius: var(--kui-border-radius);
|
|
507
409
|
}
|
|
508
410
|
}
|
|
509
411
|
.k-menu-item-group {
|
|
510
|
-
line-height:
|
|
412
|
+
line-height: 1;
|
|
511
413
|
&:last-child {
|
|
512
414
|
.k-menu-item {
|
|
513
415
|
&:last-child {
|
|
514
|
-
border-bottom-left-radius:
|
|
515
|
-
border-bottom-right-radius:
|
|
416
|
+
border-bottom-left-radius: var(--kui-border-radius);
|
|
417
|
+
border-bottom-right-radius: var(--kui-border-radius);
|
|
516
418
|
}
|
|
517
419
|
}
|
|
518
420
|
}
|
|
@@ -522,11 +424,6 @@
|
|
|
522
424
|
display: inline-block;
|
|
523
425
|
}
|
|
524
426
|
}
|
|
525
|
-
.k-menu-submenu-affix-popup {
|
|
526
|
-
.k-menu-item {
|
|
527
|
-
font-size: 12px;
|
|
528
|
-
}
|
|
529
|
-
}
|
|
530
427
|
.k-menu-submenu {
|
|
531
428
|
position: relative;
|
|
532
429
|
.k-menu-submenu-popup {
|
|
@@ -29,13 +29,12 @@ export default {
|
|
|
29
29
|
left: null,
|
|
30
30
|
minWidth: null,
|
|
31
31
|
rendered: false,
|
|
32
|
-
affixedKeys: []
|
|
33
32
|
};
|
|
34
33
|
},
|
|
35
34
|
mounted() {
|
|
36
35
|
let { SubMenu, Menu } = this
|
|
37
36
|
if (Menu) {
|
|
38
|
-
let { selectedKeys, defaultOpenKeys, inlineCollapsed
|
|
37
|
+
let { selectedKeys, defaultOpenKeys, inlineCollapsed } = Menu
|
|
39
38
|
let key = this.$vnode.key || 'sub_' + this._uid
|
|
40
39
|
const opened = defaultOpenKeys.indexOf(key) >= 0
|
|
41
40
|
|
|
@@ -51,18 +50,12 @@ export default {
|
|
|
51
50
|
if (!inlineCollapsed) {
|
|
52
51
|
this.opened = opened
|
|
53
52
|
}
|
|
54
|
-
if (verticalAffixed) {
|
|
55
|
-
this.affixedKeys = getChild(this.$slots.default)
|
|
56
|
-
.map(child => cloneVNode(child))
|
|
57
|
-
.filter(({ data }) => data.props.affixed !== false && data.props.affixed !== undefined)
|
|
58
|
-
.map(c => c.key)
|
|
59
|
-
}
|
|
60
53
|
}
|
|
61
54
|
},
|
|
62
55
|
render() {
|
|
63
56
|
let { $slots, disabled, Dropdown, opened, Menu, SubMenu, icon, rendered } = this
|
|
64
57
|
let key = this.$vnode.key || 'sub_' + this._uid
|
|
65
|
-
const { currentMode, theme, selectedKeys,
|
|
58
|
+
const { currentMode, theme, selectedKeys, inlineCollapsed,
|
|
66
59
|
mode, defaultOpenKeys } = Menu
|
|
67
60
|
let selected = selectedKeys.indexOf(key) >= 0
|
|
68
61
|
|
|
@@ -95,11 +88,9 @@ export default {
|
|
|
95
88
|
"chevron-down" : 'chevron-forward'} class={`k-${preCls}-arrow`} />
|
|
96
89
|
</div>
|
|
97
90
|
|
|
98
|
-
const hasRenderAffix = !SubMenu && mode == 'vertical' && verticalAffixed
|
|
99
|
-
|
|
100
91
|
const popupProps = {
|
|
101
92
|
slot: 'content',
|
|
102
|
-
class: [`k-${preCls}-popup
|
|
93
|
+
class: [`k-${preCls}-popup`],
|
|
103
94
|
style: {
|
|
104
95
|
'min-width': `${this.minWidth}px`,
|
|
105
96
|
'margin-left': theme == 'dark' && !SubMenu && mode == "horizontal" ? '-16px' : null
|
|
@@ -156,9 +147,7 @@ export default {
|
|
|
156
147
|
[`k-${preCls}-disabled`]: disabled
|
|
157
148
|
}]
|
|
158
149
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
return (<li class={classes}>{popMenuNode}{affixNode}</li>)
|
|
150
|
+
return (<li class={classes}>{popMenuNode}</li>)
|
|
162
151
|
},
|
|
163
152
|
methods: {
|
|
164
153
|
hidePopupMenu() {
|
|
@@ -197,55 +186,6 @@ export default {
|
|
|
197
186
|
})
|
|
198
187
|
}
|
|
199
188
|
},
|
|
200
|
-
affixed(item, e) {
|
|
201
|
-
let parent = this.Menu
|
|
202
|
-
|
|
203
|
-
let key = item.$vnode.key
|
|
204
|
-
if (parent) {
|
|
205
|
-
let options = {
|
|
206
|
-
key,
|
|
207
|
-
keyPath: [key],
|
|
208
|
-
item,
|
|
209
|
-
event: e
|
|
210
|
-
}
|
|
211
|
-
parent.$emit('affixed', options)
|
|
212
|
-
|
|
213
|
-
if (item.currentAffixed) {
|
|
214
|
-
this.affixedKeys.push(key)
|
|
215
|
-
} else {
|
|
216
|
-
let index = this.affixedKeys.indexOf(key)
|
|
217
|
-
this.affixedKeys.splice(index, 1)
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
affixItemClick(item, e) {
|
|
222
|
-
let disabled = item.data.props.disabled
|
|
223
|
-
if (disabled !== false) {
|
|
224
|
-
let parent = this.SubMenu || this.Menu
|
|
225
|
-
if (parent) {
|
|
226
|
-
let key = item.data.key
|
|
227
|
-
let options = {
|
|
228
|
-
key,
|
|
229
|
-
keyPath: [key],
|
|
230
|
-
item,
|
|
231
|
-
event: e
|
|
232
|
-
}
|
|
233
|
-
parent.handleClick(options)
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
},
|
|
237
|
-
renderAffix() {
|
|
238
|
-
let { selectedKeys } = this.Menu
|
|
239
|
-
const childs = getChild(this.$slots.default)
|
|
240
|
-
.map(child => cloneVNode(child))
|
|
241
|
-
.filter(child => this.affixedKeys.indexOf(child.key) > -1)
|
|
242
|
-
const childNode = childs.map(item => {
|
|
243
|
-
return <li class={["k-menu-submenu-affix-item", { 'k-menu-submenu-affix-item-active': selectedKeys.indexOf(item.key) >= 0 }]} key={item.key}>
|
|
244
|
-
<span class="k-menu-submenu-affix-item-text" onClick={e => this.affixItemClick(item, e)}>{item.componentOptions.children}</span>
|
|
245
|
-
</li>
|
|
246
|
-
})
|
|
247
|
-
return <ul class="k-menu-submenu-affix">{childNode}</ul>
|
|
248
|
-
},
|
|
249
189
|
openChange() {
|
|
250
190
|
if (this.Menu) {
|
|
251
191
|
let { currentMode, defaultOpenKeys, accordion, inlineCollapsed } = this.Menu
|