kui-vue 3.6.4 → 3.6.7

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 (197) hide show
  1. package/components/alert/alert.jsx +26 -7
  2. package/components/alert/demo/basic.md +4 -4
  3. package/components/alert/demo/icon.md +15 -6
  4. package/components/alert/styles/index.less +42 -14
  5. package/components/avatar/styles/index.less +4 -4
  6. package/components/backtop/styles/index.less +10 -14
  7. package/components/badge/styles/index.less +7 -13
  8. package/components/breadcrumb/index.md +7 -6
  9. package/components/breadcrumb/styles/index.less +7 -21
  10. package/components/button/demo/color.md +0 -1
  11. package/components/button/demo/disabled.md +6 -0
  12. package/components/button/demo/light.md +1 -1
  13. package/components/button/styles/index.less +165 -111
  14. package/components/card/card.jsx +1 -1
  15. package/components/card/demo/basic.md +1 -1
  16. package/components/card/demo/border.md +1 -1
  17. package/components/card/demo/notitle.md +1 -1
  18. package/components/card/styles/index.less +5 -4
  19. package/components/carousel/carousel.jsx +186 -175
  20. package/components/carousel/styles/index.less +11 -16
  21. package/components/checkbox/checkbox.jsx +2 -2
  22. package/components/checkbox/styles/index.less +21 -29
  23. package/components/collapse/styles/index.less +7 -11
  24. package/components/colorPicker/styles/index.less +83 -71
  25. package/components/config/context.js +21 -0
  26. package/components/config/index.js +10 -2
  27. package/components/datePicker/datepicker.jsx +6 -2
  28. package/components/datePicker/styles/index.less +54 -57
  29. package/components/descriptions/styles/index.less +8 -17
  30. package/components/divider/styles/index.less +20 -18
  31. package/components/drawer/demo/target.md +1 -0
  32. package/components/drawer/styles/animal.less +0 -1
  33. package/components/drawer/styles/index.less +8 -11
  34. package/components/dropdown/demo/cascading.md +30 -16
  35. package/components/dropdown/styles/index.less +26 -34
  36. package/components/empty/index.md +3 -2
  37. package/components/empty/styles/index.less +2 -2
  38. package/components/flex/demo/align.md +1 -1
  39. package/components/flex/demo/basic.md +1 -2
  40. package/components/flex/index.md +1 -1
  41. package/components/form/demo/dynamicvalid.md +1 -3
  42. package/components/form/demo/info.md +22 -12
  43. package/components/form/demo/valid.md +6 -6
  44. package/components/form/demo/withmodal.md +6 -6
  45. package/components/form/styles/index.less +10 -11
  46. package/components/grid/index.md +4 -1
  47. package/components/grid/styles/index.less +1 -1
  48. package/components/icon/demo/search.vue +44 -21
  49. package/components/icon/index.md +1 -1
  50. package/components/icon/styles/index.less +7 -8
  51. package/components/image/index.md +7 -1
  52. package/components/image/preview.jsx +17 -4
  53. package/components/image/styles/index.less +36 -42
  54. package/components/index.js +9 -9
  55. package/components/input/demo/icon.md +0 -1
  56. package/components/input/demo/suffix.md +2 -7
  57. package/components/input/input.jsx +31 -29
  58. package/components/input/inputBox.jsx +13 -0
  59. package/components/input/inputGroup.jsx +2 -0
  60. package/components/input/styles/index.less +47 -53
  61. package/components/input/textarea.jsx +1 -1
  62. package/components/inputNumber/demo/basic.md +3 -3
  63. package/components/inputNumber/demo/ffix.md +2 -2
  64. package/components/inputNumber/inputNumber.jsx +2 -2
  65. package/components/inputNumber/styles/index.less +36 -42
  66. package/components/layout/demo/basic.md +5 -5
  67. package/components/layout/demo/info.md +1 -34
  68. package/components/layout/demo/layout1.md +7 -7
  69. package/components/layout/demo/layout2.md +32 -20
  70. package/components/layout/demo/layout3.md +20 -13
  71. package/components/layout/demo/layout4.md +12 -8
  72. package/components/layout/demo/layout5.md +6 -2
  73. package/components/layout/styles/index.less +1 -18
  74. package/components/loading/demo/info.md +3 -3
  75. package/components/loading/styles/index.less +31 -31
  76. package/components/menu/demo/accordion.md +44 -22
  77. package/components/menu/demo/basic.md +35 -20
  78. package/components/menu/demo/collapsed.md +37 -19
  79. package/components/menu/demo/inline.md +44 -23
  80. package/components/menu/demo/mode.md +42 -26
  81. package/components/menu/demo/theme.md +34 -18
  82. package/components/menu/demo/vertical.md +34 -18
  83. package/components/menu/index.md +14 -3
  84. package/components/menu/menu.jsx +9 -3
  85. package/components/menu/menuitem.jsx +4 -4
  86. package/components/menu/recursiveMenu.jsx +40 -0
  87. package/components/menu/styles/index.less +46 -58
  88. package/components/message/demo/basic.md +0 -7
  89. package/components/message/index.js +0 -4
  90. package/components/message/index.md +0 -1
  91. package/components/message/inner.jsx +15 -2
  92. package/components/message/styles/index.less +12 -17
  93. package/components/modal/demo/confirm.md +6 -6
  94. package/components/modal/demo/global.md +0 -15
  95. package/components/modal/demo/info.md +0 -1
  96. package/components/modal/index.js +5 -34
  97. package/components/modal/index.md +1 -2
  98. package/components/modal/modal.jsx +2 -1
  99. package/components/modal/styles/index.less +14 -21
  100. package/components/notice/demo/basic.md +0 -9
  101. package/components/notice/demo/close.md +4 -0
  102. package/components/notice/demo/types.md +1 -2
  103. package/components/notice/index.js +1 -19
  104. package/components/notice/styles/index.less +16 -22
  105. package/components/page/page.jsx +5 -4
  106. package/components/page/styles/index.less +49 -50
  107. package/components/popconfirm/demo/basic.md +11 -18
  108. package/components/popconfirm/demo/info.md +3 -1
  109. package/components/popconfirm/demo/local.md +14 -20
  110. package/components/popconfirm/demo/placement.md +3 -9
  111. package/components/popconfirm/index.md +3 -2
  112. package/components/popconfirm/styles/index.less +9 -15
  113. package/components/poptip/styles/index.less +44 -49
  114. package/components/progress/styles/index.less +13 -13
  115. package/components/radio/index.md +7 -7
  116. package/components/radio/radio.jsx +5 -1
  117. package/components/radio/styles/index.less +26 -32
  118. package/components/rate/index.md +11 -11
  119. package/components/rate/styles/index.less +4 -7
  120. package/components/select/select.jsx +2 -2
  121. package/components/select/styles/index.less +37 -50
  122. package/components/skeleton/index.md +5 -1
  123. package/components/skeleton/styles/index.less +21 -19
  124. package/components/slider/slider.jsx +25 -13
  125. package/components/slider/styles/index.less +13 -12
  126. package/components/space/space.jsx +2 -1
  127. package/components/spin/styles/index.less +25 -40
  128. package/components/statCard/demo/card.md +18 -4
  129. package/components/statCard/index.md +5 -5
  130. package/components/statCard/statCard.jsx +4 -1
  131. package/components/statCard/styles/index.less +9 -6
  132. package/components/styles/less-css-var.less +305 -0
  133. package/components/styles/less-var.less +296 -0
  134. package/components/styles/sys.less +19 -15
  135. package/components/switch/styles/index.less +9 -24
  136. package/components/table/index.md +1 -1
  137. package/components/table/styles/index.less +63 -59
  138. package/components/table/table.jsx +1 -1
  139. package/components/tabs/styles/index.less +22 -24
  140. package/components/tag/demo/basic.md +0 -8
  141. package/components/tag/index.md +2 -1
  142. package/components/tag/styles/index.less +40 -41
  143. package/components/tag/tag.jsx +2 -2
  144. package/components/timeline/styles/index.less +8 -14
  145. package/components/tooltip/styles/index.less +35 -40
  146. package/components/tree/index.md +15 -15
  147. package/components/tree/styles/index.less +36 -56
  148. package/components/tree/tree.jsx +1 -0
  149. package/components/treeselect/index.md +1 -1
  150. package/components/treeselect/styles/index.less +26 -32
  151. package/components/treeselect/treeselect.jsx +3 -3
  152. package/components/upload/demo/forms.md +0 -1
  153. package/components/upload/fileList.jsx +6 -3
  154. package/components/upload/styles/index.less +33 -29
  155. package/components/upload/upload.jsx +5 -1
  156. package/components/utils/vue.js +4 -2
  157. package/dist/k-ui.cjs.js +3 -2
  158. package/dist/k-ui.css +4 -3
  159. package/dist/k-ui.d.ts +71 -54
  160. package/dist/k-ui.esm.js +3 -2
  161. package/dist/k-ui.umd.js +3 -2
  162. package/dist/locale/de.js +2 -1
  163. package/dist/locale/el.js +2 -1
  164. package/dist/locale/en.js +2 -1
  165. package/dist/locale/fr.js +2 -1
  166. package/dist/locale/it.js +2 -1
  167. package/dist/locale/ja.js +2 -1
  168. package/dist/locale/ko.js +2 -1
  169. package/dist/locale/ru.js +2 -1
  170. package/dist/locale/th.js +2 -1
  171. package/dist/locale/uk.js +2 -1
  172. package/dist/locale/vi.js +2 -1
  173. package/dist/locale/zh-CN.js +2 -1
  174. package/dist/locale/zh-TW.js +2 -1
  175. package/package.json +14 -16
  176. package/types/alert/Alert.d.ts +2 -0
  177. package/types/card/Card.d.ts +1 -1
  178. package/types/checkbox/Checkbox.d.ts +1 -0
  179. package/types/datePicker/DatePicker.d.ts +1 -0
  180. package/types/index.d.ts +6 -6
  181. package/types/input/Input.d.ts +1 -0
  182. package/types/input/InputGroup.d.ts +2 -0
  183. package/types/input/TextArea.d.ts +1 -0
  184. package/types/inputNumber/InputNumber.d.ts +1 -0
  185. package/types/menu/Menu.d.ts +1 -0
  186. package/types/page/Page.d.ts +1 -0
  187. package/types/select/Select.d.ts +1 -0
  188. package/types/statCard/StatCard.d.ts +2 -0
  189. package/types/table/Table.d.ts +1 -1
  190. package/types/tag/Tag.d.ts +1 -0
  191. package/types/treeselect/TreeSelect.d.ts +1 -0
  192. package/components/dropdown/demo/custom.md +0 -31
  193. package/components/icon/lib/dist.json +0 -1
  194. package/components/icon/lib/kui-icons.js +0 -1
  195. package/components/icon/lib/sprite.svg +0 -1
  196. package/components/styles/color.less +0 -209
  197. package/components/styles/var.less +0 -207
@@ -1,4 +1,4 @@
1
- @import '../../styles/var.less';
1
+ @import "../../styles/less-css-var.less";
2
2
  .k-timeline {
3
3
  background-color: transparent;
4
4
  font-size: 12px;
@@ -8,7 +8,7 @@
8
8
  margin: 0;
9
9
  padding: 0;
10
10
  list-style: none;
11
- color: var(--kui-color-font);
11
+ color: var(--kui-color-text);
12
12
  width: 100%;
13
13
  .k-time-line-item {
14
14
  position: relative;
@@ -27,13 +27,11 @@
27
27
  }
28
28
  .k-time-line-dot {
29
29
  position: absolute;
30
- // background: var(--kui-color-back);
31
30
  top: 2px;
32
31
  left: 0;
33
32
  font-size: 16px;
34
33
  color: #ccc;
35
34
  line-height: 1;
36
- // border-radius: 50%;
37
35
  }
38
36
  .k-time-line-head {
39
37
  border-radius: 50%;
@@ -41,14 +39,10 @@
41
39
  width: 10px;
42
40
  height: 10px;
43
41
  display: block;
44
- background-color: var(--kui-color-back);
42
+ background-color: var(--kui-color-bg);
45
43
  box-sizing: content-box;
46
44
  }
47
- // .k-time-line-icon-default {
48
- // font-size: 12px;
49
- // left: 1px;
50
- // top: 4px;
51
- // }
45
+
52
46
  .k-time-line-item-content {
53
47
  padding: 0 0 20px 25px;
54
48
  font-size: 14px;
@@ -59,13 +53,13 @@
59
53
  }
60
54
  .k-time-line-item-time {
61
55
  font-size: 12px;
62
- color: var(--kui-color-gray-30);
56
+ color: var(--kui-color-text-placeholder);
63
57
  margin-top: 4px;
64
58
  line-height: 16px;
65
59
  }
66
60
  .k-time-line-item-extra {
67
61
  font-size: 12px;
68
- color: var(--kui-color-gray-30);
62
+ color: var(--kui-color-text-description);
69
63
  margin-top: 4px;
70
64
  line-height: 16px;
71
65
  }
@@ -128,6 +122,6 @@
128
122
  margin-left: -12.5px;
129
123
  }
130
124
  .k-time-line-item-content {
131
- padding-right: 18px
125
+ padding-right: 18px;
132
126
  }
133
- }
127
+ }
@@ -1,4 +1,4 @@
1
- @import '../../styles/var.less';
1
+ @import "../../styles/less-css-var.less";
2
2
 
3
3
  .k-tooltip {
4
4
  display: inline-block;
@@ -11,16 +11,12 @@
11
11
  transform: translateZ(0);
12
12
 
13
13
  .k-tooltip-content {
14
- // min-width: 200px;
15
- // .k-tooltip-inner {
16
- // background: @dark-back-color-10; // var(--kui-color-back-10);
17
- background: #333; // var(--kui-color-back-10);
18
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
19
- color: #fff; //var(--kui-color-font);
20
- border-radius: 8px; // var(--kui-border-radius);
14
+ background: @dark-pop-color;
15
+ box-shadow: 0 2px 8px @shadow-color;
16
+ color: #fff;
17
+ border-radius: var(--kui-border-radius-card);
21
18
  position: relative;
22
19
  min-width: 36px;
23
- // }
24
20
  }
25
21
 
26
22
  .k-tooltip-title {
@@ -33,12 +29,11 @@
33
29
  box-sizing: border-box;
34
30
  display: flex;
35
31
  width: 24px;
36
- height: 7px;
37
- // color: @dark-back-color-10;
38
- color: #333;
32
+ height: 7px;
33
+ color: @dark-pop-color;
39
34
  }
40
35
 
41
- &[k-placement^=top] {
36
+ &[k-placement^="top"] {
42
37
  .k-tooltip-content {
43
38
  margin-bottom: 6px;
44
39
  }
@@ -48,26 +43,26 @@
48
43
  }
49
44
  }
50
45
 
51
- &[k-placement=top] {
46
+ &[k-placement="top"] {
52
47
  .k-tooltip-arrow {
53
48
  left: 50%;
54
49
  transform: translateX(-50%);
55
50
  }
56
51
  }
57
52
 
58
- &[k-placement=top-right] {
53
+ &[k-placement="top-right"] {
59
54
  .k-tooltip-arrow {
60
55
  right: 12px;
61
56
  }
62
57
  }
63
58
 
64
- &[k-placement=top-left] {
59
+ &[k-placement="top-left"] {
65
60
  .k-tooltip-arrow {
66
61
  left: 12px;
67
62
  }
68
63
  }
69
64
 
70
- &[k-placement^=bottom] {
65
+ &[k-placement^="bottom"] {
71
66
  .k-tooltip-content {
72
67
  margin-top: 6px;
73
68
  }
@@ -79,26 +74,26 @@
79
74
  }
80
75
  }
81
76
 
82
- &[k-placement=bottom] {
77
+ &[k-placement="bottom"] {
83
78
  .k-tooltip-arrow {
84
79
  left: 50%;
85
80
  transform: translateX(-50%) rotate(180deg);
86
81
  }
87
82
  }
88
83
 
89
- &[k-placement=bottom-left] {
84
+ &[k-placement="bottom-left"] {
90
85
  .k-tooltip-arrow {
91
86
  left: 12px;
92
87
  }
93
88
  }
94
89
 
95
- &[k-placement=bottom-right] {
90
+ &[k-placement="bottom-right"] {
96
91
  .k-tooltip-arrow {
97
92
  right: 12px;
98
93
  }
99
94
  }
100
95
 
101
- &[k-placement^=left] {
96
+ &[k-placement^="left"] {
102
97
  .k-tooltip-content {
103
98
  margin-right: 6px;
104
99
  }
@@ -111,54 +106,54 @@
111
106
  }
112
107
  }
113
108
 
114
- &[k-placement=left] {
109
+ &[k-placement="left"] {
115
110
  .k-tooltip-arrow {
116
111
  top: 50%;
117
112
  transform: translateY(-50%) rotate(-90deg);
118
113
  }
119
114
  }
120
115
 
121
- &[k-placement=left-bottom] {
116
+ &[k-placement="left-bottom"] {
122
117
  .k-tooltip-arrow {
123
- bottom: 14px;
118
+ bottom: 15px;
124
119
  }
125
120
  }
126
121
 
127
- &[k-placement=left-top] {
122
+ &[k-placement="left-top"] {
128
123
  .k-tooltip-arrow {
129
- top: 14px;
124
+ top: 15px;
130
125
  }
131
126
  }
132
127
 
133
- &[k-placement^=right] {
128
+ &[k-placement^="right"] {
134
129
  .k-tooltip-content {
135
130
  margin-left: 6px;
136
131
  }
137
132
 
138
133
  .k-tooltip-arrow {
139
134
  left: -14px;
140
- width: 23px;
141
- height: 9px;
135
+ width: 24px;
136
+ height: 7px;
142
137
  transform: rotate(90deg);
143
138
  }
144
139
  }
145
140
 
146
- &[k-placement=right] {
141
+ &[k-placement="right"] {
147
142
  .k-tooltip-arrow {
148
143
  top: 50%;
149
144
  transform: translateY(-50%) rotate(90deg);
150
145
  }
151
146
  }
152
147
 
153
- &[k-placement=right-top] {
148
+ &[k-placement="right-top"] {
154
149
  .k-tooltip-arrow {
155
- top: 14px;
150
+ top: 15px;
156
151
  }
157
152
  }
158
153
 
159
- &[k-placement=right-bottom] {
154
+ &[k-placement="right-bottom"] {
160
155
  .k-tooltip-arrow {
161
- bottom: 14px;
156
+ bottom: 15px;
162
157
  }
163
158
  }
164
159
  }
@@ -304,7 +299,7 @@
304
299
  @keyframes k-pop-zoom {
305
300
  from {
306
301
  opacity: 0;
307
- transform: scale(.8, .8);
302
+ transform: scale(0.8, 0.8);
308
303
  }
309
304
 
310
305
  to {
@@ -315,17 +310,17 @@
315
310
 
316
311
  .k-tooltip-enter-active {
317
312
  // transform-origin: center bottom;
318
- animation: k-pop-zoom .3s;
313
+ animation: k-pop-zoom 0.3s;
319
314
  }
320
315
 
321
316
  .k-tooltip-leave-active {
322
317
  // transform-origin: center bottom;
323
- animation: k-pop-zoom .3s reverse;
318
+ animation: k-pop-zoom 0.3s reverse;
324
319
  }
325
320
 
326
- body[theme-mode=dark],
327
- *[theme-mode=dark] {
321
+ body[theme-mode="dark"],
322
+ *[theme-mode="dark"] {
328
323
  .k-tooltip .k-tooltip-content {
329
324
  // background-color: #999;
330
325
  }
331
- }
326
+ }
@@ -1,20 +1,20 @@
1
1
  ## Tree API
2
2
 
3
- | 属性 | 说明 | 类型 | 默认值 |
4
- | ------------- | ------------------------------------------------------------ | ------- | ------ |
5
- | data | 可嵌套的节点属性的数组,生成 `tree` 的数据 | Array | [] |
6
- | checkable | 是否显示多选框 | Boolean | false |
7
- | draggable | 是否可以拖拽 | Boolean | false |
8
- | showLine | 是否展示连接线 | Boolean | false |
9
- | showIcon | 是否展示图标 | Boolean | true |
10
- | extra | 扩展元素 | slot(node) | - |
11
- | showExtra | 是否默认展示扩展元素 | Boolean | false |
12
- | checkStrictly | checkable 状态下节点选择完全受控(父子节点选中状态不再关联) | Boolean | false |
13
- | checkedKeys | 选中复选框的树节点 | Array | [] |
14
- | expandedKeys | 指定展开的节点 | Array | [] |
15
- | selectedKeys | 选中的节点 | Array | [] |
16
- | multiple | 是否支持多选 | Boolean | false |
17
- | loading | 异步加载状态 | Boolean | false |
3
+ | 属性 | 说明 | 类型 | 默认值 |
4
+ | ------------- | ------------------------------------------------------------ | ---------- | ------ |
5
+ | data | 可嵌套的节点属性的数组,生成 `tree` 的数据 | Array | [] |
6
+ | checkable | 是否显示多选框 | Boolean | false |
7
+ | draggable | 是否可以拖拽 | Boolean | false |
8
+ | showLine | 是否展示连接线 | Boolean | false |
9
+ | showIcon | 是否展示图标 | Boolean | true |
10
+ | extra | 扩展元素 | slot(node) | - |
11
+ | showExtra | 是否默认展示扩展元素 | Boolean | false |
12
+ | checkStrictly | checkable 状态下节点选择完全受控(父子节点选中状态不再关联) | Boolean | false |
13
+ | checkedKeys | 选中复选框的树节点 | Array | [] |
14
+ | expandedKeys | 指定展开的节点 | Array | [] |
15
+ | selectedKeys | 选中的节点 | Array | [] |
16
+ | multiple | 是否支持多选 | Boolean | false |
17
+ | loading | 异步加载状态 | Boolean | false |
18
18
 
19
19
  ## TreeNode API
20
20
 
@@ -1,4 +1,4 @@
1
- @import "../../styles/var.less";
1
+ @import "../../styles/less-css-var.less";
2
2
 
3
3
  .k-tree {
4
4
  .k-tree-item {
@@ -7,6 +7,7 @@
7
7
  list-style: none;
8
8
  white-space: nowrap;
9
9
  outline: 0;
10
+ -webkit-user-select: none;
10
11
  user-select: none;
11
12
  display: flex;
12
13
  align-items: center;
@@ -46,23 +47,27 @@
46
47
  margin-left: 4px;
47
48
  align-items: center;
48
49
  z-index: 0;
49
- border-radius: @radius;
50
+ border-radius: var(--kui-border-radius);
50
51
  cursor: pointer;
51
- color: var(--kui-color-font);
52
+ color: var(--kui-color-text);
52
53
  line-height: 1;
53
54
  overflow: hidden;
54
55
  text-overflow: ellipsis;
55
56
  font-size: 14px;
56
57
  min-height: 24px;
57
- &:hover {
58
- background: var(--kui-color-hover);
59
- outline: none;
58
+ &:not([disabled="disabled"],.k-tree-title-selected) {
59
+ &:hover {
60
+ background-color: var(--kui-color-item-hover);
61
+ }
62
+ &:active {
63
+ background-color: var(--kui-color-item-active);
64
+ }
60
65
  }
61
66
  }
62
67
 
63
68
  .k-tree-item-drop {
64
69
  > .k-tree-title {
65
- background-color: var(--kui-color-main) !important;
70
+ background-color: var(--kui-color-primary) !important;
66
71
  color: #fff;
67
72
  }
68
73
  }
@@ -76,7 +81,7 @@
76
81
  overflow: hidden;
77
82
  text-overflow: ellipsis;
78
83
  position: absolute;
79
- right: 0
84
+ right: 0;
80
85
  }
81
86
 
82
87
  .k-tree-item-extra-hidden {
@@ -94,24 +99,13 @@
94
99
  .k-tree-item-disabled {
95
100
  .k-tree-title,
96
101
  .k-tree-icon {
97
- color: var(--kui-color-disabled);
102
+ color: var(--kui-color-text-disabled);
98
103
  cursor: not-allowed;
99
104
  }
100
-
101
- .k-tree-title {
102
- &:hover,
103
- &:focus {
104
- background-color: transparent;
105
- }
106
- }
107
105
  }
108
106
 
109
107
  .k-tree-title-selected {
110
- background: var(--kui-color-selected);
111
-
112
- &:hover {
113
- background: var(--kui-color-selected);
114
- }
108
+ background: var(--kui-color-item-selected);
115
109
  }
116
110
 
117
111
  .k-tree-arrow {
@@ -135,7 +129,7 @@
135
129
  .tree-nodata {
136
130
  padding: 8px 10px;
137
131
  display: block;
138
- color: var(--kui-color-disabled);
132
+ color: var(--kui-color-text-disabled);
139
133
  font-size: 12px;
140
134
  }
141
135
  }
@@ -143,17 +137,11 @@
143
137
  .k-tree-directory {
144
138
  position: relative;
145
139
 
146
- .k-tree-title {
147
- &:hover,
148
- &:focus {
149
- background-color: transparent;
150
- }
151
- }
152
-
153
140
  .k-tree-item {
154
141
  cursor: pointer;
155
142
  position: relative;
156
143
  &::before {
144
+ border-radius: var(--kui-border-radius);
157
145
  content: "";
158
146
  position: absolute;
159
147
  left: 0;
@@ -163,14 +151,18 @@
163
151
  }
164
152
  }
165
153
 
166
- .k-tree-item:hover::before {
167
- background-color: var(--kui-color-hover);
154
+ .k-tree-item:not(.k-tree-item-selected) {
155
+ &:hover::before {
156
+ background-color: var(--kui-color-item-hover);
157
+ }
158
+ &:active::before {
159
+ background-color: var(--kui-color-item-active);
160
+ }
168
161
  }
169
162
 
170
- .k-tree-item-selected,
171
- .k-tree-item-selected:hover {
163
+ .k-tree-item-selected {
172
164
  &::before {
173
- background-color: var(--kui-color-selected);
165
+ background-color: var(--kui-color-item-selected);
174
166
  }
175
167
 
176
168
  .k-tree-title,
@@ -178,19 +170,8 @@
178
170
  background-color: transparent;
179
171
  }
180
172
  }
181
-
182
- .k-tree-item-disabled:hover {
183
- cursor: not-allowed;
184
-
185
- .k-tree-title {
186
- color: var(--kui-color-disabled);
187
- }
188
-
189
- &::before {
190
- display: none;
191
- }
192
- }
193
173
  }
174
+
194
175
  //line
195
176
  /* 基础缩进块大小 */
196
177
  .k-tree-indent-line,
@@ -204,19 +185,18 @@
204
185
  flex-shrink: 0;
205
186
  }
206
187
 
207
-
208
188
  //line-en
209
189
  .k-tree-show-line {
210
190
  /* 1. 垂直贯穿线 (父节点不是最后) */
211
- .k-tree-indent-line::before {
212
- content: "";
213
- position: absolute;
214
- height: 28px;
215
- top: 0;
216
- bottom: 0;
217
- left: 50%; /* 居中画线 */
218
- border-left: 1px solid var(--kui-color-border);
219
- }
191
+ .k-tree-indent-line::before {
192
+ content: "";
193
+ position: absolute;
194
+ height: 28px;
195
+ top: 0;
196
+ bottom: 0;
197
+ left: 50%; /* 居中画线 */
198
+ border-left: 1px solid var(--kui-color-border);
199
+ }
220
200
 
221
201
  .k-tree-arrow {
222
202
  transform: rotate(90deg);
@@ -530,6 +530,7 @@ const Tree = defineComponent({
530
530
  },
531
531
  attrs: {
532
532
  draggable: ps.draggable && !item.disabled,
533
+ disabled: item.disabled,
533
534
  },
534
535
  };
535
536
  // 添加拖拽事件
@@ -9,7 +9,7 @@
9
9
  | size | 组件尺寸大小,提供`small`,`large`两种尺寸,默认为正常 | String | - |
10
10
  | emptyText | 没有数据时展示的提示 | String | '赞无数据' |
11
11
  | multiple | 是否呈现多选模式 | Boolean | false |
12
- | loading | 异步加载状态 | Boolean | false |
12
+ | loading | 异步加载状态 | Boolean | false |
13
13
  | clearable | 是否可以清空选项 | Boolean | false |
14
14
  | bordered | 是否显示边框 | Boolean | true |
15
15
  | showArrow | 是否显示下拉按钮 | Boolean | true |
@@ -1,4 +1,4 @@
1
- @import "../../styles/var.less";
1
+ @import "../../styles/less-css-var.less";
2
2
 
3
3
  .k-tree-select {
4
4
  display: inline-flex;
@@ -6,14 +6,14 @@
6
6
  min-width: 80px;
7
7
  box-sizing: border-box;
8
8
  vertical-align: middle;
9
- color: var(--kui-color-font);
9
+ color: var(--kui-color-text);
10
10
  font-size: 14px;
11
11
  position: relative;
12
12
  outline: none;
13
13
  box-sizing: border-box;
14
14
  // flex-shrink: 0;
15
15
  align-items: center;
16
- background-color: var(--kui-color-back);
16
+ background-color: var(--kui-color-bg);
17
17
  border-radius: var(--kui-border-radius);
18
18
  border: 1px solid var(--kui-color-border);
19
19
  padding: 0 8px;
@@ -22,12 +22,12 @@
22
22
  position: relative;
23
23
  // max-width: 100%;
24
24
  &:not(.k-tree-select-disabled, .k-tree-select-borderless):focus {
25
- outline: 2px solid var(--kui-color-main-80);
25
+ outline: 2px solid var(--kui-color-outline);
26
26
  outline-offset: 1px;
27
27
  }
28
28
  &:hover {
29
- border-color: var(--kui-color-main);
30
- box-shadow: 0 0 0 2px var(--kui-color-main-90);
29
+ border-color: var(--kui-color-primary);
30
+ box-shadow: var(--kui-component-shadow);
31
31
  }
32
32
 
33
33
  &-selection {
@@ -72,7 +72,7 @@
72
72
  background: none;
73
73
  outline: none;
74
74
  font-size: 14px;
75
- color: var(--kui-color-font);
75
+ color: var(--kui-color-text);
76
76
  }
77
77
  }
78
78
 
@@ -97,13 +97,9 @@
97
97
  transition: all 0.25s ease-in-out;
98
98
 
99
99
  .k-icon {
100
- // position: absolute;
101
- // right: 3px;
102
100
  font-size: 16px;
103
101
  text-align: center;
104
102
  display: block;
105
- // top: 50%;
106
- // transform: translateY(-50%);
107
103
  }
108
104
  }
109
105
 
@@ -135,7 +131,7 @@
135
131
  line-height: 1.571;
136
132
  overflow: hidden;
137
133
  text-overflow: ellipsis;
138
- color: var(--kui-color-disabled);
134
+ color: var(--kui-color-text-disabled);
139
135
  white-space: nowrap;
140
136
  max-width: 100%;
141
137
  box-sizing: border-box;
@@ -184,14 +180,17 @@
184
180
  display: none;
185
181
  cursor: pointer;
186
182
  &:hover {
187
- color: var(--kui-color-font);
183
+ color: var(--kui-color-icon-hover);
184
+ }
185
+ &:active {
186
+ color: var(--kui-color-icon-active);
188
187
  }
189
188
  }
190
189
 
191
190
  .k-tree-select-search-mirror,
192
191
  .k-tree-select-search {
193
192
  font-size: 14px;
194
- color: var(--kui-color-font);
193
+ color: var(--kui-color-text);
195
194
  }
196
195
 
197
196
  &.k-tree-select-circle {
@@ -226,7 +225,7 @@
226
225
  .k-tree-select-light {
227
226
  &.k-tree-select {
228
227
  border-color: transparent;
229
- background: var(--kui-color-gray-80);
228
+ background: var(--kui-color-bg-component);
230
229
  transition: none;
231
230
  // box-shadow: none;
232
231
 
@@ -236,7 +235,7 @@
236
235
  }
237
236
 
238
237
  .k-tree-select-tag {
239
- background-color: var(--kui-color-gray-80);
238
+ background-color: var(--kui-color-bg-component);
240
239
  border-color: transparent;
241
240
  }
242
241
  }
@@ -250,24 +249,26 @@
250
249
  width: 100%;
251
250
  }
252
251
  .k-tree-select-dropdown {
252
+ -webkit-user-select: none;
253
253
  user-select: none;
254
254
  border-radius: var(--kui-border-radius);
255
255
  width: inherit;
256
256
  max-height: 272px;
257
257
  overflow: auto;
258
- background-color: var(--kui-color-back-10);
258
+ background-color: var(--kui-color-bg-pop);
259
259
  box-sizing: border-box;
260
- box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
260
+ box-shadow: var(--kui-pop-shadow);
261
+
261
262
  position: absolute;
262
263
  z-index: 1003;
263
264
  padding: 5px;
264
265
  box-sizing: border-box;
265
- border: 1px solid var(--kui-color-gray-80);
266
+ border: 1px solid var(--kui-color-pop-border);
266
267
 
267
268
  .k-tree-select-loading {
268
269
  padding: 10px;
269
270
  font-size: 14px;
270
- color: var(--kui-color-font);
271
+ color: var(--kui-color-text);
271
272
  display: flex;
272
273
  align-items: center;
273
274
 
@@ -310,7 +311,6 @@
310
311
  .k-tree-select-label {
311
312
  line-height: 22px;
312
313
  height: 22px;
313
- // padding-right: 23px;
314
314
  font-size: 12px;
315
315
  }
316
316
 
@@ -354,7 +354,7 @@
354
354
  .k-tree-select-search-mirror,
355
355
  .k-tree-select-search {
356
356
  font-size: 12px;
357
- color: var(--kui-color-font);
357
+ color: var(--kui-color-text);
358
358
  }
359
359
  }
360
360
 
@@ -416,8 +416,8 @@
416
416
  }
417
417
 
418
418
  .k-tree-select-opened {
419
- border-color: var(--kui-color-main);
420
- box-shadow: 0 0 0 2px var(--kui-color-main-90);
419
+ border-color: var(--kui-color-primary);
420
+ box-shadow: var(--kui-component-shadow);
421
421
 
422
422
  .k-tree-select-label {
423
423
  opacity: 0.5;
@@ -430,8 +430,8 @@
430
430
  }
431
431
 
432
432
  .k-tree-select-disabled {
433
- color: var(--kui-color-disabled);
434
- background: var(--kui-color-disable-back);
433
+ color: var(--kui-color-text-disabled);
434
+ background: var(--kui-color-bg-component-disabled);
435
435
 
436
436
  .k-tree-select-label {
437
437
  cursor: not-allowed;
@@ -444,12 +444,6 @@
444
444
  .k-tree-select-arrow {
445
445
  color: var(--kui-color-disable-border);
446
446
  }
447
-
448
- &:hover,
449
- &:focus {
450
- border-color: var(--kui-color-disable-border);
451
- box-shadow: none;
452
- }
453
447
  }
454
448
 
455
449
  .k-tree-select-has-clear {