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.
Files changed (54) hide show
  1. package/components/_tool/utils.js +9 -3
  2. package/components/base/pop.jsx +17 -5
  3. package/components/button/button.jsx +1 -1
  4. package/components/button/styles/index.less +3 -0
  5. package/components/checkbox/checkbox.jsx +6 -11
  6. package/components/checkbox/demo/check-all.md +5 -6
  7. package/components/checkbox/group.jsx +0 -1
  8. package/components/checkbox/styles/index.less +17 -11
  9. package/components/divider/styles/index.less +1 -1
  10. package/components/dropdown/demo/rightmenu.md +2 -2
  11. package/components/dropdown/styles/index.less +23 -34
  12. package/components/form/demo/base.md +1 -1
  13. package/components/icon/demo/base.md +2 -2
  14. package/components/input/demo/theme.md +11 -6
  15. package/components/menu/demo/collapsed.md +1 -1
  16. package/components/menu/styles/dropmenu.less +2 -2
  17. package/components/menu/styles/index.less +31 -14
  18. package/components/message/demo/icon.md +33 -0
  19. package/components/message/demo/index.vue +2 -0
  20. package/components/message/index.md +9 -7
  21. package/components/message/inner.jsx +5 -3
  22. package/components/modal/modal.jsx +31 -31
  23. package/components/notice/demo/icon.md +27 -11
  24. package/components/notice/demo/index.vue +2 -0
  25. package/components/notice/demo/types.md +28 -0
  26. package/components/notice/index.js +3 -0
  27. package/components/notice/index.md +8 -6
  28. package/components/popconfirm/styles/index.less +64 -83
  29. package/components/poptip/demo/base.md +7 -0
  30. package/components/poptip/demo/placement.md +12 -13
  31. package/components/poptip/styles/index.less +60 -79
  32. package/components/progress/demo/circle.md +2 -2
  33. package/components/radio/button.jsx +4 -2
  34. package/components/radio/demo/button.md +32 -28
  35. package/components/radio/group.jsx +4 -2
  36. package/components/radio/radio.jsx +7 -7
  37. package/components/radio/styles/index.less +58 -28
  38. package/components/rate/demo/base.md +7 -1
  39. package/components/rate/rate.jsx +8 -3
  40. package/components/rate/star.jsx +4 -3
  41. package/components/rate/styles/index.less +5 -3
  42. package/components/select/select.jsx +2 -0
  43. package/components/slider/slider.jsx +12 -18
  44. package/components/spin/demo/mode.md +6 -4
  45. package/components/spin/spin.jsx +1 -1
  46. package/components/switch/demo/loading.md +1 -1
  47. package/components/switch/demo/text.md +3 -1
  48. package/components/switch/styles/index.less +31 -20
  49. package/components/tooltip/styles/index.less +103 -76
  50. package/components/upload/styles/index.less +7 -0
  51. package/components/upload/upload.jsx +22 -12
  52. package/dist/k-ui.css +2 -2
  53. package/dist/k-ui.js +2 -2
  54. 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 = clientHeight - (clientHeight - selectionRect.top) > pickerHeight
136
+ let showInTop = selectionRect.top > pickerHeight
137
137
  //左边
138
- let showInLeft = clientWidth - (clientWidth - selectionRect.left) > pickerWidth
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 = showInRight ? selectionRect.left + scrollLeft : selectionRect.right - pickerWidth + scrollLeft
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;
@@ -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}-inner-content`}>{contentNode}</div> : null;
120
+ contentNode = contentNode ? <div class={`k-${preCls}-body`}>{contentNode}</div> : null;
120
121
 
121
- childNode = [<div class={`k-${preCls}-arrow`}><div class={`k-${preCls}-arrow-content`} style={{ backgroundColor: /^#/.test(color) ? color : null }}></div></div>,
122
- <div class={`k-${preCls}-inner`} style={{ backgroundColor: /^#/.test(color) ? color : null }}>{[titleNode, contentNode, footerNode]}</div>]
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}-content`, { [`k-${preCls}-${color}`]: color && !/^#/.test(color), [`k-${preCls}-has-color`]: /^#/.test(color) }],
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,
@@ -31,7 +31,7 @@ export default {
31
31
  type: String,
32
32
  default: 'default',
33
33
  validator(value) {
34
- return ['default', 'light', 'solid', 'normal'].indexOf(value) > -1
34
+ return ['default', 'light', 'solid', 'normal', 'card'].indexOf(value) > -1
35
35
  }
36
36
  },
37
37
  shape: String
@@ -266,6 +266,9 @@
266
266
  background: var(--kui-color-disable-back);
267
267
  border-color: var(--kui-color-disable-border);
268
268
  }
269
+ &.k-btn-normal {
270
+ background: 0 0;
271
+ }
269
272
  }
270
273
 
271
274
  .k-btn-primary[disabled='disabled'] {
@@ -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
- // console.log(checked)
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
- const classes = [
60
- "k-checkbox",
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={classes}>
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 ? ["beijing", "shenzhen", "shanghai", "guangzhou",'wuhan'] : [];
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
- this.checkAll = data.length == this.options.length
40
- this.indeterminate = data.length>0&& data.length < this.options.length
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
  };
@@ -34,7 +34,6 @@ export default {
34
34
  render() {
35
35
  const { options, $slots, direction } = this
36
36
  let childs = getChild($slots.default)
37
-
38
37
  if (options && options.length) {
39
38
  childs = options.map(option => (
40
39
  <Checkbox
@@ -1,5 +1,5 @@
1
1
  @import '../../styles/var.less';
2
- .k-checkbox-wrapper {
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: var(--kui-color-back);
34
+ color: #fff;
36
35
  .k-icon {
37
- font-size: 18px;
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
- .k-checkbox-indeterminate {
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
- .k-checkbox {
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
- .k-checkbox-indeterminate .k-checkbox-inner:after {
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-wrapper {
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-wrapper {
136
+ .k-checkbox {
131
137
  display: block;
132
138
  margin-right: 0;
133
139
  margin-bottom: 16px;
@@ -33,7 +33,7 @@
33
33
  border-width: 1px 0 0;
34
34
  }
35
35
  &-vertical {
36
- .ant-divider-dashed {
36
+ .k-divider-dashed {
37
37
  border-width: 0 0 0 1px
38
38
  }
39
39
  }
@@ -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-outline">Save</MenuItem>
19
- <MenuItem key="cut" icon="cut-outline">Cut</MenuItem>
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-content {
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-inner {
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
- justify-content: center;
21
- align-items: center;
22
- width: 19px;
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: 3px;
39
- height: 9px;
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-inner {
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: 10px;
49
+ right: 12px;
58
50
  }
59
51
  }
60
52
  &[k-placement=top-left] {
61
53
  .k-dropdown-arrow {
62
- left: 10px;
54
+ left: 12px;
63
55
  }
64
56
  }
65
57
  &[k-placement^=bottom] {
66
58
  .k-dropdown-arrow {
67
- top: 3px;
68
- height: 9px;
69
- .k-dropdown-arrow-content {
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-inner {
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-inner {
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-inner {
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="logo-kui" />
9
+ <Icon type="heart" />
10
10
  <Icon type="logo-kui" size="25" />
11
- <Icon type="logo-kui" size="30" color="blue" />
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="shape"/>
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?'circle':''"/>
15
- <Input placeholder="请输入内容..." theme="light" @search="focus" clearable :shape="shape?'circle':''"/>
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
- shape :false
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<span>sss</span></MenuItem>
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
- &+span {
56
- opacity: 1;
57
- transition: all .3s cubic-bezier(.645, .045, .355, 1), width .3s cubic-bezier(.645, .045, .355, 1);
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
- display: none;
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
- .k-menu-submenu-popup-content {
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"/>