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.
Files changed (109) hide show
  1. package/components/_tool/number.js +177 -0
  2. package/components/_tool/utils.js +9 -3
  3. package/components/base/input.jsx +82 -54
  4. package/components/base/pop.jsx +22 -8
  5. package/components/button/button.jsx +1 -1
  6. package/components/button/styles/index.less +6 -2
  7. package/components/checkbox/checkbox.jsx +6 -11
  8. package/components/checkbox/demo/check-all.md +6 -6
  9. package/components/checkbox/group.jsx +0 -1
  10. package/components/checkbox/styles/index.less +17 -11
  11. package/components/divider/styles/index.less +1 -1
  12. package/components/dropdown/demo/rightmenu.md +2 -2
  13. package/components/dropdown/styles/index.less +23 -34
  14. package/components/form/demo/base.md +7 -1
  15. package/components/form/demo/valid.md +13 -4
  16. package/components/form/styles/index.less +1 -5
  17. package/components/icon/demo/base.md +2 -2
  18. package/components/icon/demo/search.vue +31 -14
  19. package/components/icon/icon.jsx +3 -1
  20. package/components/icon/styles/index.less +1 -1
  21. package/components/index.js +2 -0
  22. package/components/input/demo/icon.md +2 -2
  23. package/components/input/demo/size.md +3 -3
  24. package/components/input/demo/suffix.md +13 -6
  25. package/components/input/demo/theme.md +11 -6
  26. package/components/input/index.md +2 -1
  27. package/components/input/input.jsx +5 -0
  28. package/components/input/styles/index.less +52 -63
  29. package/components/inputNumber/demo/base.md +34 -0
  30. package/components/inputNumber/demo/ffix.md +27 -0
  31. package/components/inputNumber/demo/format.md +80 -0
  32. package/components/inputNumber/demo/index.vue +23 -0
  33. package/components/inputNumber/demo/info.md +7 -0
  34. package/components/inputNumber/demo/size.md +18 -0
  35. package/components/inputNumber/index.js +2 -0
  36. package/components/inputNumber/index.md +16 -0
  37. package/components/inputNumber/inputNumber.jsx +169 -0
  38. package/components/inputNumber/styles/index.less +172 -0
  39. package/components/menu/demo/collapsed.md +1 -1
  40. package/components/menu/styles/dropmenu.less +2 -2
  41. package/components/menu/styles/index.less +31 -14
  42. package/components/message/demo/icon.md +33 -0
  43. package/components/message/demo/index.vue +2 -0
  44. package/components/message/index.md +9 -7
  45. package/components/message/inner.jsx +5 -3
  46. package/components/modal/modal.jsx +31 -31
  47. package/components/notice/demo/icon.md +27 -11
  48. package/components/notice/demo/index.vue +2 -0
  49. package/components/notice/demo/types.md +28 -0
  50. package/components/notice/index.js +3 -0
  51. package/components/notice/index.md +8 -6
  52. package/components/popconfirm/styles/index.less +64 -83
  53. package/components/poptip/demo/base.md +7 -0
  54. package/components/poptip/demo/placement.md +12 -13
  55. package/components/poptip/styles/index.less +60 -79
  56. package/components/progress/demo/circle.md +2 -2
  57. package/components/radio/button.jsx +4 -2
  58. package/components/radio/demo/button.md +32 -28
  59. package/components/radio/group.jsx +4 -2
  60. package/components/radio/radio.jsx +7 -7
  61. package/components/radio/styles/index.less +61 -29
  62. package/components/rate/demo/base.md +7 -1
  63. package/components/rate/rate.jsx +8 -3
  64. package/components/rate/star.jsx +4 -3
  65. package/components/rate/styles/index.less +5 -3
  66. package/components/select/select.jsx +2 -0
  67. package/components/skeleton/demo/custom.md +62 -0
  68. package/components/skeleton/demo/index.vue +2 -0
  69. package/components/skeleton/demo/items.md +6 -2
  70. package/components/skeleton/index.md +32 -12
  71. package/components/skeleton/skeleton.jsx +1 -3
  72. package/components/skeleton/skeletonAvatar.jsx +33 -7
  73. package/components/skeleton/skeletonButton.jsx +29 -4
  74. package/components/skeleton/skeletonImage.jsx +43 -6
  75. package/components/skeleton/skeletonText.jsx +29 -4
  76. package/components/slider/demo/base.md +7 -15
  77. package/components/slider/demo/formatter.md +19 -0
  78. package/components/slider/demo/index.vue +10 -1
  79. package/components/slider/demo/marks.md +42 -0
  80. package/components/slider/demo/reverse.md +26 -0
  81. package/components/slider/demo/vertical.md +26 -3
  82. package/components/slider/demo/withNumber.md +43 -0
  83. package/components/slider/index.md +15 -6
  84. package/components/slider/slider.jsx +173 -41
  85. package/components/slider/styles/index.less +109 -44
  86. package/components/slider/thumb.jsx +165 -0
  87. package/components/space/demo/align.md +22 -21
  88. package/components/space/demo/base.md +0 -1
  89. package/components/space/demo/index.vue +2 -0
  90. package/components/space/demo/size.md +34 -22
  91. package/components/space/demo/vertical.md +1 -1
  92. package/components/space/demo/wrap.md +12 -0
  93. package/components/space/index.md +6 -5
  94. package/components/space/space.jsx +40 -35
  95. package/components/space/styles/index.less +15 -0
  96. package/components/spin/demo/mode.md +6 -4
  97. package/components/spin/spin.jsx +1 -1
  98. package/components/styles/index.less +1 -0
  99. package/components/switch/demo/loading.md +1 -1
  100. package/components/switch/demo/text.md +3 -1
  101. package/components/switch/styles/index.less +31 -20
  102. package/components/table/styles/index.less +9 -10
  103. package/components/tooltip/styles/index.less +103 -76
  104. package/components/tooltip/tooltip.jsx +3 -0
  105. package/components/upload/styles/index.less +7 -0
  106. package/components/upload/upload.jsx +22 -12
  107. package/dist/k-ui.css +2 -2
  108. package/dist/k-ui.js +2 -2
  109. package/package.json +1 -1
@@ -1,10 +1,7 @@
1
1
  @import '../../styles/var.less';
2
2
  .k-popconfirm {
3
3
  display: inline-block;
4
- position: relative;
5
- }
6
-
7
- .k-popconfirm-content {
4
+ // position: relative;
8
5
  min-width: 200px;
9
6
  // max-width: 300px;
10
7
  font-size: 12px;
@@ -12,62 +9,12 @@
12
9
  position: absolute;
13
10
  z-index: 1001;
14
11
  color: var(--kui-color-font);
15
- .k-popconfirm-inner {
16
- background: var(--kui-color-control-10);
17
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
18
- border-radius: var(--kui-border-radius);
19
- }
20
- .k-popconfirm-inner-content {
21
- padding: 18px 18px 10px 18px;
22
- box-sizing: border-box;
23
- position: relative;
24
- }
25
- .k-icon {
26
- position: absolute;
27
- font-size: 18px;
28
- color: var(--kui-color-warning);
29
- top: 19px;
30
- }
31
- .k-popconfirm-footer {
32
- text-align: right;
33
- padding-top: 10px;
34
- }
35
- .k-popconfirm-title {
36
- padding: 0 0 0 24px;
37
- font-size: 14px;
38
- }
39
- .k-popconfirm-arrow {
40
- position: absolute;
41
- box-sizing: border-box;
42
- overflow: hidden;
43
- display: flex;
44
- justify-content: center;
45
- align-items: center;
46
- width: 19px;
47
- .k-popconfirm-arrow-content {
48
- background-color: var(--kui-color-control-10);
49
- transform: rotate(45deg);
50
- width: 12px;
51
- height: 12px;
52
- }
53
- }
54
- .k-popconfirm-footer {
55
- text-align: right;
56
- padding: 8px 16px 16px;
57
- .k-btn {
58
- margin-left: 10px;
59
- }
60
- }
61
12
  &[k-placement^=top] {
62
13
  .k-popconfirm-arrow {
63
- bottom: 3px;
14
+ bottom: -7px;
64
15
  height: 9px;
65
- .k-popconfirm-arrow-content {
66
- box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
67
- margin-top: -15px;
68
- }
69
16
  }
70
- .k-popconfirm-inner {
17
+ .k-popconfirm-content {
71
18
  margin-bottom: 12px;
72
19
  }
73
20
  }
@@ -89,14 +36,11 @@
89
36
  }
90
37
  &[k-placement^=bottom] {
91
38
  .k-popconfirm-arrow {
92
- top: 3px;
93
- height: 9px;
94
- .k-popconfirm-arrow-content {
95
- box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
96
- margin-bottom: -15px;
97
- }
39
+ top: -6px;
40
+ height: 7px;
41
+ transform: rotate(180deg);
98
42
  }
99
- .k-popconfirm-inner {
43
+ .k-popconfirm-content {
100
44
  margin-top: 12px;
101
45
  }
102
46
  }
@@ -117,22 +61,19 @@
117
61
  }
118
62
  &[k-placement^=left] {
119
63
  .k-popconfirm-arrow {
120
- right: 3px;
121
- width: 9px;
122
- height: 19px;
123
- .k-popconfirm-arrow-content {
124
- box-shadow: 2px -2px 5px rgba(0, 0, 0, 0.05);
125
- margin-left: -15px;
126
- }
64
+ right: -14px;
65
+ width: 24px;
66
+ height: 7px;
67
+ transform: rotate(-90deg);
127
68
  }
128
- .k-popconfirm-inner {
69
+ .k-popconfirm-content {
129
70
  margin-right: 12px;
130
71
  }
131
72
  }
132
73
  &[k-placement=left] {
133
74
  .k-popconfirm-arrow {
134
75
  top: 50%;
135
- transform: translateY(-50%);
76
+ transform: translateY(-50%) rotate(-90deg);
136
77
  }
137
78
  }
138
79
  &[k-placement=left-bottom] {
@@ -147,32 +88,72 @@
147
88
  }
148
89
  &[k-placement^=right] {
149
90
  .k-popconfirm-arrow {
150
- left: 3px;
151
- width: 9px;
152
- height: 19px;
153
- .k-popconfirm-arrow-content {
154
- box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.05);
155
- margin-right: -15px;
156
- }
91
+ left: -14px;
92
+ width: 24px;
93
+ height: 7px;
94
+ transform: rotate(90deg);
157
95
  }
158
- .k-popconfirm-inner {
96
+ .k-popconfirm-content {
159
97
  margin-left: 12px;
160
98
  }
161
99
  }
162
100
  &[k-placement=right] {
163
101
  .k-popconfirm-arrow {
164
102
  top: 50%;
165
- transform: translateY(-50%);
103
+ transform: translateY(-50%) rotate(90deg);
166
104
  }
167
105
  }
168
106
  &[k-placement=right-top] {
169
107
  .k-popconfirm-arrow {
170
- top: 10px;
108
+ top: 12px;
171
109
  }
172
110
  }
173
111
  &[k-placement=right-bottom] {
174
112
  .k-popconfirm-arrow {
175
- bottom: 10px;
113
+ bottom: 12px;
114
+ }
115
+ }
116
+ }
117
+
118
+ .k-popconfirm-content {
119
+ // .k-popconfirm-inner {
120
+ background: var(--kui-color-control-10);
121
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
122
+ border-radius: var(--kui-border-radius);
123
+ position: relative;
124
+ // }
125
+ .k-popconfirm-body {
126
+ padding: 18px 18px 10px 18px;
127
+ box-sizing: border-box;
128
+ position: relative;
129
+ }
130
+ .k-icon {
131
+ position: absolute;
132
+ font-size: 18px;
133
+ color: var(--kui-color-warning);
134
+ top: 19px;
135
+ }
136
+ .k-popconfirm-footer {
137
+ text-align: right;
138
+ padding-top: 10px;
139
+ }
140
+ .k-popconfirm-title {
141
+ padding: 0 0 0 24px;
142
+ font-size: 14px;
143
+ }
144
+ .k-popconfirm-arrow {
145
+ position: absolute;
146
+ box-sizing: border-box;
147
+ display: flex;
148
+ color: var(--kui-color-control-10);
149
+ width: 24px;
150
+ height: 7px;
151
+ }
152
+ .k-popconfirm-footer {
153
+ text-align: right;
154
+ padding: 8px 16px 16px;
155
+ .k-btn {
156
+ margin-left: 10px;
176
157
  }
177
158
  }
178
159
  }
@@ -12,5 +12,12 @@
12
12
  </template>
13
13
  <Button type="primary">Hover me</Button>
14
14
  </Poptip>
15
+ <Poptip>
16
+ <template slot="content">
17
+ <p>明月几时有,把酒问青天!</p>
18
+ <p>明月几时有,把酒问青天!</p>
19
+ </template>
20
+ <Button type="primary">No title</Button>
21
+ </Poptip>
15
22
  </template>
16
23
  ```
@@ -6,21 +6,21 @@
6
6
  ```vue
7
7
  <template>
8
8
  <div style="margin-left:70px;white-space: nowrap;">
9
- <Poptip :title="title" placement="top-left">
9
+ <Poptip placement="top-left">
10
10
  <Button>TL</Button>
11
11
  <template slot="content">
12
12
  <p>{{tip}}</p>
13
13
  <p>{{tip}}</p>
14
14
  </template>
15
15
  </Poptip>
16
- <Poptip :title="title" placement="top">
16
+ <Poptip placement="top">
17
17
  <Button>Top</Button>
18
18
  <template slot="content">
19
19
  <p>{{tip}}</p>
20
20
  <p>{{tip}}</p>
21
21
  </template>
22
22
  </Poptip>
23
- <Poptip :title="title" placement="top-right">
23
+ <Poptip placement="top-right">
24
24
  <Button>TR</Button>
25
25
  <template slot="content">
26
26
  <p>{{tip}}</p>
@@ -29,21 +29,21 @@
29
29
  </Poptip>
30
30
  </div>
31
31
  <div style="float:left;height:125px;width:70px;">
32
- <Poptip :title="title" placement="left-top">
32
+ <Poptip placement="left-top">
33
33
  <Button>LT</Button>
34
34
  <template slot="content">
35
35
  <p>{{tip}}</p>
36
36
  <p>{{tip}}</p>
37
37
  </template>
38
38
  </Poptip>
39
- <Poptip :title="title" placement="left">
39
+ <Poptip placement="left">
40
40
  <Button>Left</Button>
41
41
  <template slot="content">
42
42
  <p>{{tip}}</p>
43
43
  <p>{{tip}}</p>
44
44
  </template>
45
45
  </Poptip>
46
- <Poptip :title="title" placement="left-bottom">
46
+ <Poptip placement="left-bottom">
47
47
  <Button>LB</Button>
48
48
  <template slot="content">
49
49
  <p>{{tip}}</p>
@@ -52,21 +52,21 @@
52
52
  </Poptip>
53
53
  </div>
54
54
  <div style="margin-left:310px;height:125px;width:70px;">
55
- <Poptip :title="title" placement="right-top">
55
+ <Poptip placement="right-top">
56
56
  <Button>RT</Button>
57
57
  <template slot="content">
58
58
  <p>{{tip}}</p>
59
59
  <p>{{tip}}</p>
60
60
  </template>
61
61
  </Poptip>
62
- <Poptip :title="title" placement="right">
62
+ <Poptip placement="right">
63
63
  <Button>Right</Button>
64
64
  <template slot="content">
65
65
  <p>{{tip}}</p>
66
66
  <p>{{tip}}</p>
67
67
  </template>
68
68
  </Poptip>
69
- <Poptip :title="title" placement="right-bottom">
69
+ <Poptip placement="right-bottom">
70
70
  <Button>RB</Button>
71
71
  <template slot="content">
72
72
  <p>{{tip}}</p>
@@ -75,21 +75,21 @@
75
75
  </Poptip>
76
76
  </div>
77
77
  <div style="margin-left:70px;white-space: nowrap;">
78
- <Poptip :title="title" placement="bottom-left">
78
+ <Poptip placement="bottom-left">
79
79
  <Button>BL</Button>
80
80
  <template slot="content">
81
81
  <p>{{tip}}</p>
82
82
  <p>{{tip}}</p>
83
83
  </template>
84
84
  </Poptip>
85
- <Poptip :title="title" placement="bottom" >
85
+ <Poptip placement="bottom" >
86
86
  <Button>Bottom</Button>
87
87
  <template slot="content">
88
88
  <p>{{tip}}</p>
89
89
  <p>{{tip}}</p>
90
90
  </template>
91
91
  </Poptip>
92
- <Poptip :title="title" placement="bottom-right" >
92
+ <Poptip placement="bottom-right" >
93
93
  <Button>BR</Button>
94
94
  <template slot="content">
95
95
  <p>{{tip}}</p>
@@ -102,7 +102,6 @@
102
102
  export default{
103
103
  data(){
104
104
  return{
105
- title:'标题',
106
105
  tip:'明月几时有,把酒问青天!',
107
106
  }
108
107
  }
@@ -2,10 +2,6 @@
2
2
  .k-poptip {
3
3
  display: inline-block;
4
4
  position: relative;
5
- }
6
-
7
- .k-poptip-content {
8
- min-width: 200px;
9
5
  // max-width: 300px;
10
6
  color: var(--kui-color-font);
11
7
  font-size: 12px;
@@ -13,52 +9,12 @@
13
9
  position: absolute;
14
10
  z-index: 1001;
15
11
  transform: translateZ(0);
16
- .k-poptip-inner {
17
- background: var(--kui-color-control-10);
18
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
19
- border-radius: var(--kui-border-radius);
20
- }
21
- .k-poptip-inner-content {
22
- font-size: 14px;
23
- padding: 8px 16px;
24
- box-sizing: border-box;
25
- }
26
- .k-poptip-title {
27
- font-size: 16px;
28
- font-weight: 500;
29
- color: var(--kui-color-font);
30
- margin: 0;
31
- padding: 8px 16px;
32
- position: relative;
33
- border-bottom: 1px solid var(--kui-color-gray-80);
34
- text-overflow: ellipsis;
35
- overflow: hidden;
36
- }
37
- .k-poptip-arrow {
38
- position: absolute;
39
- box-sizing: border-box;
40
- overflow: hidden;
41
- display: flex;
42
- justify-content: center;
43
- align-items: center;
44
- width: 19px;
45
- .k-poptip-arrow-content {
46
- background-color: var(--kui-color-control-10);
47
- transform: rotate(45deg);
48
- width: 12px;
49
- height: 12px;
50
- }
51
- }
52
12
  &[k-placement^=top] {
53
13
  .k-poptip-arrow {
54
- bottom: 3px;
14
+ bottom: -7px;
55
15
  height: 9px;
56
- .k-poptip-arrow-content {
57
- box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
58
- margin-top: -15px;
59
- }
60
16
  }
61
- .k-poptip-inner {
17
+ .k-poptip-content {
62
18
  margin-bottom: 12px;
63
19
  }
64
20
  }
@@ -70,105 +26,130 @@
70
26
  }
71
27
  &[k-placement=top-right] {
72
28
  .k-poptip-arrow {
73
- right: 10px;
29
+ right: 12px;
74
30
  }
75
31
  }
76
32
  &[k-placement=top-left] {
77
33
  .k-poptip-arrow {
78
- left: 10px;
34
+ left: 12px;
79
35
  }
80
36
  }
81
37
  &[k-placement^=bottom] {
82
38
  .k-poptip-arrow {
83
- top: 3px;
39
+ top: -7px;
84
40
  height: 9px;
85
- .k-poptip-arrow-content {
86
- box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.05);
87
- margin-bottom: -15px;
88
- }
41
+ transform: rotate(180deg);
89
42
  }
90
- .k-poptip-inner {
43
+ .k-poptip-content {
91
44
  margin-top: 12px;
92
45
  }
93
46
  }
94
47
  &[k-placement=bottom] {
95
48
  .k-poptip-arrow {
96
49
  left: 50%;
97
- transform: translateX(-50%);
50
+ transform: translateX(-50%) rotate(180deg);
98
51
  }
99
52
  }
100
53
  &[k-placement=bottom-left] {
101
54
  .k-poptip-arrow {
102
- left: 10px;
55
+ left: 12px;
103
56
  }
104
57
  }
105
58
  &[k-placement=bottom-right] {
106
59
  .k-poptip-arrow {
107
- right: 10px;
60
+ right: 12px;
108
61
  }
109
62
  }
110
63
  &[k-placement^=left] {
111
64
  .k-poptip-arrow {
112
- right: 3px;
113
- width: 9px;
114
- height: 19px;
115
- .k-poptip-arrow-content {
116
- box-shadow: 2px -2px 5px rgba(0, 0, 0, 0.05);
117
- margin-left: -15px;
118
- }
65
+ right: -14px;
66
+ width: 24px;
67
+ height: 7px;
68
+ transform: rotate(-90deg);
119
69
  }
120
- .k-poptip-inner {
70
+ .k-poptip-content {
121
71
  margin-right: 12px;
122
72
  }
123
73
  }
124
74
  &[k-placement=left] {
125
75
  .k-poptip-arrow {
126
76
  top: 50%;
127
- transform: translateY(-50%);
77
+ transform: translateY(-50%) rotate(-90deg);
128
78
  }
129
79
  }
130
80
  &[k-placement=left-bottom] {
131
81
  .k-poptip-arrow {
132
- bottom: 10px;
82
+ bottom: 12px;
133
83
  }
134
84
  }
135
85
  &[k-placement=left-top] {
136
86
  .k-poptip-arrow {
137
- top: 10px;
87
+ top: 12px;
138
88
  }
139
89
  }
140
90
  &[k-placement^=right] {
141
91
  .k-poptip-arrow {
142
- left: 3px;
143
- width: 9px;
144
- height: 19px;
145
- .k-poptip-arrow-content {
146
- box-shadow: -2px 2px 5px rgba(0, 0, 0, 0.05);
147
- margin-right: -15px;
148
- }
92
+ left: -14px;
93
+ width: 24px;
94
+ height: 7px;
95
+ transform: rotate(90deg);
149
96
  }
150
- .k-poptip-inner {
97
+ .k-poptip-content {
151
98
  margin-left: 12px;
152
99
  }
153
100
  }
154
101
  &[k-placement=right] {
155
102
  .k-poptip-arrow {
156
103
  top: 50%;
157
- transform: translateY(-50%);
104
+ transform: translateY(-50%) rotate(90deg);
158
105
  }
159
106
  }
160
107
  &[k-placement=right-top] {
161
108
  .k-poptip-arrow {
162
- top: 10px;
109
+ top: 12px;
163
110
  }
164
111
  }
165
112
  &[k-placement=right-bottom] {
166
113
  .k-poptip-arrow {
167
- bottom: 10px;
114
+ bottom: 12px;
168
115
  }
169
116
  }
170
117
  }
171
118
 
119
+ .k-poptip-content {
120
+ min-width: 200px;
121
+ // .k-poptip-inner {
122
+ background: var(--kui-color-control-10);
123
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
124
+ border-radius: var(--kui-border-radius);
125
+ position: relative;
126
+ // }
127
+ .k-poptip-body {
128
+ font-size: 14px;
129
+ padding: 8px 16px;
130
+ box-sizing: border-box;
131
+ }
132
+ .k-poptip-title {
133
+ font-size: 16px;
134
+ font-weight: 500;
135
+ color: var(--kui-color-font);
136
+ margin: 0;
137
+ padding: 8px 16px;
138
+ position: relative;
139
+ border-bottom: 1px solid var(--kui-color-gray-80);
140
+ text-overflow: ellipsis;
141
+ overflow: hidden;
142
+ }
143
+ .k-poptip-arrow {
144
+ position: absolute;
145
+ box-sizing: border-box;
146
+ display: flex;
147
+ width: 24px;
148
+ height: 7px;
149
+ color: var(--kui-color-control-10);
150
+ }
151
+ }
152
+
172
153
  .k-poptip-dark {
173
154
  background-color: var(--kui-color-dark);
174
155
  color: #fff;
@@ -16,10 +16,10 @@
16
16
  </Progress>
17
17
  </template>
18
18
  <style>
19
- .demo-progress h2{
19
+ .demo-progress>h2{
20
20
  font-size:23px
21
21
  }
22
- .demo-progress span{
22
+ .demo-progress>span{
23
23
  font-size:14px;
24
24
  color:#999;
25
25
  }
@@ -5,6 +5,8 @@ export default {
5
5
  value: { type: [String, Number, Boolean], default: false },
6
6
  disabled: Boolean,
7
7
  label: [String, Number],
8
+ theme: String,
9
+ shape: String,
8
10
  },
9
11
  inject: {
10
12
  groupContext: { default: null },
@@ -33,9 +35,9 @@ export default {
33
35
  let prop = {}
34
36
  if (groupContext) {
35
37
  checked = groupContext.defaultValue == value
36
- let { size, shape,theme } = groupContext
38
+ let { size, shape, theme } = groupContext
37
39
  disabled = disabled || groupContext.disabled
38
- prop = { disabled, size, shape,theme, type: checked ? 'primary' : 'default' }
40
+ prop = { disabled, size, shape, theme, type: checked ? 'primary' : 'default' }
39
41
  }
40
42
  const props = {
41
43
  attrs: { ...$attrs },
@@ -6,33 +6,31 @@
6
6
  ```vue
7
7
  <template>
8
8
  <div>
9
- <RadioGroup v-model="large" size="large" theme="solid">
10
- <RadioButton value="beijing" icon="logo-apple">Beijing</RadioButton>
11
- <RadioButton value="shanghai">Shanghai</RadioButton>
12
- <RadioButton value="guangzhou">Guangzhou</RadioButton>
13
- <RadioButton value="shenzhen">Shenzhen</RadioButton>
14
- <RadioButton value="wuhan">Wuhan</RadioButton>
9
+ Shape : <RadioGroup v-model="shape" size="small">
10
+ <RadioButton value="default" label="Default" />
11
+ <RadioButton value="circle" label="Circle" />
15
12
  </RadioGroup>
16
13
  <br/>
17
14
  <br/>
18
- <RadioGroup v-model="base" shape="circle">
19
- <RadioButton value="beijing" icon="logo-apple">Beijing</RadioButton>
20
- <RadioButton value="shanghai">Shanghai</RadioButton>
21
- <RadioButton value="guangzhou">Guangzhou</RadioButton>
22
- <RadioButton value="shenzhen">Shenzhen</RadioButton>
23
- <RadioButton value="wuhan">Wuhan</RadioButton>
15
+ Theme : <RadioGroup v-model="theme" size="small">
16
+ <RadioButton value="default" label="Default" />
17
+ <RadioButton value="solid" label="Solid" />
18
+ <RadioButton value="light" label="Light" />
19
+ <RadioButton value="card" label="Card" />
24
20
  </RadioGroup>
25
21
  <br/>
26
22
  <br/>
27
- <RadioGroup v-model="sm" size="small" theme="solid" type="button" :options="options" />
23
+ Size : <RadioGroup v-model="size" size="small" :options="sizes">
24
+ </RadioGroup>
28
25
  <br/>
29
26
  <br/>
30
- <RadioGroup value="beijing" size="small" disabled>
31
- <RadioButton value="beijing" icon="logo-apple">Beijing</RadioButton>
32
- <RadioButton value="shanghai">Shanghai</RadioButton>
33
- <RadioButton value="guangzhou">Guangzhou</RadioButton>
34
- <RadioButton value="shenzhen">Shenzhen</RadioButton>
35
- <RadioButton value="wuhan">Wuhan</RadioButton>
27
+ <RadioGroup
28
+ type="button"
29
+ v-model="date"
30
+ :size="size"
31
+ :theme="theme"
32
+ :shape="shape"
33
+ :options="dates">
36
34
  </RadioGroup>
37
35
  </div>
38
36
  </template>
@@ -40,15 +38,21 @@
40
38
  export default{
41
39
  data(){
42
40
  return{
43
- large:'wuhan',
44
- base:'shanghai',
45
- sm:'beijing',
46
- options:[
47
- {label:'Beijing',value:'beijing',icon:'logo-apple'},
48
- {label:'Shanghai',value:'shanghai'},
49
- {label:'Shenzhen',value:'shenzhen'},
50
- {label:'Guangzhou',value:'guangzhou',disabled:true},
51
- {label:'Wuhan',value:'wuhan'},
41
+ size:'default',
42
+ shape:'default',
43
+ theme:'solid',
44
+ date:0,
45
+ dates:[
46
+ { label:'7天' ,value:0 },
47
+ { label:'1个月' ,value:1 },
48
+ { label:'1季度' ,value:2 },
49
+ { label:'1年' ,value:3 },
50
+ { label:'5年' ,value:4 ,disabled:true }
51
+ ],
52
+ sizes:[
53
+ {label:'Large',value:'large',icon:'logo-apple'},
54
+ {label:'Default',value:'default'},
55
+ {label:'Small',value:'small'},
52
56
  ]
53
57
  }
54
58
  }
@@ -46,7 +46,7 @@ export default {
46
46
  }
47
47
  },
48
48
  render() {
49
- const { options, $slots, type, direction,theme,shape } = this
49
+ const { options, $slots, type, direction, theme, shape } = this
50
50
  let childs = getChild($slots.default)
51
51
  if (options && options.length) {
52
52
  childs = options.map(option => {
@@ -71,7 +71,9 @@ export default {
71
71
  }
72
72
  const classes = [
73
73
  'k-radio-group',
74
- { 'k-radio-cirle': shape=='circle' },
74
+ { 'k-radio-cirle': shape == 'circle' },
75
+ { 'k-radio-group-light': theme == 'light' && type == 'button' },
76
+ { 'k-radio-group-card': theme == 'card' && type == 'button' },
75
77
  { 'k-radio-group-vertical': direction == 'vertical' }
76
78
  ]
77
79
  return (