kui-vue 3.6.5 → 3.6.8

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 (187) 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 +5 -5
  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 -7
  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/styles/animal.less +0 -1
  32. package/components/drawer/styles/index.less +8 -11
  33. package/components/dropdown/styles/index.less +26 -34
  34. package/components/empty/index.md +3 -2
  35. package/components/empty/styles/index.less +2 -2
  36. package/components/flex/demo/align.md +1 -1
  37. package/components/flex/demo/basic.md +1 -2
  38. package/components/flex/index.md +1 -1
  39. package/components/form/demo/dynamicvalid.md +1 -3
  40. package/components/form/demo/info.md +22 -12
  41. package/components/form/demo/valid.md +6 -6
  42. package/components/form/demo/withmodal.md +2 -2
  43. package/components/form/styles/index.less +10 -11
  44. package/components/grid/index.md +4 -1
  45. package/components/grid/styles/index.less +1 -1
  46. package/components/icon/demo/search.vue +44 -21
  47. package/components/icon/index.md +1 -1
  48. package/components/icon/styles/index.less +7 -8
  49. package/components/image/index.md +7 -1
  50. package/components/image/preview.jsx +17 -4
  51. package/components/image/styles/index.less +36 -42
  52. package/components/index.js +9 -9
  53. package/components/input/demo/icon.md +0 -1
  54. package/components/input/demo/suffix.md +2 -7
  55. package/components/input/input.jsx +31 -29
  56. package/components/input/inputBox.jsx +13 -0
  57. package/components/input/inputGroup.jsx +2 -0
  58. package/components/input/styles/index.less +47 -53
  59. package/components/input/textarea.jsx +1 -1
  60. package/components/inputNumber/demo/basic.md +3 -3
  61. package/components/inputNumber/demo/ffix.md +2 -2
  62. package/components/inputNumber/inputNumber.jsx +2 -2
  63. package/components/inputNumber/styles/index.less +36 -42
  64. package/components/layout/demo/basic.md +5 -5
  65. package/components/layout/demo/info.md +1 -34
  66. package/components/layout/demo/layout1.md +7 -7
  67. package/components/layout/demo/layout2.md +6 -7
  68. package/components/layout/demo/layout3.md +5 -5
  69. package/components/layout/demo/layout4.md +12 -8
  70. package/components/layout/demo/layout5.md +6 -2
  71. package/components/layout/styles/index.less +1 -18
  72. package/components/loading/demo/info.md +3 -3
  73. package/components/loading/styles/index.less +31 -31
  74. package/components/menu/index.md +14 -3
  75. package/components/menu/menu.jsx +1 -1
  76. package/components/menu/recursiveMenu.jsx +1 -0
  77. package/components/menu/styles/index.less +43 -55
  78. package/components/message/demo/basic.md +0 -7
  79. package/components/message/index.js +0 -4
  80. package/components/message/index.md +0 -1
  81. package/components/message/inner.jsx +15 -2
  82. package/components/message/styles/index.less +12 -17
  83. package/components/modal/demo/confirm.md +6 -6
  84. package/components/modal/demo/global.md +0 -15
  85. package/components/modal/demo/info.md +0 -1
  86. package/components/modal/index.js +5 -34
  87. package/components/modal/index.md +1 -2
  88. package/components/modal/modal.jsx +2 -1
  89. package/components/modal/styles/index.less +14 -21
  90. package/components/notice/demo/basic.md +0 -9
  91. package/components/notice/demo/close.md +4 -0
  92. package/components/notice/demo/types.md +1 -2
  93. package/components/notice/index.js +1 -19
  94. package/components/notice/styles/index.less +16 -22
  95. package/components/page/page.jsx +5 -4
  96. package/components/page/styles/index.less +49 -50
  97. package/components/popconfirm/demo/basic.md +11 -18
  98. package/components/popconfirm/demo/info.md +3 -1
  99. package/components/popconfirm/demo/local.md +14 -20
  100. package/components/popconfirm/demo/placement.md +3 -9
  101. package/components/popconfirm/index.md +3 -2
  102. package/components/popconfirm/styles/index.less +9 -15
  103. package/components/poptip/styles/index.less +44 -49
  104. package/components/progress/progress.jsx +23 -5
  105. package/components/progress/styles/index.less +20 -19
  106. package/components/radio/index.md +7 -7
  107. package/components/radio/radio.jsx +5 -1
  108. package/components/radio/styles/index.less +26 -32
  109. package/components/rate/index.md +11 -11
  110. package/components/rate/styles/index.less +4 -7
  111. package/components/select/select.jsx +1 -1
  112. package/components/select/styles/index.less +38 -51
  113. package/components/skeleton/index.md +5 -1
  114. package/components/skeleton/styles/index.less +21 -19
  115. package/components/slider/slider.jsx +25 -13
  116. package/components/slider/styles/index.less +13 -12
  117. package/components/space/space.jsx +2 -1
  118. package/components/spin/styles/index.less +25 -40
  119. package/components/statCard/countup.jsx +8 -0
  120. package/components/statCard/demo/card.md +20 -6
  121. package/components/statCard/index.md +17 -12
  122. package/components/statCard/statCard.jsx +16 -1
  123. package/components/statCard/styles/index.less +9 -6
  124. package/components/styles/less-css-var.less +309 -0
  125. package/components/styles/less-var.less +296 -0
  126. package/components/styles/sys.less +19 -15
  127. package/components/switch/styles/index.less +9 -24
  128. package/components/table/index.md +1 -1
  129. package/components/table/styles/index.less +63 -59
  130. package/components/tabs/styles/index.less +22 -24
  131. package/components/tag/demo/basic.md +0 -8
  132. package/components/tag/index.md +2 -1
  133. package/components/tag/styles/index.less +40 -41
  134. package/components/tag/tag.jsx +2 -2
  135. package/components/timeline/styles/index.less +8 -14
  136. package/components/tooltip/styles/index.less +35 -40
  137. package/components/tree/index.md +15 -15
  138. package/components/tree/styles/index.less +36 -56
  139. package/components/tree/tree.jsx +1 -0
  140. package/components/treeselect/index.md +1 -1
  141. package/components/treeselect/styles/index.less +26 -32
  142. package/components/treeselect/treeselect.jsx +1 -1
  143. package/components/upload/demo/forms.md +0 -1
  144. package/components/upload/fileList.jsx +6 -3
  145. package/components/upload/styles/index.less +33 -29
  146. package/components/upload/upload.jsx +5 -1
  147. package/components/utils/vue.js +4 -2
  148. package/dist/k-ui.cjs.js +2 -2
  149. package/dist/k-ui.css +2 -2
  150. package/dist/k-ui.d.ts +92 -74
  151. package/dist/k-ui.esm.js +2 -2
  152. package/dist/k-ui.umd.js +2 -2
  153. package/dist/locale/de.js +1 -1
  154. package/dist/locale/el.js +1 -1
  155. package/dist/locale/en.js +1 -1
  156. package/dist/locale/fr.js +1 -1
  157. package/dist/locale/it.js +1 -1
  158. package/dist/locale/ja.js +1 -1
  159. package/dist/locale/ko.js +1 -1
  160. package/dist/locale/ru.js +1 -1
  161. package/dist/locale/th.js +1 -1
  162. package/dist/locale/ua.js +2 -2
  163. package/dist/locale/uk.js +1 -1
  164. package/dist/locale/vi.js +1 -1
  165. package/dist/locale/zh-CN.js +1 -1
  166. package/dist/locale/zh-TW.js +1 -1
  167. package/package.json +15 -16
  168. package/types/alert/Alert.d.ts +2 -0
  169. package/types/card/Card.d.ts +1 -1
  170. package/types/checkbox/Checkbox.d.ts +1 -0
  171. package/types/datePicker/DatePicker.d.ts +1 -0
  172. package/types/index.d.ts +8 -8
  173. package/types/input/Input.d.ts +1 -0
  174. package/types/input/InputGroup.d.ts +2 -0
  175. package/types/input/TextArea.d.ts +1 -0
  176. package/types/inputNumber/InputNumber.d.ts +1 -0
  177. package/types/page/Page.d.ts +1 -0
  178. package/types/select/Select.d.ts +1 -0
  179. package/types/statCard/StatCard.d.ts +5 -0
  180. package/types/tag/Tag.d.ts +1 -0
  181. package/types/treeselect/TreeSelect.d.ts +1 -0
  182. package/components/dropdown/demo/custom.md +0 -31
  183. package/components/icon/lib/dist.json +0 -1
  184. package/components/icon/lib/kui-icons.js +0 -1
  185. package/components/icon/lib/sprite.svg +0 -1
  186. package/components/styles/color.less +0 -209
  187. 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
 
3
3
  .k-tag {
4
4
  display: inline-block;
@@ -7,7 +7,6 @@
7
7
  flex-shrink: 0;
8
8
  padding: 0 15px;
9
9
  border: 1px solid var(--kui-color-border);
10
- background-color: var(--kui-color-back);
11
10
  font-size: 14px;
12
11
  border-radius: var(--kui-border-radius);
13
12
  box-sizing: border-box;
@@ -15,7 +14,7 @@
15
14
  vertical-align: middle;
16
15
  display: inline-flex;
17
16
  align-items: center;
18
- color: var(--kui-color-font);
17
+ color: var(--kui-color-text);
19
18
 
20
19
  &.k-tag-circle {
21
20
  border-radius: 16px;
@@ -28,7 +27,7 @@
28
27
  .k-tag-close {
29
28
  font-size: 18px;
30
29
  margin-left: 2px;
31
- color: var(--kui-sub-title);
30
+ color: var(--kui-color-text-description);
32
31
  cursor: pointer;
33
32
  &:hover {
34
33
  color: var(--kui-color-danger);
@@ -40,80 +39,80 @@
40
39
  }
41
40
 
42
41
  &-pink {
43
- color: var(--kui-color-pink-30);
44
- border-color: var(--kui-color-pink-60);
45
- background-color: var(--kui-color-pink-90);
42
+ color: var(--kui-color-pink-3);
43
+ border-color: var(--kui-color-pink-6);
44
+ background-color: var(--kui-color-pink-9);
46
45
  }
47
46
 
48
47
  &-red {
49
- color: var(--kui-color-red-30);
50
- border-color: var(--kui-color-red-60);
51
- background-color: var(--kui-color-red-90);
48
+ color: var(--kui-color-red-3);
49
+ border-color: var(--kui-color-red-6);
50
+ background-color: var(--kui-color-red-9);
52
51
  }
53
52
 
54
53
  &-yellow {
55
- color: var(--kui-color-yellow-30);
56
- border-color: var(--kui-color-yellow-60);
57
- background-color: var(--kui-color-yellow-90);
54
+ color: var(--kui-color-yellow-3);
55
+ border-color: var(--kui-color-yellow-6);
56
+ background-color: var(--kui-color-yellow-9);
58
57
  }
59
58
 
60
59
  &-orange {
61
- color: var(--kui-color-orange-30);
62
- border-color: var(--kui-color-orange-60);
63
- background-color: var(--kui-color-orange-90);
60
+ color: var(--kui-color-orange-3);
61
+ border-color: var(--kui-color-orange-6);
62
+ background-color: var(--kui-color-orange-9);
64
63
  }
65
64
 
66
65
  &-cyan {
67
- color: var(--kui-color-cyan-30);
68
- border-color: var(--kui-color-cyan-60);
69
- background-color: var(--kui-color-cyan-90);
66
+ color: var(--kui-color-cyan-3);
67
+ border-color: var(--kui-color-cyan-6);
68
+ background-color: var(--kui-color-cyan-9);
70
69
  }
71
70
 
72
71
  &-green {
73
- color: var(--kui-color-green-30);
74
- border-color: var(--kui-color-green-60);
75
- background-color: var(--kui-color-green-90);
72
+ color: var(--kui-color-green-3);
73
+ border-color: var(--kui-color-green-6);
74
+ background-color: var(--kui-color-green-9);
76
75
  }
77
76
 
78
77
  &-blue {
79
- color: var(--kui-color-blue-30);
80
- border-color: var(--kui-color-blue-60);
81
- background-color: var(--kui-color-blue-90);
78
+ color: var(--kui-color-blue-3);
79
+ border-color: var(--kui-color-blue-6);
80
+ background-color: var(--kui-color-blue-9);
82
81
  }
83
82
 
84
83
  &-purple {
85
- color: var(--kui-color-purple-30);
86
- border-color: var(--kui-color-purple-60);
87
- background-color: var(--kui-color-purple-90);
84
+ color: var(--kui-color-purple-3);
85
+ border-color: var(--kui-color-purple-6);
86
+ background-color: var(--kui-color-purple-9);
88
87
  }
89
88
 
90
89
  &-magenta {
91
- color: var(--kui-color-magenta-30);
92
- border-color: var(--kui-color-magenta-60);
93
- background-color: var(--kui-color-magenta-90);
90
+ color: var(--kui-color-magenta-3);
91
+ border-color: var(--kui-color-magenta-6);
92
+ background-color: var(--kui-color-magenta-9);
94
93
  }
95
94
 
96
95
  &-volcano {
97
- color: var(--kui-color-volcano-30);
98
- border-color: var(--kui-color-volcano-60);
99
- background-color: var(--kui-color-volcano-90);
96
+ color: var(--kui-color-volcano-3);
97
+ border-color: var(--kui-color-volcano-6);
98
+ background-color: var(--kui-color-volcano-9);
100
99
  }
101
100
 
102
101
  &-gold {
103
- color: var(--kui-color-gold-30);
104
- border-color: var(--kui-color-gold-60);
105
- background-color: var(--kui-color-gold-90);
102
+ color: var(--kui-color-gold-3);
103
+ border-color: var(--kui-color-gold-6);
104
+ background-color: var(--kui-color-gold-9);
106
105
  }
107
106
 
108
107
  &-lime {
109
- color: var(--kui-color-lime-30);
110
- border-color: var(--kui-color-lime-60);
111
- background-color: var(--kui-color-lime-90);
108
+ color: var(--kui-color-lime-3);
109
+ border-color: var(--kui-color-lime-6);
110
+ background-color: var(--kui-color-lime-9);
112
111
  }
113
112
  }
114
113
  .k-tag-light {
115
114
  border-color: transparent;
116
- background-color: var(--kui-color-gray-80);
115
+ background-color: var(--kui-color-bg-component);
117
116
  }
118
117
  .k-tag-has-color {
119
118
  color: #fff;
@@ -17,7 +17,7 @@ const Tag = defineComponent({
17
17
  return ["small", "large", "middle"].indexOf(value) >= 0;
18
18
  },
19
19
  },
20
- theme: String,
20
+ theme: { type: String, default: "light" },
21
21
  },
22
22
  setup(ps, { slots, emit, listeners }) {
23
23
  const visible = ref(true);
@@ -58,7 +58,7 @@ const Tag = defineComponent({
58
58
  children.push(<span class="k-tag-text">{slots.default?.()}</span>);
59
59
  if (closeable) {
60
60
  children.push(
61
- <Icon class="k-tag-close" type={Close} onClick={closeHandler} />
61
+ <Icon class="k-tag-close" type={Close} onClick={closeHandler} />,
62
62
  );
63
63
  }
64
64
  return (
@@ -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 |