kui-vue 3.3.12 → 3.4.1

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.
Files changed (48) hide show
  1. package/components/_tool/transfer.js +5 -5
  2. package/components/_tool/utils.js +0 -135
  3. package/components/base/drop.jsx +230 -17
  4. package/components/base/pop.jsx +1 -1
  5. package/components/button/styles/index.less +1 -0
  6. package/components/checkbox/styles/index.less +7 -3
  7. package/components/colorPicker/colorpicker.jsx +4 -3
  8. package/components/colorPicker/styles/index.less +16 -25
  9. package/components/datePicker/datepicker.jsx +5 -2
  10. package/components/datePicker/index.md +0 -1
  11. package/components/datePicker/styles/datepicker.less +1 -0
  12. package/components/drawer/demo/form.md +4 -2
  13. package/components/drawer/styles/index.less +9 -2
  14. package/components/dropdown/index.md +0 -1
  15. package/components/dropdown/styles/index.less +4 -0
  16. package/components/form/demo/align.md +1 -1
  17. package/components/form/demo/base.md +1 -1
  18. package/components/form/demo/dynamicvalid.md +1 -1
  19. package/components/form/demo/length.md +2 -2
  20. package/components/form/demo/valid.md +2 -2
  21. package/components/input/styles/index.less +29 -20
  22. package/components/inputNumber/styles/index.less +3 -3
  23. package/components/menu/demo/inline.md +4 -4
  24. package/components/menu/styles/index.less +1 -1
  25. package/components/popconfirm/index.md +0 -1
  26. package/components/popconfirm/styles/index.less +4 -2
  27. package/components/poptip/demo/closeinside.md +1 -1
  28. package/components/poptip/index.md +1 -2
  29. package/components/poptip/styles/index.less +10 -5
  30. package/components/radio/styles/index.less +22 -3
  31. package/components/rate/styles/index.less +9 -1
  32. package/components/select/demo/base.md +1 -1
  33. package/components/select/demo/multiple.md +1 -1
  34. package/components/select/demo/theme.md +11 -13
  35. package/components/select/index.md +0 -1
  36. package/components/select/select.jsx +64 -34
  37. package/components/select/styles/index.less +144 -128
  38. package/components/styles/color.less +17 -12
  39. package/components/styles/var.less +7 -0
  40. package/components/table/demo/edit.md +34 -12
  41. package/components/table/styles/index.less +87 -38
  42. package/components/table/table.jsx +1 -1
  43. package/components/tooltip/index.md +1 -4
  44. package/components/tooltip/styles/index.less +8 -4
  45. package/dist/k-ui.css +2 -2
  46. package/dist/k-ui.js +2 -2
  47. package/package.json +2 -2
  48. /package/{README.md → readme.md} +0 -0
@@ -3,6 +3,7 @@
3
3
  .k-drawer {
4
4
  position: fixed;
5
5
  z-index: 1002;
6
+ top: 0;
6
7
  .k-drawer-mask {
7
8
  position: fixed;
8
9
  top: 0;
@@ -14,6 +15,7 @@
14
15
  width: 100%;
15
16
  z-index: 1000; // animation: mmask .5s ease-in-out;
16
17
  overflow: hidden;
18
+ pointer-events: none;
17
19
  }
18
20
  .k-drawer-box {
19
21
  position: absolute;
@@ -43,13 +45,18 @@
43
45
  text-align: center;
44
46
  top: 0;
45
47
  transition: all .3s ease-in-out;
48
+
46
49
  &:hover {
47
- color: var(--kui-color-danger);
50
+ .k-icon{
51
+ color: var(--kui-color-danger);
52
+ background-color: var(--kui-color-gray-80);
53
+ border-radius: var(--kui-border-radius);
54
+ }
48
55
  // transform: rotate(360deg);
49
56
  }
50
57
  }
51
58
  .k-drawer-header {
52
- border-bottom: 1px solid var(--kui-color-gray-80);
59
+ border-bottom: 1px solid var(--kui-color-border);
53
60
  padding: 14px 35px 14px 16px;
54
61
  line-height: 1;
55
62
  font-size: 14px;
@@ -4,5 +4,4 @@
4
4
  | value | 默认是否显示下拉,可使用v-model绑定 | Boolean | hover |
5
5
  | trigger | 触发方式,支持hover(默认), click, custom 3种方式 | String | hover |
6
6
  | placement | 菜单弹出位置:bottomLeft bottomCenter bottomRight topLeft topCenter topRight | String | bottom-left |
7
- | transfer | 默认渲染到body 上,如定位有问题,请尝试修改为 false | Boolean | true |
8
7
  | showPlacementArrow | 是否显示菜单箭头 | Boolean | false |
@@ -15,6 +15,10 @@
15
15
  .k-dropdown-menu {
16
16
  min-width: 150px;
17
17
  }
18
+
19
+ .k-dropdown-menu-item-icon {
20
+ margin-right: 8px;
21
+ }
18
22
  }
19
23
 
20
24
  .k-dropdown-has-arrow {
@@ -18,7 +18,7 @@
18
18
  <Input />
19
19
  </FormItem>
20
20
  <FormItem label="Select">
21
- <Select >
21
+ <Select style="width:100%">
22
22
  <Option value="0" label="Apple" />
23
23
  <Option value="1" label="Banana" />
24
24
  <Option value="2" label="Orange" />
@@ -25,7 +25,7 @@
25
25
  <InputNumber placeholder="inputnumber..."/>
26
26
  </FormItem>
27
27
  <FormItem label="Select">
28
- <Select >
28
+ <Select style="width:100%;">
29
29
  <Option value="0" label="Apple" />
30
30
  <Option value="1" label="Banana" />
31
31
  <Option value="2" label="Orange" />
@@ -24,7 +24,7 @@
24
24
  { required: true, message: '请输入性别' }
25
25
  ]"
26
26
  >
27
- <Select clearable>
27
+ <Select clearable style="width:100%;">
28
28
  <Option value="1" label="男" />
29
29
  <Option value="0" label="女" />
30
30
  </Select>
@@ -27,13 +27,13 @@
27
27
  </FormItem>
28
28
  <FormItem label="Country">
29
29
  <FormItem prop="country">
30
- <Select clearable>
30
+ <Select clearable style="width:100%;">
31
31
  <Option value="0" label="China" />
32
32
  <Option value="1" label="Russia" />
33
33
  </Select>
34
34
  </FormItem>
35
35
  <FormItem prop="city">
36
- <Select clearable>
36
+ <Select clearable style="width:100%;">
37
37
  <Option value="0" label="Shanghai" />
38
38
  <Option value="1" label="Wuhan" />
39
39
  <Option value="2" label="Hangzhou" />
@@ -39,13 +39,13 @@
39
39
  </FormItem>
40
40
  <FormItem label="Country">
41
41
  <FormItem prop="country">
42
- <Select clearable >
42
+ <Select clearable style="width:100%">
43
43
  <Option value="0" label="China" />
44
44
  <Option value="1" label="Russia" />
45
45
  </Select>
46
46
  </FormItem>
47
47
  <FormItem prop="city">
48
- <Select clearable >
48
+ <Select clearable style="width:100%">
49
49
  <Option value="0" label="Shanghai" />
50
50
  <Option value="1" label="Wuhan" />
51
51
  <Option value="2" label="Hangzhou" />
@@ -10,16 +10,23 @@
10
10
  align-items: center;
11
11
  border: 1px solid var(--kui-color-border);
12
12
  border-radius: var(--kui-border-radius);
13
+ background-color: var(--kui-color-back);
13
14
  transition: all .3s ease-in-out;
14
15
  box-sizing: border-box;
15
16
  font-size: 14px;
16
17
  padding: 0 8px;
17
- gap: 8px;
18
+ gap: 6px;
19
+ height: 32px;
20
+ overflow: hidden;
18
21
 
19
22
  &:hover {
20
23
  border-color: var(--kui-color-main);
21
24
  }
22
25
 
26
+ .k-select {
27
+ padding-left: 0;
28
+ }
29
+
23
30
  .k-input-icon {
24
31
  font-size: 16px;
25
32
  color: var(--kui-color-icon);
@@ -32,9 +39,9 @@
32
39
  .k-input-text {
33
40
  padding-left: 0;
34
41
  border: none;
35
- height: 30px;
36
- line-height: 1.5;
37
- padding: 4px 0;
42
+ // height: 30px;
43
+ line-height: 1;
44
+ padding: 0;
38
45
  font-size: 14px;
39
46
  color: var(--kui-color-font);
40
47
  background-color: transparent;
@@ -90,19 +97,20 @@
90
97
  display: inline-block;
91
98
  width: 100%;
92
99
  height: 32px;
93
- line-height: 1.5;
94
100
  padding: 4px 10px;
95
101
  font-size: 14px;
96
102
  margin: 0;
97
103
  border: 1px solid var(--kui-color-border);
98
104
  border-radius: var(--kui-border-radius);
99
105
  color: var(--kui-color-font);
100
- background-color: transparent;
106
+ // background-color: transparent;
107
+ background-color: var(--kui-color-back);
101
108
  background-image: none;
102
109
  position: relative;
103
110
  cursor: text;
104
- transition: all .3s ease-in-out;
111
+ transition: border .3s ease-in-out;
105
112
  flex-shrink: 0;
113
+
106
114
  &:focus {
107
115
  // box-shadow: 0 0 5px rgba(59, 180, 242, 0.55);
108
116
  box-shadow: 0 0 0 2px var(--kui-color-main-90);
@@ -154,10 +162,12 @@ select:-webkit-autofill:focus {
154
162
 
155
163
  .k-textarea {
156
164
  max-width: 100%;
165
+ min-height: 32px;
157
166
  height: auto;
158
167
  vertical-align: bottom;
159
168
  font-size: 14px;
160
- resize: none;
169
+ line-height: 1.5;
170
+ resize: vertical;
161
171
  outline: none;
162
172
  }
163
173
 
@@ -185,21 +195,19 @@ select:-webkit-autofill:focus {
185
195
  }
186
196
 
187
197
  .k-input-sm[single] {
188
- padding: 2px 7px;
189
- height: 22px;
190
- line-height: 22px;
198
+ padding: 2px 4px;
199
+ height: 24px;
191
200
  font-size: 12px;
192
201
  }
193
202
 
194
203
  .k-input-sm[mult] {
195
- padding: 0 6px;
196
- gap: 6px;
204
+ padding: 0 4px;
205
+ gap: 4px;
206
+ height: 24px;
197
207
 
198
208
  .k-input-text {
199
209
  font-size: 12px;
200
210
  padding: 2px 0;
201
- height: 22px;
202
- line-height: 22px;
203
211
  }
204
212
 
205
213
  .k-input-clearable {
@@ -207,7 +215,7 @@ select:-webkit-autofill:focus {
207
215
  }
208
216
 
209
217
  .k-input-icon {
210
- font-size: 16px;
218
+ font-size: 14px;
211
219
  }
212
220
 
213
221
  .k-input-suffix {
@@ -220,15 +228,14 @@ select:-webkit-autofill:focus {
220
228
  .k-input-lg[single] {
221
229
  padding: 2px 10px;
222
230
  height: 38px;
223
- line-height: 38px;
224
231
  font-size: 16px;
225
232
  }
226
233
 
227
234
  .k-input-lg[mult] {
235
+ height: 38px;
236
+
228
237
  .k-input-text {
229
238
  padding: 2px 0;
230
- height: 38px;
231
- line-height: 38px;
232
239
  font-size: 16px;
233
240
  }
234
241
 
@@ -258,11 +265,13 @@ select:-webkit-autofill:focus {
258
265
  .k-input-light[mult],
259
266
  .k-input-light[single],
260
267
  .k-textarea-light {
261
- border: none;
268
+ border-color: transparent;
262
269
  background-color: var(--kui-color-gray-80);
263
270
 
264
271
  &:focus,
272
+ &:hover,
265
273
  &.k-input-focus {
274
+ border-color: transparent;
266
275
  box-shadow: none;
267
276
  }
268
277
  }
@@ -10,6 +10,7 @@
10
10
  align-items: center;
11
11
  border: 1px solid var(--kui-color-border);
12
12
  border-radius: var(--kui-border-radius);
13
+ background-color: var(--kui-color-back);
13
14
  transition: all .3s ease-in-out;
14
15
  box-sizing: border-box;
15
16
  gap: 8px;
@@ -141,10 +142,9 @@
141
142
  }
142
143
 
143
144
  .k-input-number-text {
144
- padding: 2px 0;
145
- height: 22px;
146
- line-height: 22px;
145
+ line-height: 1;
147
146
  font-size: 12px;
147
+ height: 22px;
148
148
  }
149
149
 
150
150
  .k-input-number-clearable {
@@ -8,10 +8,10 @@
8
8
  <div style="width:256px">
9
9
  <Menu v-model="current" :open-keys="openKeys" mode="inline">
10
10
  <SubMenu key="sub1" :icon="Mail" title="Navigation One">
11
- <MenuItem key="1-1">Option 1</MenuItem>
12
- <MenuItem key="1-2">Option 2</MenuItem>
13
- <MenuItem key="1-3">Option 3</MenuItem>
14
- <MenuItem key="1-4">Option 4</MenuItem>
11
+ <MenuItem key="1-1" :icon="Heart">Option 1</MenuItem>
12
+ <MenuItem key="1-2" :icon="Heart">Option 2</MenuItem>
13
+ <MenuItem key="1-3" :icon="Heart">Option 3</MenuItem>
14
+ <MenuItem key="1-4" :icon="Heart">Option 4</MenuItem>
15
15
  </SubMenu>
16
16
  <SubMenu key="sub2" :icon="Heart" title="Navigation Two">
17
17
  <MenuItem key="2-1">Option 5</MenuItem>
@@ -21,7 +21,7 @@
21
21
  // content: "";
22
22
  // display: table;
23
23
  // }
24
- .k-menu-item-divider {
24
+ &-item-divider {
25
25
  height: 1px;
26
26
  margin: 4px 0;
27
27
  overflow: hidden;
@@ -4,7 +4,6 @@
4
4
  | title | 显示的标题 | String,Slots | - |
5
5
  | placement | 提示框出现的位置,可选值为`top`,`top-left`,`top-right`,`bottom`,`bottom-left`,`bottom-right`,`left`,`left-top`,`left-bottom`,`right`,`right-top`,`right-bottom` | String | top |
6
6
  | width | 展示的宽度,默认为内容区域的大小 | String | - |
7
- | transfer | 默认渲染到body 上,如定位有问题,请尝试修改为 false | Boolean | true |
8
7
  | ok-text | 确定按钮的文字, | String | 确定 |
9
8
  | cancel-text | 取消按钮的文字, | String | 取消 |
10
9
  | cancel | 点击取消的回调, | Function | - |
@@ -138,7 +138,8 @@
138
138
 
139
139
  .k-popconfirm-content {
140
140
  // .k-popconfirm-inner {
141
- background: var(--kui-color-control-10);
141
+ // background: var(--kui-color-control-10);
142
+ background: #333;
142
143
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
143
144
  border-radius: 12px; //var(--kui-border-radius);
144
145
  position: relative;
@@ -171,7 +172,8 @@
171
172
  position: absolute;
172
173
  box-sizing: border-box;
173
174
  display: flex;
174
- color: var(--kui-color-control-10);
175
+ // color: var(--kui-color-control-10);
176
+ color: #333;
175
177
  width: 24px;
176
178
  height: 7px;
177
179
  }
@@ -7,7 +7,7 @@
7
7
  <template>
8
8
  <Poptip title="标题" trigger="click" v-model="show">
9
9
  <template slot="content">
10
- <a @click="show=false">Close</a>
10
+ <Button @click="show=false" size="small">Close</Button>
11
11
  </template>
12
12
  <Button type="primary">Click me</Button>
13
13
  </Poptip>
@@ -5,5 +5,4 @@
5
5
  | title | 显示的标题 | String | - |
6
6
  | content | 显示的正文内容 | slots | - |
7
7
  | placement | 提示框出现的位置,可选值为`top`,`top-left`,`top-right`,`bottom`,`bottom-left`,`bottom-right`,`left`,`left-top`,`left-bottom`,`right`,`right-top`,`right-bottom` | String | top |
8
- | width | 展示的宽度,默认为内容区域的大小 | String,Number | - |
9
- | transfer | 默认渲染到body 上,如定位有问题,请尝试修改为 false | Boolean | true |
8
+ | width | 展示的宽度,默认为内容区域的大小 | String,Number | - |
@@ -4,7 +4,8 @@
4
4
  display: inline-block;
5
5
  position: relative;
6
6
  // max-width: 300px;
7
- color: var(--kui-color-font);
7
+ color: #fff;
8
+ // color: var(--kui-color-font);
8
9
  font-size: 12px;
9
10
  line-height: 1.5;
10
11
  position: absolute;
@@ -140,7 +141,8 @@
140
141
  .k-poptip-content {
141
142
  min-width: 200px;
142
143
  // .k-poptip-inner {
143
- background: var(--kui-color-control-10);
144
+ // background: var(--kui-color-control-10);
145
+ background: #333; //var(--kui-color-control-10);
144
146
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
145
147
  border-radius: 8px; // var(--kui-border-radius);
146
148
  position: relative;
@@ -155,7 +157,8 @@
155
157
  .k-poptip-title {
156
158
  font-size: 16px;
157
159
  font-weight: 500;
158
- color: var(--kui-color-font);
160
+ // color: var(--kui-color-font);
161
+ color: #fff;
159
162
  margin: 0;
160
163
  padding: 8px 16px;
161
164
  position: relative;
@@ -170,12 +173,14 @@
170
173
  display: flex;
171
174
  width: 24px;
172
175
  height: 7px;
173
- color: var(--kui-color-control-10);
176
+ color: #333;
177
+ // color: var(--kui-color-control-10);
174
178
  }
175
179
  }
176
180
 
177
181
  .k-poptip-dark {
178
- background-color: var(--kui-color-dark);
182
+ background: #333;
183
+ // background-color: var(--kui-color-dark);
179
184
  color: #fff;
180
185
 
181
186
  .k-poptip-title {
@@ -90,10 +90,10 @@
90
90
  }
91
91
 
92
92
  .k-radio-inner {
93
- box-sizing: content-box;
93
+ box-sizing: border-box;
94
94
  display: inline-block;
95
- width: 14px;
96
- height: 14px;
95
+ width: 16px;
96
+ height: 16px;
97
97
  position: relative;
98
98
  top: 0;
99
99
  left: 0;
@@ -185,6 +185,11 @@
185
185
  .k-radio-label {
186
186
  font-size: 16px;
187
187
  }
188
+
189
+ .k-radio-inner {
190
+ width: 18px;
191
+ height: 18px;
192
+ }
188
193
  }
189
194
 
190
195
  .k-radio-sm {
@@ -231,9 +236,23 @@
231
236
  .k-btn {
232
237
  border: none;
233
238
  border-radius: var(--kui-border-radius);
239
+ height: 24px;
234
240
 
235
241
  &:disabled {
236
242
  background: 0 0;
237
243
  }
244
+
245
+ &:not(.k-btn-primary) {
246
+ background-color: transparent;
247
+ }
238
248
  }
249
+
250
+ .k-btn-lg {
251
+ height: 32px;
252
+ }
253
+
254
+ .k-btn-sm {
255
+ height: 16px;
256
+ }
257
+
239
258
  }
@@ -2,11 +2,11 @@
2
2
 
3
3
  .k-rate {
4
4
  display: inline-flex;
5
- font-size: 20px;
6
5
  color: orange;
7
6
  line-height: 1;
8
7
  align-items: center;
9
8
  flex-shrink: 0;
9
+
10
10
  .k-star {
11
11
  display: inline-flex;
12
12
  margin-right: 8px;
@@ -14,6 +14,7 @@
14
14
  transition: all .3s ease;
15
15
  cursor: pointer;
16
16
  align-items: center;
17
+ transform: translateZ(0);
17
18
  .k-star-front {
18
19
  position: absolute;
19
20
  line-height: 1;
@@ -24,6 +25,13 @@
24
25
  overflow: hidden;
25
26
  width: 50%;
26
27
  opacity: 0;
28
+ display: flex;
29
+ align-items: center;
30
+ }
31
+
32
+ .k-icon {
33
+ font-size: 20px;
34
+ float: left;
27
35
  }
28
36
 
29
37
  .k-star-back {
@@ -14,7 +14,7 @@
14
14
  <Button @click="select=1" size="small">Choose orange</Button>
15
15
  </Space>
16
16
  <br />
17
- <Space vertical>
17
+ <Space vertical style="margin-top:10px;">
18
18
  <Select :width="200" placeholder="Please Choose">
19
19
  <Option :value="1" label="Apple" />
20
20
  <Option :value="2" label="Orange" />
@@ -19,7 +19,7 @@
19
19
  <Button size="small" @click="data=['3','1']">Select Banana & Apple</Button>
20
20
  </Space>
21
21
  <br/>
22
- <Space vertical>
22
+ <Space vertical style="margin-top:10px">
23
23
  <Select :width="300" multiple v-model="data2" clearable>
24
24
  <Option value="1" label="Apple" />
25
25
  <Option value="2" label="Orange" />
@@ -7,19 +7,11 @@
7
7
  <template>
8
8
  <Space vertical>
9
9
  <Checkbox v-model="checked" label="Shape" />
10
- <Select :width="256" :icon="Search" theme="light" :shape="checked?'circle':''"/>
11
- <Select :width="256" clearable filterable theme="light" :shape="checked?'circle':''">
12
- <Option value="1" label="Apple" />
13
- <Option value="2" label="Orange" />
14
- <Option value="3" label="Banana"/>
15
- <Option value="4" label="Pear" />
10
+ <Select :width="256" clearable :icon="Search" theme="light" :shape="checked?'circle':''" :options="options" />
11
+ <Select :width="256" clearable filterable theme="light" :shape="checked?'circle':''" :options="options">
16
12
  </Select>
17
- <Select :width="256" :icon="Search" :shape="checked?'circle':''"/>
18
- <Select :width="256" multiple v-model="value" filterable theme="light">
19
- <Option value="1" label="Apple" />
20
- <Option value="2" label="Orange" />
21
- <Option value="3" label="Banana" />
22
- <Option value="4" label="Pear" />
13
+ <Select :width="256" clearable :icon="Search" :shape="checked?'circle':''" :options="options" />
14
+ <Select :width="256" multiple v-model="value" filterable theme="light" :options="options">
23
15
  </Select>
24
16
  </Space>
25
17
  </template>
@@ -30,7 +22,13 @@ export default{
30
22
  return {
31
23
  Search,
32
24
  checked:true,
33
- value:['1','3']
25
+ value:['1','3'],
26
+ options:[
27
+ {label:'Apple' ,value: "1"},
28
+ {label:'Orange' ,value: "2"},
29
+ {label:'Banana' ,value: "3"},
30
+ {label:'Pear' ,value: "4"},
31
+ ]
34
32
  }
35
33
  },
36
34
  methods:{
@@ -12,7 +12,6 @@
12
12
  | clearable | 是否可以清空选项 | Boolean | false |
13
13
  | bordered | 是否显示边框 | Boolean | true |
14
14
  | showArrow | 是否显示下拉按钮 | Boolean | true |
15
- | transfer | 默认渲染到body 上,如定位有问题,请尝试修改为 false | Boolean | true |
16
15
  | change | 在选项状态发生改变时触发,返回选择项{value:xx,label:xx} | Function | - |
17
16
  | open-change | 下拉框展开或收起时触发 | Function | - |
18
17
  | options | options 数据,如果设置则不需要手动构造 Option 节点 | Array <{value,label,disabled}> | [] |