kui-vue 3.2.10 → 3.2.11
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/number.js +177 -0
- package/components/_tool/utils.js +9 -3
- package/components/base/input.jsx +82 -54
- package/components/base/pop.jsx +22 -8
- package/components/button/button.jsx +1 -1
- package/components/button/styles/index.less +6 -2
- package/components/checkbox/checkbox.jsx +6 -11
- package/components/checkbox/demo/check-all.md +6 -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 +7 -1
- package/components/form/demo/valid.md +13 -4
- package/components/form/styles/index.less +1 -5
- package/components/icon/demo/base.md +2 -2
- package/components/icon/demo/search.vue +31 -14
- package/components/icon/icon.jsx +3 -1
- package/components/icon/styles/index.less +1 -1
- package/components/index.js +2 -0
- package/components/input/demo/icon.md +2 -2
- package/components/input/demo/size.md +3 -3
- package/components/input/demo/suffix.md +13 -6
- package/components/input/demo/theme.md +11 -6
- package/components/input/index.md +2 -1
- package/components/input/input.jsx +5 -0
- package/components/input/styles/index.less +52 -63
- package/components/inputNumber/demo/base.md +34 -0
- package/components/inputNumber/demo/ffix.md +27 -0
- package/components/inputNumber/demo/format.md +80 -0
- package/components/inputNumber/demo/index.vue +23 -0
- package/components/inputNumber/demo/info.md +7 -0
- package/components/inputNumber/demo/size.md +18 -0
- package/components/inputNumber/index.js +2 -0
- package/components/inputNumber/index.md +16 -0
- package/components/inputNumber/inputNumber.jsx +169 -0
- package/components/inputNumber/styles/index.less +172 -0
- 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 +61 -29
- 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/skeleton/demo/custom.md +62 -0
- package/components/skeleton/demo/index.vue +2 -0
- package/components/skeleton/demo/items.md +6 -2
- package/components/skeleton/index.md +32 -12
- package/components/skeleton/skeleton.jsx +1 -3
- package/components/skeleton/skeletonAvatar.jsx +33 -7
- package/components/skeleton/skeletonButton.jsx +29 -4
- package/components/skeleton/skeletonImage.jsx +43 -6
- package/components/skeleton/skeletonText.jsx +29 -4
- package/components/slider/demo/base.md +7 -15
- package/components/slider/demo/formatter.md +19 -0
- package/components/slider/demo/index.vue +10 -1
- package/components/slider/demo/marks.md +42 -0
- package/components/slider/demo/reverse.md +26 -0
- package/components/slider/demo/vertical.md +26 -3
- package/components/slider/demo/withNumber.md +43 -0
- package/components/slider/index.md +15 -6
- package/components/slider/slider.jsx +173 -41
- package/components/slider/styles/index.less +109 -44
- package/components/slider/thumb.jsx +165 -0
- package/components/space/demo/align.md +22 -21
- package/components/space/demo/base.md +0 -1
- package/components/space/demo/index.vue +2 -0
- package/components/space/demo/size.md +34 -22
- package/components/space/demo/vertical.md +1 -1
- package/components/space/demo/wrap.md +12 -0
- package/components/space/index.md +6 -5
- package/components/space/space.jsx +40 -35
- package/components/space/styles/index.less +15 -0
- package/components/spin/demo/mode.md +6 -4
- package/components/spin/spin.jsx +1 -1
- package/components/styles/index.less +1 -0
- 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/table/styles/index.less +9 -10
- package/components/tooltip/styles/index.less +103 -76
- package/components/tooltip/tooltip.jsx +3 -0
- 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
|
@@ -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" />
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
<FormItem label="Input">
|
|
22
22
|
<Input placeholder="input..."/>
|
|
23
23
|
</FormItem>
|
|
24
|
+
<FormItem label="InputNumber">
|
|
25
|
+
<InputNumber placeholder="inputnumber..."/>
|
|
26
|
+
</FormItem>
|
|
24
27
|
<FormItem label="Select">
|
|
25
28
|
<Select >
|
|
26
29
|
<Option value="0" label="Apple" />
|
|
@@ -28,6 +31,9 @@
|
|
|
28
31
|
<Option value="2" label="Orange" />
|
|
29
32
|
</Select>
|
|
30
33
|
</FormItem>
|
|
34
|
+
<FormItem label="Slider">
|
|
35
|
+
<Slider placeholder="slider..."/>
|
|
36
|
+
</FormItem>
|
|
31
37
|
<FormItem label="DatePicker">
|
|
32
38
|
<DatePicker />
|
|
33
39
|
</FormItem>
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
<FormItem label="E-mail" prop="email">
|
|
18
18
|
<Input clearable />
|
|
19
19
|
</FormItem>
|
|
20
|
+
<FormItem label="Number" prop="number">
|
|
21
|
+
<InputNumber />
|
|
22
|
+
</FormItem>
|
|
20
23
|
<FormItem label="Password" prop="password">
|
|
21
24
|
<Input type="password" />
|
|
22
25
|
</FormItem>
|
|
@@ -28,10 +31,10 @@
|
|
|
28
31
|
</FormItem>
|
|
29
32
|
<FormItem label="Captcha" prop="captcha">
|
|
30
33
|
<Input >
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
<template slot="suffix">
|
|
35
|
+
<Button size="small" type="primary" v-if="time==60" @click="sendCode">获取验证码</Button>
|
|
36
|
+
<span v-else>{{time}}(s)</span>
|
|
37
|
+
</template>
|
|
35
38
|
</Input>
|
|
36
39
|
</FormItem>
|
|
37
40
|
<FormItem label="Country">
|
|
@@ -119,6 +122,7 @@ export default {
|
|
|
119
122
|
size:'default',
|
|
120
123
|
form: {
|
|
121
124
|
email: '',
|
|
125
|
+
number:'',
|
|
122
126
|
password: '',
|
|
123
127
|
repassword: '',
|
|
124
128
|
phone: '',
|
|
@@ -140,6 +144,10 @@ export default {
|
|
|
140
144
|
{ type: 'mail', message: '请输入有效的电子邮箱' },
|
|
141
145
|
{ required: true, message: '请输入电子邮箱' },
|
|
142
146
|
],
|
|
147
|
+
number:[
|
|
148
|
+
{ type: 'number', message: '请输入有效的请输入数字' },
|
|
149
|
+
{ required: true, message: '请输入数字' },
|
|
150
|
+
],
|
|
143
151
|
password: [
|
|
144
152
|
{ min: 8, max: 20, message: '密码长度请控制在8-20位之间', trigger: 'blur' },
|
|
145
153
|
{ required: true, message: '请输入密码' },
|
|
@@ -208,6 +216,7 @@ export default {
|
|
|
208
216
|
captcha: '8888',
|
|
209
217
|
gender: '1',
|
|
210
218
|
slider:5,
|
|
219
|
+
number:5,
|
|
211
220
|
system: '0',
|
|
212
221
|
one: true,
|
|
213
222
|
birthday: '1995-05-05',
|
|
@@ -71,17 +71,13 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
.k-form-item-error {
|
|
74
|
-
.k-input, .k-textarea, .k-datepicker
|
|
74
|
+
.k-input, .k-textarea, .k-datepicker, .k-input-number {
|
|
75
75
|
border: 1px solid var(--kui-color-danger);
|
|
76
76
|
&:focus {
|
|
77
77
|
border: 1px solid var(--kui-color-danger);
|
|
78
78
|
box-shadow: 0 0 5px var(--kui-color-danger-30);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
.k-input-wrapper .k-input{
|
|
82
|
-
border: none;
|
|
83
|
-
box-shadow: none;
|
|
84
|
-
}
|
|
85
81
|
.k-select {
|
|
86
82
|
.k-select-selection {
|
|
87
83
|
border: 1px solid var(--kui-color-danger);
|
|
@@ -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>
|
|
@@ -3,8 +3,16 @@
|
|
|
3
3
|
<h3>图标快速检索</h3>
|
|
4
4
|
<br />
|
|
5
5
|
<Affix :offsetTop="55">
|
|
6
|
-
<Input placeholder="输入英文关键字,搜索图标,点击图标即可复制"
|
|
7
|
-
|
|
6
|
+
<Input placeholder="输入英文关键字,搜索图标,点击图标即可复制"
|
|
7
|
+
icon="logo-kui"
|
|
8
|
+
v-model="key"
|
|
9
|
+
size="large"
|
|
10
|
+
@input="search"
|
|
11
|
+
clearable
|
|
12
|
+
style="width:80%;margin:0 10%;background:var(--kui-color-back);">
|
|
13
|
+
<RadioGroup v-model="type"
|
|
14
|
+
@change="switchIcon"
|
|
15
|
+
slot="suffix">
|
|
8
16
|
<RadioButton value="outline">Outline</RadioButton>
|
|
9
17
|
<RadioButton value="filled">Filled</RadioButton>
|
|
10
18
|
</RadioGroup>
|
|
@@ -20,26 +28,32 @@
|
|
|
20
28
|
</div>
|
|
21
29
|
<br />
|
|
22
30
|
<div class="icon-item">
|
|
23
|
-
<span @click.stop="copy(x)"
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
<span @click.stop="copy(x)"
|
|
32
|
+
v-for="(x,y) in showIcons"
|
|
33
|
+
:key="y">
|
|
34
|
+
<Icon :type="x" />
|
|
35
|
+
<!-- <svg width="1em" height="1em">
|
|
26
36
|
<use :xlink:href="`${sprite}#${x}`"></use>
|
|
27
|
-
</svg>
|
|
37
|
+
</svg> -->
|
|
28
38
|
</span>
|
|
29
39
|
</div>
|
|
30
40
|
</template>
|
|
31
41
|
<template v-if="logo.length">
|
|
32
42
|
<h3>Logos</h3>
|
|
33
43
|
<div class="icon-item">
|
|
34
|
-
<span @click.stop="copy(x)"
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
<span @click.stop="copy(x)"
|
|
45
|
+
v-for="(x,y) in logo"
|
|
46
|
+
:key="y">
|
|
47
|
+
<Icon :type="x" />
|
|
48
|
+
<!-- <svg width="1em"
|
|
49
|
+
height="1em">
|
|
37
50
|
<use :xlink:href="`${sprite}#${x}`"></use>
|
|
38
|
-
</svg>
|
|
51
|
+
</svg> -->
|
|
39
52
|
</span>
|
|
40
53
|
</div>
|
|
41
54
|
</template>
|
|
42
|
-
<h3 v-if="!showIcons.length && !logo.length"
|
|
55
|
+
<h3 v-if="!showIcons.length && !logo.length"
|
|
56
|
+
style="text-align:center;padding-bottom:50px;color:#888;">
|
|
43
57
|
No results for "{{key}}"
|
|
44
58
|
</h3>
|
|
45
59
|
</div>
|
|
@@ -56,7 +70,10 @@
|
|
|
56
70
|
height: 80px;
|
|
57
71
|
line-height: 80px;
|
|
58
72
|
color: var(--kui-color-font);
|
|
59
|
-
float: left;
|
|
73
|
+
// float: left;
|
|
74
|
+
display: inline-flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
justify-content: center;
|
|
60
77
|
font-size: 32px;
|
|
61
78
|
cursor: pointer;
|
|
62
79
|
transition: color 0.3s ease-in-out;
|
|
@@ -70,7 +87,7 @@
|
|
|
70
87
|
</style>
|
|
71
88
|
<script>
|
|
72
89
|
import icons from 'kui-icons'
|
|
73
|
-
import sprite from 'kui-icons/lib/sprite.svg'
|
|
90
|
+
// import sprite from 'kui-icons/lib/sprite.svg'
|
|
74
91
|
// import icons from '../lib/kui-icons'
|
|
75
92
|
// import sprite from '../lib/sprite.svg'
|
|
76
93
|
|
|
@@ -82,7 +99,7 @@ let logos = iconKeys.filter(x => /logo-/.test(x)),
|
|
|
82
99
|
export default {
|
|
83
100
|
data() {
|
|
84
101
|
return {
|
|
85
|
-
sprite,
|
|
102
|
+
// sprite,
|
|
86
103
|
key: '',
|
|
87
104
|
type: 'outline',
|
|
88
105
|
logo: logos,
|
package/components/icon/icon.jsx
CHANGED
|
@@ -36,9 +36,11 @@ export default {
|
|
|
36
36
|
const { $listeners, type, spin, color, size } = this
|
|
37
37
|
const classes = ['k-icon', { 'k-load-loop': spin }];
|
|
38
38
|
const styles = {
|
|
39
|
-
fontSize: `${size}px`,
|
|
40
39
|
color
|
|
41
40
|
};
|
|
41
|
+
if (size) {
|
|
42
|
+
styles.fontSize = `${size}px`
|
|
43
|
+
}
|
|
42
44
|
|
|
43
45
|
const props = {
|
|
44
46
|
style: styles,
|
package/components/index.js
CHANGED
|
@@ -20,6 +20,7 @@ import { Form, FormItem } from './form'
|
|
|
20
20
|
import { Image, ImageGroup } from './image'
|
|
21
21
|
import Icon from './icon'
|
|
22
22
|
import { Input, TextArea } from './input'
|
|
23
|
+
import InputNumber from './inputNumber'
|
|
23
24
|
import { Layout, Header, Footer, Content, Sider } from './layout'
|
|
24
25
|
import Loading from './loading'
|
|
25
26
|
import Modal from './modal'
|
|
@@ -77,6 +78,7 @@ const components = {
|
|
|
77
78
|
Icon,
|
|
78
79
|
ImageGroup,
|
|
79
80
|
Input, TextArea,
|
|
81
|
+
InputNumber,
|
|
80
82
|
Menu, MenuGroup, MenuItem, MenuDivider, SubMenu,
|
|
81
83
|
Modal,
|
|
82
84
|
Message,
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
<template>
|
|
8
8
|
<div style="width:512px;">
|
|
9
9
|
<Input placeholder="User Name..." icon="person" />
|
|
10
|
-
<Input type="password" placeholder="Password..." icon="lock-closed"
|
|
11
|
-
<Input placeholder="请输入关进行搜索键字..."
|
|
10
|
+
<Input type="password" placeholder="Password..." icon="lock-closed" />
|
|
11
|
+
<Input placeholder="请输入关进行搜索键字..." @search="search"/>
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
14
14
|
<script>
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<div style="width:512px;">
|
|
9
|
-
<Input placeholder="Large Input" size="large" icon="logo-kui"
|
|
10
|
-
<Input placeholder="Base Input" icon="logo-kui" clearable
|
|
11
|
-
<Input size="small" placeholder="Small Input" icon="logo-kui" @icon-click="$Message.info('点击图标事件')" clearable
|
|
9
|
+
<Input placeholder="Large Input" size="large" icon="logo-kui" clearable/>
|
|
10
|
+
<Input placeholder="Base Input" icon="logo-kui" clearable />
|
|
11
|
+
<Input size="small" placeholder="Small Input" icon="logo-kui" @icon-click="$Message.info('点击图标事件')" clearable />
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
14
14
|
```
|
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
<cn>
|
|
2
|
-
####
|
|
3
|
-
suffix 扩展
|
|
2
|
+
#### 扩展, 前缀和后缀
|
|
3
|
+
suffix,prefix 扩展
|
|
4
4
|
</cn>
|
|
5
5
|
|
|
6
6
|
```vue
|
|
7
7
|
<template>
|
|
8
8
|
<div style="width:256px;">
|
|
9
|
-
<Input placeholder="请输入验证码" icon="disc"
|
|
9
|
+
<Input placeholder="请输入验证码" icon="disc" :maxlength="8">
|
|
10
10
|
<template slot="suffix">
|
|
11
|
-
<
|
|
11
|
+
<Button size="small" type="primary" v-if="time==60" @click="sendCode">获取验证码</Button>
|
|
12
12
|
<span v-else>{{time}}(s)</span>
|
|
13
13
|
</template>
|
|
14
14
|
</Input>
|
|
15
|
-
<Input placeholder="请填写你要喝的Coffee" icon="cafe"
|
|
15
|
+
<Input placeholder="请填写你要喝的Coffee" icon="cafe">
|
|
16
16
|
<template slot="suffix">
|
|
17
17
|
<Tooltip title="此处如果不知道怎么填,请咨询管理员">
|
|
18
18
|
<Icon type="information-circle-outline" color="orange"/>
|
|
19
19
|
</Tooltip>
|
|
20
20
|
</template>
|
|
21
21
|
</Input>
|
|
22
|
-
<Input placeholder="
|
|
22
|
+
<Input placeholder="请输入手机号码">
|
|
23
|
+
<Select :bordered="false"style="width:80px;" slot="prefix" value="0">
|
|
24
|
+
<Option value="0" label="+86"/>
|
|
25
|
+
<Option value="1" label="+52"/>
|
|
26
|
+
</Select>
|
|
27
|
+
</Input>
|
|
28
|
+
<Input placeholder="请输入金额" suffix="元" prefix="$"/>
|
|
29
|
+
<Input placeholder="请输入域名" suffix=".com" prefix="https://"/>
|
|
23
30
|
<Input placeholder="请输入金额" suffix=".00"/>
|
|
24
31
|
</div>
|
|
25
32
|
</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:{
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
| value | 绑定的值,可使用 `v-model` 双向绑定 | String 、 Number | - |
|
|
5
5
|
| size | 按钮尺寸,可选值 `small`、`large`,默认不选 | String | - |
|
|
6
6
|
| icon | 输入框图标 | String | - |
|
|
7
|
-
| suffix |
|
|
7
|
+
| suffix | 扩展后缀 | String,Slot | - |
|
|
8
|
+
| prefix | 扩展前缀 | String,Slot | - |
|
|
8
9
|
| search | 搜索事件的回调 | Function | right |
|
|
9
10
|
| theme | theme='light' 时呈现浅色主题 | String | right |
|
|
10
11
|
| clearable | 是否现示清除按钮 | Boolen | false |
|
|
@@ -19,6 +19,8 @@ export default {
|
|
|
19
19
|
},
|
|
20
20
|
icon: String,
|
|
21
21
|
suffix: String,
|
|
22
|
+
prefix: String,
|
|
23
|
+
disabled: Boolean,
|
|
22
24
|
theme: {
|
|
23
25
|
type: String,
|
|
24
26
|
default: 'solid',
|
|
@@ -45,6 +47,9 @@ export default {
|
|
|
45
47
|
<template slot="suffix">
|
|
46
48
|
{this.$slots.suffix}
|
|
47
49
|
</template>
|
|
50
|
+
<template slot="prefix">
|
|
51
|
+
{this.$slots.prefix}
|
|
52
|
+
</template>
|
|
48
53
|
</BaseInput>
|
|
49
54
|
}
|
|
50
55
|
}
|