kui-vue 3.2.10-rc1 → 3.2.10-rc2
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 +9 -3
- package/components/base/pop.jsx +17 -5
- package/components/button/button.jsx +1 -1
- package/components/button/styles/index.less +3 -0
- package/components/checkbox/checkbox.jsx +6 -11
- package/components/checkbox/demo/check-all.md +5 -6
- package/components/checkbox/group.jsx +0 -1
- package/components/checkbox/styles/index.less +17 -11
- package/components/divider/styles/index.less +1 -1
- package/components/dropdown/demo/rightmenu.md +2 -2
- package/components/dropdown/styles/index.less +23 -34
- package/components/form/demo/base.md +1 -1
- package/components/icon/demo/base.md +2 -2
- package/components/input/demo/theme.md +11 -6
- package/components/menu/demo/collapsed.md +1 -1
- package/components/menu/styles/dropmenu.less +2 -2
- package/components/menu/styles/index.less +31 -14
- package/components/message/demo/icon.md +33 -0
- package/components/message/demo/index.vue +2 -0
- package/components/message/index.md +9 -7
- package/components/message/inner.jsx +5 -3
- package/components/modal/modal.jsx +31 -31
- package/components/notice/demo/icon.md +27 -11
- package/components/notice/demo/index.vue +2 -0
- package/components/notice/demo/types.md +28 -0
- package/components/notice/index.js +3 -0
- package/components/notice/index.md +8 -6
- package/components/popconfirm/styles/index.less +64 -83
- package/components/poptip/demo/base.md +7 -0
- package/components/poptip/demo/placement.md +12 -13
- package/components/poptip/styles/index.less +60 -79
- package/components/progress/demo/circle.md +2 -2
- package/components/radio/button.jsx +4 -2
- package/components/radio/demo/button.md +32 -28
- package/components/radio/group.jsx +4 -2
- package/components/radio/radio.jsx +7 -7
- package/components/radio/styles/index.less +58 -28
- package/components/rate/demo/base.md +7 -1
- package/components/rate/rate.jsx +8 -3
- package/components/rate/star.jsx +4 -3
- package/components/rate/styles/index.less +5 -3
- package/components/select/select.jsx +2 -0
- package/components/slider/slider.jsx +12 -18
- package/components/spin/demo/mode.md +6 -4
- package/components/spin/spin.jsx +1 -1
- package/components/switch/demo/loading.md +1 -1
- package/components/switch/demo/text.md +3 -1
- package/components/switch/styles/index.less +31 -20
- package/components/tooltip/styles/index.less +103 -76
- package/components/upload/styles/index.less +7 -0
- package/components/upload/upload.jsx +22 -12
- package/dist/k-ui.css +2 -2
- package/dist/k-ui.js +2 -2
- package/package.json +1 -1
|
@@ -133,12 +133,13 @@ export function getPosition(selection, picker, transfer, placement = 'bottom-lef
|
|
|
133
133
|
//底部
|
|
134
134
|
let showInBottom = clientHeight - selectionRect.bottom > pickerHeight
|
|
135
135
|
//上面
|
|
136
|
-
let showInTop =
|
|
136
|
+
let showInTop = selectionRect.top > pickerHeight
|
|
137
137
|
//左边
|
|
138
|
-
let showInLeft =
|
|
138
|
+
let showInLeft = selectionRect.left > pickerWidth
|
|
139
139
|
//右边
|
|
140
140
|
let showInRight = clientWidth - selectionRect.right > pickerWidth
|
|
141
141
|
|
|
142
|
+
// console.log(showInRight, selectionRect.left > pickerWidth, selectionRect.right, pickerWidth)
|
|
142
143
|
|
|
143
144
|
// console.log(placement, 'showInTop:', showInTop, 'showInBottom:', showInBottom, clientHeight, scrollTop, selectionRect.top, pickerHeight)
|
|
144
145
|
|
|
@@ -151,7 +152,8 @@ export function getPosition(selection, picker, transfer, placement = 'bottom-lef
|
|
|
151
152
|
if ((hasBottom && showInBottom) || (hasTop && !showInTop)) { //正常在底部显示
|
|
152
153
|
if (transfer) {
|
|
153
154
|
top = selectionRect.bottom + offset + scrollTop;
|
|
154
|
-
left =
|
|
155
|
+
left = selectionRect.left + scrollLeft
|
|
156
|
+
// left = showInRight ? selectionRect.left + scrollLeft : selectionRect.right - pickerWidth + scrollLeft
|
|
155
157
|
if (placement == 'bottom' || placement == 'top') {
|
|
156
158
|
left = selectionRect.left - (pickerWidth - selectionRect.width) / 2 + scrollLeft
|
|
157
159
|
}
|
|
@@ -161,8 +163,12 @@ export function getPosition(selection, picker, transfer, placement = 'bottom-lef
|
|
|
161
163
|
if (hasTop) {
|
|
162
164
|
placement = placement.replace('top', 'bottom')
|
|
163
165
|
}
|
|
166
|
+
if (!showInRight && showInLeft) {
|
|
167
|
+
left = selectionRect.right - pickerWidth + scrollLeft
|
|
168
|
+
}
|
|
164
169
|
if (!showInRight) {
|
|
165
170
|
placement = placement.replace('left', 'right') //右边放不下去
|
|
171
|
+
// left = selectionRect.right - pickerWidth + scrollLeft
|
|
166
172
|
}
|
|
167
173
|
} else {
|
|
168
174
|
top = selectionRect.height + offset;
|
package/components/base/pop.jsx
CHANGED
|
@@ -101,6 +101,7 @@ export default {
|
|
|
101
101
|
let { placement, trigger, title, preCls, $slots, transfer, color, updateKey } = this, childNode;
|
|
102
102
|
|
|
103
103
|
title = title || getChild($slots.title)
|
|
104
|
+
// console.log(title)
|
|
104
105
|
let okText = this.okText || t('k.pop.ok')
|
|
105
106
|
let cancelText = this.cancelText || t('k.pop.cancel')
|
|
106
107
|
if (this.showPlacementArrow) {
|
|
@@ -113,13 +114,20 @@ export default {
|
|
|
113
114
|
<Button type="primary" size="small" onClick={this.ok}>{okText}</Button>
|
|
114
115
|
</div>
|
|
115
116
|
} else {
|
|
116
|
-
titleNode = title ? <div class={`k-${preCls}-title`}>{title}</div> : null
|
|
117
|
+
titleNode = title.length ? <div class={`k-${preCls}-title`}>{title}</div> : null
|
|
117
118
|
contentNode = $slots.content
|
|
118
119
|
}
|
|
119
|
-
contentNode = contentNode ? <div class={`k-${preCls}-
|
|
120
|
+
contentNode = contentNode ? <div class={`k-${preCls}-body`}>{contentNode}</div> : null;
|
|
120
121
|
|
|
121
|
-
childNode = [
|
|
122
|
-
|
|
122
|
+
childNode = [
|
|
123
|
+
<div class={`k-${preCls}-content`} style={{ backgroundColor: /^#/.test(color) ? color : null }}>
|
|
124
|
+
{[titleNode, contentNode, footerNode]}
|
|
125
|
+
<div class={`k-${preCls}-arrow`}>
|
|
126
|
+
<svg style={{ fill: /^#/.test(color) ? color : 'currentcolor' }} viewBox="0 0 24 7">
|
|
127
|
+
<path d="M24 0V1C20 1 18.5 2 16.5 4C14.5 6 14 7 12 7C10 7 9.5 6 7.5 4C5.5 2 4 1 0 1V0H24Z"></path>
|
|
128
|
+
</svg>
|
|
129
|
+
</div>
|
|
130
|
+
</div>]
|
|
123
131
|
|
|
124
132
|
} else {
|
|
125
133
|
childNode = $slots.content
|
|
@@ -129,7 +137,11 @@ export default {
|
|
|
129
137
|
props: {
|
|
130
138
|
transfer,
|
|
131
139
|
value: this.opened,
|
|
132
|
-
className: [`k-${preCls}
|
|
140
|
+
className: [`k-${preCls}`, {
|
|
141
|
+
[`k-${preCls}-${color}`]: color && !/^#/.test(color),
|
|
142
|
+
[`k-${preCls}-has-color`]: /^#/.test(color),
|
|
143
|
+
[`k-${preCls}-has-arrow`]: this.showPlacementArrow
|
|
144
|
+
}],
|
|
133
145
|
width: this.width,
|
|
134
146
|
selection: this.selection,
|
|
135
147
|
placement,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
disabled: Boolean,
|
|
8
8
|
label: { type: [String, Number] },
|
|
9
9
|
indeterminate: Boolean,
|
|
10
|
-
checked: [Boolean, Number]
|
|
10
|
+
checked: [Boolean, Number],
|
|
11
11
|
},
|
|
12
12
|
model: {
|
|
13
13
|
prop: 'checked',
|
|
@@ -50,23 +50,18 @@ export default {
|
|
|
50
50
|
checked = isChecked
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
|
|
54
|
-
const wpclasses = ["k-checkbox-wrapper", {
|
|
53
|
+
const wpclasses = ["k-checkbox", {
|
|
55
54
|
["k-checkbox-disabled"]: disabled,
|
|
56
55
|
["k-checkbox-checked"]: checked && !indeterminate,
|
|
56
|
+
["k-checkbox-indeterminate"]: indeterminate
|
|
57
57
|
}]
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{
|
|
62
|
-
["k-checkbox-indeterminate"]: indeterminate
|
|
63
|
-
}
|
|
64
|
-
];
|
|
65
|
-
let inner = checked ? <Icon type="checkmark" /> : null
|
|
59
|
+
|
|
60
|
+
let inner = checked ? <Icon type="checkmark-outline" strokeWidth={60} /> : null
|
|
66
61
|
const labelNode = label || $slots.default
|
|
67
62
|
return (
|
|
68
63
|
<label class={wpclasses} onClick={e => e.stopPropagation()}>
|
|
69
|
-
<span class=
|
|
64
|
+
<span class="k-checkbox-symbol">
|
|
70
65
|
<input type="checkbox" class="k-checkbox-input" checked={checked} disabled={disabled} onChange={change} />
|
|
71
66
|
<span class="k-checkbox-inner">{inner}</span>
|
|
72
67
|
</span>
|
|
@@ -30,14 +30,13 @@ export default {
|
|
|
30
30
|
methods: {
|
|
31
31
|
handelCheckAll(e) {
|
|
32
32
|
let checked = e.target.checked
|
|
33
|
-
this.cities = checked ?
|
|
34
|
-
|
|
35
|
-
let length = this.cities.length
|
|
36
|
-
this.indeterminate = length > 0 && length< this.options.length
|
|
33
|
+
this.cities = checked ? this.options.map(v=>v.value) : [];
|
|
37
34
|
},
|
|
38
35
|
change(data) {
|
|
39
|
-
|
|
40
|
-
this.indeterminate =
|
|
36
|
+
let length = this.cities.length
|
|
37
|
+
this.indeterminate = length > 0 && length < this.options.length
|
|
38
|
+
|
|
39
|
+
this.checkAll = length == this.options.length
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@import '../../styles/var.less';
|
|
2
|
-
.k-checkbox
|
|
2
|
+
.k-checkbox {
|
|
3
3
|
cursor: pointer;
|
|
4
4
|
font-size: 12px;
|
|
5
5
|
display: inline-block;
|
|
@@ -7,11 +7,10 @@
|
|
|
7
7
|
line-height: 1;
|
|
8
8
|
color: var(--kui-color-font);
|
|
9
9
|
// margin-right: 16px;
|
|
10
|
-
.k-checkbox {
|
|
10
|
+
.k-checkbox-symbol {
|
|
11
11
|
display: inline-block;
|
|
12
12
|
vertical-align: middle;
|
|
13
13
|
white-space: nowrap;
|
|
14
|
-
cursor: pointer;
|
|
15
14
|
outline: 0;
|
|
16
15
|
line-height: 1;
|
|
17
16
|
position: relative;
|
|
@@ -32,9 +31,9 @@
|
|
|
32
31
|
background-color: var(--kui-color-back);
|
|
33
32
|
transition: border-color .2s ease-in-out, background-color .2s ease-in-out;
|
|
34
33
|
overflow: hidden;
|
|
35
|
-
color:
|
|
34
|
+
color: #fff;
|
|
36
35
|
.k-icon {
|
|
37
|
-
font-size:
|
|
36
|
+
font-size: 14px;
|
|
38
37
|
position: absolute;
|
|
39
38
|
left: 50%;
|
|
40
39
|
top: 50%;
|
|
@@ -50,8 +49,8 @@
|
|
|
50
49
|
left: 0;
|
|
51
50
|
right: 0;
|
|
52
51
|
z-index: 1;
|
|
53
|
-
cursor: pointer;
|
|
54
52
|
opacity: 0;
|
|
53
|
+
cursor: inherit;
|
|
55
54
|
&:focus {
|
|
56
55
|
+.k-checkbox-inner {
|
|
57
56
|
border: 1px solid var(--kui-color-main);
|
|
@@ -59,7 +58,7 @@
|
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
60
|
}
|
|
62
|
-
|
|
61
|
+
&.k-checkbox-indeterminate {
|
|
63
62
|
.k-checkbox-inner {
|
|
64
63
|
// background: var(--kui-color-main);
|
|
65
64
|
// border-color: var(--kui-color-main);
|
|
@@ -89,6 +88,13 @@
|
|
|
89
88
|
}
|
|
90
89
|
}
|
|
91
90
|
|
|
91
|
+
.k-checkbox-light {
|
|
92
|
+
.k-checkbox-inner {
|
|
93
|
+
background-color: var(--kui-color-gray-80);
|
|
94
|
+
border-color: var(--kui-color-gray-80);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
.k-checkbox-checked {
|
|
93
99
|
.k-checkbox-inner {
|
|
94
100
|
background: var(--kui-color-main);
|
|
@@ -99,7 +105,7 @@
|
|
|
99
105
|
.k-checkbox-disabled {
|
|
100
106
|
cursor: not-allowed;
|
|
101
107
|
color: var(--kui-color-disable-color);
|
|
102
|
-
|
|
108
|
+
&.k-checkbox {
|
|
103
109
|
.k-checkbox-input {
|
|
104
110
|
cursor: not-allowed;
|
|
105
111
|
}
|
|
@@ -113,21 +119,21 @@
|
|
|
113
119
|
}
|
|
114
120
|
}
|
|
115
121
|
}
|
|
116
|
-
|
|
122
|
+
&.k-checkbox-indeterminate .k-checkbox-inner:after {
|
|
117
123
|
background-color: var(--kui-color-disable-border);
|
|
118
124
|
}
|
|
119
125
|
}
|
|
120
126
|
|
|
121
127
|
.k-checkbox-group {
|
|
122
128
|
display: inline-block;
|
|
123
|
-
.k-checkbox
|
|
129
|
+
.k-checkbox {
|
|
124
130
|
margin-right: 16px;
|
|
125
131
|
}
|
|
126
132
|
}
|
|
127
133
|
|
|
128
134
|
.k-checkbox-group-vertical {
|
|
129
135
|
display: block;
|
|
130
|
-
.k-checkbox
|
|
136
|
+
.k-checkbox {
|
|
131
137
|
display: block;
|
|
132
138
|
margin-right: 0;
|
|
133
139
|
margin-bottom: 16px;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
<Menu slot="content">
|
|
16
16
|
<MenuItem key="news">New file</MenuItem>
|
|
17
17
|
<MenuItem key="edit">Edit</MenuItem>
|
|
18
|
-
<MenuItem key="save" icon="save
|
|
19
|
-
<MenuItem key="cut" icon="cut
|
|
18
|
+
<MenuItem key="save" icon="save">Save</MenuItem>
|
|
19
|
+
<MenuItem key="cut" icon="cut">Cut</MenuItem>
|
|
20
20
|
<MenuDivider />
|
|
21
21
|
<MenuItem key="exit">Exit</MenuItem>
|
|
22
22
|
</Menu>
|
|
@@ -1,31 +1,27 @@
|
|
|
1
1
|
@import '../../styles/var.less';
|
|
2
|
-
.k-dropdown
|
|
2
|
+
.k-dropdown {
|
|
3
3
|
font-size: 12px;
|
|
4
4
|
line-height: 1.5;
|
|
5
5
|
position: absolute;
|
|
6
6
|
z-index: 1001;
|
|
7
|
-
.k-dropdown-
|
|
7
|
+
.k-dropdown-content {
|
|
8
8
|
background: var(--kui-color-control-10);
|
|
9
9
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
10
10
|
border-radius: var(--kui-border-radius);
|
|
11
|
-
.k-dropdown-menu {
|
|
12
|
-
box-shadow: none;
|
|
13
|
-
}
|
|
14
11
|
}
|
|
12
|
+
.k-dropdown-menu {
|
|
13
|
+
min-width: 150px;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.k-dropdown-has-arrow {
|
|
15
18
|
.k-dropdown-arrow {
|
|
16
19
|
position: absolute;
|
|
17
20
|
box-sizing: border-box;
|
|
18
|
-
overflow: hidden;
|
|
19
21
|
display: flex;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
.k-dropdown-arrow-content {
|
|
24
|
-
background-color: var(--kui-color-control-10);
|
|
25
|
-
transform: rotate(45deg);
|
|
26
|
-
width: 12px;
|
|
27
|
-
height: 12px;
|
|
28
|
-
}
|
|
22
|
+
width: 24px;
|
|
23
|
+
height: 7px;
|
|
24
|
+
color: var(--kui-color-control-10);
|
|
29
25
|
}
|
|
30
26
|
// &[k-placement^=top] {
|
|
31
27
|
// margin-top: -3px;
|
|
@@ -35,14 +31,10 @@
|
|
|
35
31
|
// }
|
|
36
32
|
&[k-placement^=top] {
|
|
37
33
|
.k-dropdown-arrow {
|
|
38
|
-
bottom:
|
|
39
|
-
height:
|
|
40
|
-
.k-dropdown-arrow-content {
|
|
41
|
-
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
|
|
42
|
-
margin-top: -15px;
|
|
43
|
-
}
|
|
34
|
+
bottom: 6px;
|
|
35
|
+
height: 7px;
|
|
44
36
|
}
|
|
45
|
-
.k-dropdown-
|
|
37
|
+
.k-dropdown-body {
|
|
46
38
|
margin-bottom: 12px;
|
|
47
39
|
}
|
|
48
40
|
}
|
|
@@ -54,31 +46,28 @@
|
|
|
54
46
|
}
|
|
55
47
|
&[k-placement=top-right] {
|
|
56
48
|
.k-dropdown-arrow {
|
|
57
|
-
right:
|
|
49
|
+
right: 12px;
|
|
58
50
|
}
|
|
59
51
|
}
|
|
60
52
|
&[k-placement=top-left] {
|
|
61
53
|
.k-dropdown-arrow {
|
|
62
|
-
left:
|
|
54
|
+
left: 12px;
|
|
63
55
|
}
|
|
64
56
|
}
|
|
65
57
|
&[k-placement^=bottom] {
|
|
66
58
|
.k-dropdown-arrow {
|
|
67
|
-
top:
|
|
68
|
-
height:
|
|
69
|
-
|
|
70
|
-
box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
|
|
71
|
-
margin-bottom: -15px;
|
|
72
|
-
}
|
|
59
|
+
top: 6px;
|
|
60
|
+
height: 7px;
|
|
61
|
+
transform: rotate(180deg);
|
|
73
62
|
}
|
|
74
|
-
.k-dropdown-
|
|
63
|
+
.k-dropdown-body {
|
|
75
64
|
margin-top: 12px;
|
|
76
65
|
}
|
|
77
66
|
}
|
|
78
67
|
&[k-placement=bottom] {
|
|
79
68
|
.k-dropdown-arrow {
|
|
80
69
|
left: 50%;
|
|
81
|
-
transform: translateX(-50%);
|
|
70
|
+
transform: translateX(-50%) rotate(180deg);
|
|
82
71
|
}
|
|
83
72
|
}
|
|
84
73
|
&[k-placement=bottom-left] {
|
|
@@ -96,7 +85,7 @@
|
|
|
96
85
|
right: 8px;
|
|
97
86
|
box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.07);
|
|
98
87
|
}
|
|
99
|
-
.k-dropdown-
|
|
88
|
+
.k-dropdown-body {
|
|
100
89
|
margin-right: 12px;
|
|
101
90
|
}
|
|
102
91
|
}
|
|
@@ -121,7 +110,7 @@
|
|
|
121
110
|
left: 8px;
|
|
122
111
|
box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);
|
|
123
112
|
}
|
|
124
|
-
.k-dropdown-
|
|
113
|
+
.k-dropdown-body {
|
|
125
114
|
margin-left: 12px;
|
|
126
115
|
}
|
|
127
116
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<Checkbox v-model="checked" label="Shape"/>
|
|
13
13
|
</FormItem>
|
|
14
14
|
<FormItem label="尺寸">
|
|
15
|
-
<RadioGroup v-model="size" >
|
|
15
|
+
<RadioGroup v-model="size" type="button">
|
|
16
16
|
<RadioButton value="large" label="Large" />
|
|
17
17
|
<RadioButton value="default" label="Default" />
|
|
18
18
|
<RadioButton value="small" label="Small" />
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<div>
|
|
9
|
-
<Icon type="
|
|
9
|
+
<Icon type="heart" />
|
|
10
10
|
<Icon type="logo-kui" size="25" />
|
|
11
|
-
<Icon type="logo-kui" size="30" color="
|
|
11
|
+
<Icon type="logo-kui" size="30" color="red" />
|
|
12
12
|
<Icon type="logo-kui" spin size="25" />
|
|
13
13
|
</div>
|
|
14
14
|
</template>
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<div style="width:512px;">
|
|
9
|
-
<Checkbox label="Shape" v-model="
|
|
9
|
+
<Checkbox label="Shape" v-model="isShape"/>
|
|
10
10
|
<br/>
|
|
11
11
|
<br/>
|
|
12
|
-
<Input placeholder="请输入内容..." @blur="blur" @focus="focus" @change="change" theme="light"/>
|
|
13
|
-
<Input placeholder="disabled..." disabled theme="light"/>
|
|
14
|
-
<Input placeholder="请输入内容..." theme="light" icon="search" :shape="shape
|
|
15
|
-
<Input placeholder="请输入内容..." theme="light" @search="focus" clearable :shape="shape
|
|
12
|
+
<Input placeholder="请输入内容..." @blur="blur" @focus="focus" @change="change" theme="light" :shape="shape"/>
|
|
13
|
+
<Input placeholder="disabled..." disabled theme="light" :shape="shape"/>
|
|
14
|
+
<Input placeholder="请输入内容..." theme="light" icon="search" :shape="shape"/>
|
|
15
|
+
<Input placeholder="请输入内容..." theme="light" @search="focus" clearable :shape="shape"/>
|
|
16
16
|
<TextArea placeholder="请输入内容..." theme="light" :rows="3"/>
|
|
17
17
|
</div>
|
|
18
18
|
</template>
|
|
@@ -20,7 +20,12 @@
|
|
|
20
20
|
export default{
|
|
21
21
|
data(){
|
|
22
22
|
return{
|
|
23
|
-
|
|
23
|
+
isShape :false
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
computed:{
|
|
27
|
+
shape() {
|
|
28
|
+
return this.isShape ? 'circle' : null
|
|
24
29
|
}
|
|
25
30
|
},
|
|
26
31
|
methods:{
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<br/>
|
|
11
11
|
<br/>
|
|
12
12
|
<Menu v-model="current" :open-keys="openKeys" theme="dark" :inline-collapsed="!collapsed" mode="inline">
|
|
13
|
-
<MenuItem key="1-1" icon="mail">Option 1
|
|
13
|
+
<MenuItem key="1-1" icon="mail">Option 1</MenuItem>
|
|
14
14
|
<MenuItem key="1-2" icon="calendar"><span>Option 2</span></MenuItem>
|
|
15
15
|
<SubMenu key="sub2" icon="bar-chart" title="Navigation Two">
|
|
16
16
|
<MenuItem key="2-1">Option 5</MenuItem>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
// margin-right: 8px;
|
|
28
28
|
display: none;
|
|
29
29
|
}
|
|
30
|
-
.k-dropdown-menu-item, .k-dropdown-menu-submenu {
|
|
30
|
+
.k-dropdown-menu-item, .k-dropdown-menu-submenu .k-dropdown-menu-submenu-title {
|
|
31
31
|
line-height: 1;
|
|
32
32
|
font-size: 14px;
|
|
33
33
|
list-style: none;
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
left: 100%;
|
|
80
80
|
}
|
|
81
81
|
.k-dropdown-menu-submenu {
|
|
82
|
-
padding-right: 36px;
|
|
82
|
+
// padding-right: 36px;
|
|
83
83
|
position: relative;
|
|
84
84
|
.k-dropdown-menu-submenu-arrow {
|
|
85
85
|
position: absolute;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
color: var(--kui-color-font);
|
|
14
14
|
// transition: background-color .3s cubic-bezier(.645, .045, .355, 1), width .3s cubic-bezier(.645, .045, .355, 1);
|
|
15
15
|
transition: width .3s cubic-bezier(.645, .045, .355, 1);
|
|
16
|
+
user-select: none;
|
|
16
17
|
ol, ul, li {
|
|
17
18
|
list-style: none !important;
|
|
18
19
|
margin: 0;
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
width: 20px;
|
|
34
35
|
height: 20px;
|
|
35
36
|
margin-right: 8px;
|
|
37
|
+
flex-shrink: 0;
|
|
36
38
|
}
|
|
37
39
|
.k-menu-item-icon, .k-menu-submenu-inner .k-icon {
|
|
38
40
|
margin-right: 8px;
|
|
@@ -51,12 +53,12 @@
|
|
|
51
53
|
height: 14px;
|
|
52
54
|
text-indent: 0;
|
|
53
55
|
}
|
|
54
|
-
.k-icon {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
56
|
+
// .k-icon {
|
|
57
|
+
// &+span {
|
|
58
|
+
// opacity: 1;
|
|
59
|
+
// transition: all .3s cubic-bezier(.645, .045, .355, 1), width .3s cubic-bezier(.645, .045, .355, 1);
|
|
60
|
+
// }
|
|
61
|
+
// }
|
|
60
62
|
&-item, .k-menu-submenu-title {
|
|
61
63
|
cursor: pointer;
|
|
62
64
|
overflow: hidden;
|
|
@@ -94,7 +96,7 @@
|
|
|
94
96
|
color: var(--kui-color-disable-color);
|
|
95
97
|
cursor: not-allowed;
|
|
96
98
|
}
|
|
97
|
-
.k-menu-submenu-inner{
|
|
99
|
+
.k-menu-submenu-inner {
|
|
98
100
|
display: flex;
|
|
99
101
|
align-items: center;
|
|
100
102
|
}
|
|
@@ -121,7 +123,6 @@
|
|
|
121
123
|
list-style: none;
|
|
122
124
|
margin: 0;
|
|
123
125
|
padding: 0;
|
|
124
|
-
|
|
125
126
|
}
|
|
126
127
|
.k-menu-item {
|
|
127
128
|
padding: 10px 12px;
|
|
@@ -162,6 +163,10 @@
|
|
|
162
163
|
}
|
|
163
164
|
.k-menu-submenu-title {
|
|
164
165
|
padding: 10px 36px 10px 12px;
|
|
166
|
+
height: 40px;
|
|
167
|
+
box-sizing: border-box;
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
165
170
|
position: relative;
|
|
166
171
|
margin: 0 8px 8px 8px;
|
|
167
172
|
border-radius: var(--kui-border-radius);
|
|
@@ -178,6 +183,8 @@
|
|
|
178
183
|
}
|
|
179
184
|
.k-menu-submenu-popup {
|
|
180
185
|
transition: all 0.3s cubic-bezier(.215, .61, .355, 1);
|
|
186
|
+
overflow: hidden;
|
|
187
|
+
position: static;
|
|
181
188
|
.k-menu {
|
|
182
189
|
// background-color: var(--kui-color-gray-90);
|
|
183
190
|
}
|
|
@@ -279,8 +286,8 @@
|
|
|
279
286
|
white-space: nowrap;
|
|
280
287
|
font-size: 0;
|
|
281
288
|
line-height: 1;
|
|
282
|
-
.k-menu-icon-temp{
|
|
283
|
-
|
|
289
|
+
.k-menu-icon-temp {
|
|
290
|
+
display: none;
|
|
284
291
|
}
|
|
285
292
|
>.k-menu-item, >.k-menu-submenu {
|
|
286
293
|
line-height: 1;
|
|
@@ -359,7 +366,7 @@
|
|
|
359
366
|
padding: 10px 12px;
|
|
360
367
|
.k-icon {
|
|
361
368
|
// font-size: 16px;
|
|
362
|
-
margin-right: 0;
|
|
369
|
+
// margin-right: 0;
|
|
363
370
|
}
|
|
364
371
|
}
|
|
365
372
|
&>.k-menu-submenu>.k-menu-submenu-title>.k-menu-submenu-arrow {
|
|
@@ -367,9 +374,10 @@
|
|
|
367
374
|
}
|
|
368
375
|
.k-icon {
|
|
369
376
|
&+span {
|
|
370
|
-
width: 0;
|
|
377
|
+
// width: 0;
|
|
371
378
|
opacity: 0;
|
|
372
|
-
display: inline-block;
|
|
379
|
+
// display: inline-block;
|
|
380
|
+
animation: toa .3s;
|
|
373
381
|
}
|
|
374
382
|
}
|
|
375
383
|
}
|
|
@@ -378,7 +386,16 @@
|
|
|
378
386
|
}
|
|
379
387
|
}
|
|
380
388
|
|
|
381
|
-
|
|
389
|
+
@keyframes toa {
|
|
390
|
+
from {
|
|
391
|
+
opacity: 1;
|
|
392
|
+
}
|
|
393
|
+
to {
|
|
394
|
+
opacity: 0;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.k-menu-submenu-popup {
|
|
382
399
|
position: absolute;
|
|
383
400
|
z-index: 1001;
|
|
384
401
|
>.k-menu-submenu-popup {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<cn>
|
|
2
|
+
#### 自定图标
|
|
3
|
+
自定图标。
|
|
4
|
+
</cn>
|
|
5
|
+
|
|
6
|
+
```vue
|
|
7
|
+
<template>
|
|
8
|
+
<div>
|
|
9
|
+
<Button @click="alipay" icon="logo-alipay"></Button>
|
|
10
|
+
<Button @click="wechat" icon="logo-wechat"></Button>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
<script>
|
|
14
|
+
let count = 0
|
|
15
|
+
export default{
|
|
16
|
+
methods:{
|
|
17
|
+
alipay() {
|
|
18
|
+
this.$Message.config({
|
|
19
|
+
icon:'logo-alipay',
|
|
20
|
+
content:"支付宝到账100万"
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
wechat() {
|
|
24
|
+
this.$Message.config({
|
|
25
|
+
color:'green',
|
|
26
|
+
icon:'logo-wechat',
|
|
27
|
+
content:"微信收款100万"
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</script>
|
|
33
|
+
```
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Info from './info'
|
|
3
3
|
import Base from './base'
|
|
4
|
+
import Icon from './icon'
|
|
4
5
|
import Types from './types'
|
|
5
6
|
import Close from './close'
|
|
6
7
|
import CN from '../index.md'
|
|
@@ -10,6 +11,7 @@ export default {
|
|
|
10
11
|
<div>
|
|
11
12
|
<Info class="typo" />
|
|
12
13
|
<Base />
|
|
14
|
+
<Icon />
|
|
13
15
|
<Types />
|
|
14
16
|
<Close />
|
|
15
17
|
<CN class="typo"/>
|