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,7 +1,7 @@
1
- @import "../../styles/var.less";
1
+ @import "../../styles/less-css-var.less";
2
2
 
3
3
  .k-modal {
4
- color: var(--kui-color-font);
4
+ color: var(--kui-color-text);
5
5
 
6
6
  .k-modal-wrap {
7
7
  position: fixed;
@@ -12,7 +12,6 @@
12
12
  z-index: 1001;
13
13
  overflow: auto;
14
14
  outline: 0;
15
- -webkit-overflow-scrolling: touch;
16
15
  }
17
16
 
18
17
  .k-modal-mask {
@@ -21,7 +20,7 @@
21
20
  bottom: 0;
22
21
  left: 0;
23
22
  right: 0;
24
- background-color: rgba(55, 55, 55, 0.6);
23
+ background-color: var(--kui-color-mask);
25
24
  height: 100%;
26
25
  z-index: 1001;
27
26
  overflow: hidden;
@@ -29,16 +28,17 @@
29
28
 
30
29
  .k-modal-inner {
31
30
  position: relative;
32
- background-color: var(--kui-color-back-10);
33
- border: 1px solid var(--kui-color-gray-80);
31
+ background-color: var(--kui-color-bg-pop);
32
+ border: 1px solid var(--kui-color-pop-border);
34
33
  z-index: 1001;
35
34
  outline: 0;
36
35
  border-radius: 12px;
37
36
  top: 100px;
38
37
  overflow: hidden;
39
38
  margin: 0 auto;
40
- box-shadow: 0 0 10px 3px rgba(55, 55, 55, 0.2);
41
- width: 480px; // animation: darken .5s ease-in-out;
39
+ box-shadow: var(--kui-pop-shadow);
40
+
41
+ width: 480px;
42
42
  }
43
43
 
44
44
  .k-modal-content {
@@ -51,8 +51,6 @@
51
51
 
52
52
  .k-modal-close {
53
53
  position: absolute;
54
- cursor: pointer;
55
- color: var(--kui-color-font);
56
54
  top: 20px;
57
55
  right: 20px;
58
56
  transition: all 0.3s ease-in-out;
@@ -61,17 +59,14 @@
61
59
  }
62
60
  &:hover {
63
61
  color: var(--kui-color-danger);
64
- border-radius: var(--kui-border-radius);
65
- background-color: var(--kui-color-gray-80);
66
- // transform: rotate(360deg);
67
62
  }
68
63
  }
69
64
 
70
65
  .k-modal-header {
71
- // border-bottom: 1px solid var(--kui-color-gray-80);
72
66
  padding: 20px 0;
73
67
  line-height: 1;
74
68
  font-size: 14px;
69
+ -webkit-user-select: none;
75
70
  user-select: none;
76
71
 
77
72
  .k-modal-header-inner {
@@ -86,17 +81,14 @@
86
81
  }
87
82
 
88
83
  .k-modal-body {
89
- // padding:20px 0;
90
84
  margin-bottom: 20px;
91
85
  font-size: 14px;
92
86
  line-height: 1.5;
93
- // height: calc(100% - 43px - 45px);
94
87
  overflow: auto;
95
88
  box-sizing: border-box;
96
89
  }
97
90
 
98
91
  .k-modal-footer {
99
- // border-top: 1px solid var(--kui-color-gray-80);
100
92
  padding: 0 0 20px 0;
101
93
  text-align: right;
102
94
  display: inline-block;
@@ -166,7 +158,6 @@
166
158
  width: 100%;
167
159
  bottom: 0;
168
160
  left: 0;
169
- background: var(--kui-color-back-10);
170
161
  box-sizing: border-box;
171
162
  padding-right: 20px;
172
163
  }
@@ -176,7 +167,7 @@
176
167
  .k-toast {
177
168
  .k-modal-inner {
178
169
  width: 416px;
179
- background: var(--kui-color-back-10);
170
+ background: var(--kui-color-bg-pop);
180
171
  border-radius: var(--kui-border-radius);
181
172
  padding: 20px;
182
173
  border-radius: 12px;
@@ -184,6 +175,8 @@
184
175
  }
185
176
 
186
177
  .k-toast-header {
178
+ display: flex;
179
+ align-items: center;
187
180
  .k-toast-icon {
188
181
  font-size: 28px;
189
182
  margin-right: 12px;
@@ -200,7 +193,7 @@
200
193
 
201
194
  .k-toast-content {
202
195
  padding-left: 40px;
203
- padding-top: 8px;
196
+ margin-top: 8px;
204
197
  font-size: 14px;
205
198
  }
206
199
 
@@ -227,7 +220,7 @@
227
220
  }
228
221
 
229
222
  .k-toast-info .k-toast-icon {
230
- color: var(--kui-color-main);
223
+ color: var(--kui-color-primary);
231
224
  }
232
225
 
233
226
  .k-toast-confirm .k-toast-icon {
@@ -7,19 +7,10 @@
7
7
  <template>
8
8
  <Space vertical>
9
9
  <Button @click="info" type="primary">普通提示</Button>
10
- <Button @click="useNotice" type="primary">useNotice</Button>
11
10
  </Space>
12
11
  </template>
13
12
  <script setup>
14
13
  import { notice } from "kui-vue";
15
- const api = notice.useNotice();
16
- const useNotice = () => {
17
- api.open({
18
- title: "通知的标题",
19
- content: "通知的描述",
20
- duration: 5,
21
- });
22
- };
23
14
  const info = () => {
24
15
  notice.open({
25
16
  title: "通知的标题",
@@ -9,6 +9,7 @@
9
9
  <Button @click="config">10秒后关闭</Button>
10
10
  <Button @click="config2" type="primary">5秒后关闭</Button>
11
11
  <Button @click="config3" type="primary">手动关闭</Button>
12
+ <Button @click="destroy" type="primary">destroy</Button>
12
13
  </Space>
13
14
  </template>
14
15
  <script setup>
@@ -41,5 +42,8 @@ const config3 = () => {
41
42
  },
42
43
  });
43
44
  };
45
+ const destroy = () => {
46
+ notice.destroy();
47
+ };
44
48
  </script>
45
49
  ```
@@ -14,9 +14,8 @@
14
14
  </template>
15
15
  <script setup>
16
16
  import { notice } from "kui-vue";
17
- const noticeApi = notice.useNotice();
18
17
  const openNotice = (type) => {
19
- noticeApi[type]({
18
+ notice[type]({
20
19
  title: "通知的标题",
21
20
  content: "通知的描述",
22
21
  duration: 5,
@@ -1,7 +1,6 @@
1
1
  // import { inject } from "vue";
2
2
  import newInstance from "../message/instance";
3
3
  import { withInstall } from "../utils/vue";
4
- import { getCurrentInstance } from "vue";
5
4
  let noticeInstance;
6
5
 
7
6
  let Notice = {
@@ -20,27 +19,10 @@ let Notice = {
20
19
  destroy() {
21
20
  if (noticeInstance) {
22
21
  noticeInstance.destroy();
22
+ document.body.removeChild(noticeInstance.$el);
23
23
  noticeInstance = null;
24
- document.body.removeChild(document.querySelector(".k-notice"));
25
24
  }
26
25
  },
27
- useNotice() {
28
- // return inject("notice"); //for 3
29
- const instance = getCurrentInstance();
30
- const proxy = instance ? instance.proxy : null;
31
- // console.log(proxy);
32
- const noticeWrapper = {};
33
-
34
- ["info", "success", "warning", "error", "open"].forEach((type) => {
35
- noticeWrapper[type] = (props = {}) => {
36
- return Notice.open({ type, ...props }, proxy);
37
- };
38
- });
39
-
40
- noticeWrapper.destroy = noticeWrapper.destroy;
41
-
42
- return noticeWrapper;
43
- },
44
26
  install(app) {
45
27
  // app.provide("notice", Notice);
46
28
  // 可选:同时挂到 globalProperties 兼容 this.$notice
@@ -1,9 +1,9 @@
1
- @import '../../styles/var.less';
1
+ @import "../../styles/less-css-var.less";
2
2
 
3
3
  .k-notice {
4
4
  font-size: 14px;
5
5
  line-height: 1.5;
6
- color: var(--kui-color-font);
6
+ color: var(--kui-color-text);
7
7
  -webkit-box-sizing: border-box;
8
8
  box-sizing: border-box;
9
9
  margin: 0;
@@ -20,12 +20,13 @@
20
20
 
21
21
  .k-notice-box {
22
22
  box-sizing: content-box;
23
- transition: all .3s ease-in-out;
23
+ transition: all 0.3s ease-in-out;
24
24
  padding: 16px 35px 16px 16px;
25
- border-radius: var(--kui-border-radius);
26
- -webkit-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
27
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
28
- background: var(--kui-color-back-10);
25
+ border-radius: var(--kui-border-radius-card);
26
+ box-shadow: var(--kui-pop-shadow);
27
+
28
+ background: var(--kui-color-bg-pop);
29
+ border: 1px solid var(--kui-color-pop-border);
29
30
  line-height: 1.5;
30
31
  position: relative;
31
32
  margin-bottom: 16px;
@@ -38,7 +39,7 @@
38
39
 
39
40
  .k-notice-title {
40
41
  font-size: 16px;
41
- color: var(--kui-color-title);
42
+ color: var(--kui-color-text-title);
42
43
  margin-bottom: 8px;
43
44
  line-height: 22px;
44
45
  vertical-align: middle;
@@ -64,20 +65,13 @@
64
65
  right: 8px;
65
66
  top: 13px;
66
67
  outline: none;
67
- cursor: pointer;
68
- color: var(--kui-color-font);
69
- font-size: 20px;
70
- padding: 3px;
71
- display: block;
72
- border-radius: var(--kui-border-radius);
73
-
74
- &:hover {
75
- background-color: var(--kui-color-gray-80);
68
+ .k-icon {
69
+ font-size: 16px;
76
70
  }
77
71
  }
78
72
 
79
73
  .k-notice-info .k-notice-icon {
80
- color: var(--kui-color-main);
74
+ color: var(--kui-color-primary);
81
75
  }
82
76
 
83
77
  .k-notice-error .k-notice-icon {
@@ -111,14 +105,14 @@
111
105
 
112
106
  to {
113
107
  opacity: 0;
114
- transform: scaleY(.5);
108
+ transform: scaleY(0.5);
115
109
  }
116
110
  }
117
111
 
118
112
  .k-notice-slide-enter-active {
119
- animation: k-notice-slide-in .3s ease;
113
+ animation: k-notice-slide-in 0.3s ease;
120
114
  }
121
115
 
122
116
  .k-notice-slide-leave-active {
123
- animation: k-notice-slide-out .3s ease;
124
- }
117
+ animation: k-notice-slide-out 0.3s ease;
118
+ }
@@ -18,7 +18,7 @@ const Page = defineComponent({
18
18
  showSizer: Boolean,
19
19
  showTotal: { type: Boolean, default: true },
20
20
  showElevator: Boolean,
21
- theme: String,
21
+ theme: { type: String, default: "light" },
22
22
  sizeData: { type: Array, default: () => [10, 15, 20, 30, 40] },
23
23
  size: {
24
24
  default: "default",
@@ -48,13 +48,13 @@ const Page = defineComponent({
48
48
  (v) => {
49
49
  defaultPageSize.value = v;
50
50
  resetPage();
51
- }
51
+ },
52
52
  );
53
53
  watch(
54
54
  () => ps.total,
55
55
  (v) => {
56
56
  resetPage();
57
- }
57
+ },
58
58
  );
59
59
 
60
60
  watch(
@@ -62,7 +62,7 @@ const Page = defineComponent({
62
62
  (v) => {
63
63
  defaultPage.value = v;
64
64
  resetPage();
65
- }
65
+ },
66
66
  );
67
67
 
68
68
  const resetPage = () => {
@@ -262,6 +262,7 @@ const Page = defineComponent({
262
262
  size,
263
263
  theme: ps.theme,
264
264
  disabled: ps.disabled,
265
+ clearable: false,
265
266
  },
266
267
  // value: defaultPage.value,
267
268
  on: {
@@ -1,7 +1,7 @@
1
- @import "../../styles/var.less";
1
+ @import "../../styles/less-css-var.less";
2
2
 
3
3
  .k-page {
4
- color: var(--kui-color-font);
4
+ color: var(--kui-color-text);
5
5
  font-size: 14px;
6
6
  -webkit-user-select: none;
7
7
  user-select: none;
@@ -17,7 +17,7 @@
17
17
  }
18
18
  .k-pager-item {
19
19
  background: transparent;
20
- color: var(--kui-color-font);
20
+ color: var(--kui-color-text);
21
21
  min-width: 32px;
22
22
  height: 32px;
23
23
  line-height: 1;
@@ -28,8 +28,6 @@
28
28
  align-items: center;
29
29
  justify-content: center;
30
30
  box-sizing: border-box;
31
- // border: 1px solid var(--kui-color-border);
32
- // transition: all 0.2s ease-in-out 0s;
33
31
  margin-left: -1px;
34
32
  font-size: 14px;
35
33
  position: relative;
@@ -45,22 +43,18 @@
45
43
  }
46
44
 
47
45
  .k-pager-item-active {
48
- border: 1px solid var(--kui-color-main);
49
- color: var(--kui-color-main);
46
+ // border: 1px solid var(--kui-color-primary);
47
+ // color: var(--kui-color-primary);
50
48
 
51
- &:hover {
52
- background: none;
53
- color: var(--kui-color-main-hover);
54
- }
49
+ // &:hover {
50
+ // background: none;
51
+ // color: var(--kui-color-primary-hover);
52
+ // }
55
53
  }
56
54
 
57
55
  .k-pager-more {
58
56
  font-size: 20px;
59
57
  border-color: transparent;
60
-
61
- &:hover {
62
- border-color: transparent;
63
- }
64
58
  }
65
59
 
66
60
  .k-pager-prev {
@@ -78,30 +72,20 @@
78
72
  }
79
73
 
80
74
  .k-pager-item-disabled {
81
- border-color: var(--kui-color-disable-border);
75
+ border-color: var(--kui-color-border-disabled);
82
76
  cursor: not-allowed;
83
77
 
84
78
  .k-icon {
85
- color: var(--kui-color-disabled);
86
- }
87
-
88
- &:hover {
89
- // border-color: var(--kui-color-disable-border);
90
- background: none;
91
-
92
- .k-icon {
93
- color: var(--kui-color-disabled);
94
- }
79
+ color: var(--kui-color-text-disabled);
95
80
  }
96
81
  }
97
82
 
98
83
  .k-pager-more {
99
- color: var(--kui-color-gray);
84
+ color: var(--kui-color-text-placeholder);
100
85
  }
101
86
 
102
87
  .k-page-sizer {
103
88
  display: inline-block;
104
- // width: 90px;
105
89
  }
106
90
 
107
91
  .k-page-number {
@@ -130,41 +114,56 @@
130
114
  }
131
115
  }
132
116
 
133
- &:not(.k-page-disabled) .k-pager-item:not(.k-pager-item-disabled) {
134
- cursor: pointer;
117
+ // &:not(.k-page-disabled) .k-pager-item:not(.k-pager-item-disabled) {
118
+ // cursor: pointer;
119
+ // &:hover {
120
+ // background-color: var(--kui-color-hover);
121
+ // .k-icon {
122
+ // color: var(--kui-color-primary-hover);
123
+ // }
124
+ // }
125
+
126
+ // &:active {
127
+ // background-color: var(--kui-color-active);
128
+
129
+ // .k-icon {
130
+ // color: var(--kui-color-main-active);
131
+ // }
132
+ // }
133
+ // }
134
+ }
135
+ .k-page-light:not(.k-page-disabled) {
136
+ .k-pager-item:not(.k-pager-item-disabled, .k-pager-item-active) {
135
137
  &:hover {
136
- background-color: var(--kui-color-hover);
137
- .k-icon {
138
- color: var(--kui-color-main-hover);
139
- }
138
+ background-color: var(--kui-color-item-hover);
140
139
  }
141
-
142
140
  &:active {
143
- background-color: var(--kui-color-active);
144
-
145
- .k-icon {
146
- color: var(--kui-color-main-active);
147
- }
141
+ background-color: var(--kui-color-item-active);
148
142
  }
149
143
  }
150
- }
151
- .k-page-light {
152
144
  .k-pager-item-active {
153
- background-color: var(--kui-color-gray-80);
154
- border-color: transparent;
145
+ background-color: var(--kui-color-item-selected);
146
+ color: var(--kui-color-primary);
147
+ // border-color: transparent;
148
+ }
149
+ .k-pager-more,
150
+ .k-pager-prev,
151
+ .k-pager-next {
152
+ &:not(.k-pager-item-disabled):hover .k-icon {
153
+ color: var(--kui-color-text);
154
+ }
155
155
  }
156
156
  }
157
157
  .k-page-disabled {
158
158
  cursor: not-allowed;
159
+ color: var(--kui-color-text-disabled);
159
160
  .k-pager-item {
160
- color: var(--kui-color-disabled);
161
- border-color: var(--kui-color-disable-border);
161
+ color: var(--kui-color-text-disabled);
162
+ border-color: var(--kui-color-border-disabled);
162
163
  }
163
164
  .k-pager-item-active {
164
- color: var(--kui-color-disabled);
165
- :hover {
166
- color: var(--kui-color-disabled);
167
- }
165
+ background-color: var(--kui-color-item-disabled);
166
+ color: var(--kui-color-text-disabled);
168
167
  }
169
168
  * {
170
169
  cursor: not-allowed;
@@ -5,24 +5,17 @@
5
5
 
6
6
  ```vue
7
7
  <template>
8
- <Popconfirm
9
- title="Are you sure delete this task?"
10
- @ok="ok"
11
- @cancel="cancel"
12
- >
8
+ <Popconfirm title="Are you sure delete this task?" @ok="ok" @cancel="cancel">
13
9
  <a type="primary">Delete</a>
14
10
  </Popconfirm>
15
11
  </template>
16
- <script>
17
- export default{
18
- methods:{
19
- ok(){
20
- this.$message.success('Clicked on ok')
21
- },
22
- cancel(){
23
- this.$message.info('Clicked on cancel')
24
- }
25
- }
26
- }
27
- </script>h
28
- ```
12
+ <script setup>
13
+ import { message } from "kui-vue";
14
+ const ok = () => {
15
+ message.success("Clicked on ok");
16
+ };
17
+ const cancel = () => {
18
+ message.info("Clicked on cancel");
19
+ };
20
+ </script>
21
+ ```
@@ -1,9 +1,11 @@
1
1
  # Popconfirm 气泡确认框
2
+
2
3
  点击元素,弹出气泡式的确认框。
3
4
 
4
5
  ## 何时使用
6
+
5
7
  目标元素的操作需要用户进一步的确认时,在目标元素附近弹出浮层提示,询问用户。
6
8
 
7
9
  和 ‘confirm’ 弹出的全屏居中模态对话框相比,交互形式更轻量。
8
10
 
9
- ## 代码演示
11
+ ## 代码演示
@@ -6,33 +6,27 @@
6
6
  ```vue
7
7
  <template>
8
8
  <Space>
9
- <Popconfirm
10
- title="您确认删除这条内容吗?"
11
- @ok="ok"
12
- @cancel="cancel"
13
- >
9
+ <Popconfirm title="您确认删除这条内容吗?" @ok="ok" @cancel="cancel">
14
10
  <Button type="primary">确认</Button>
15
11
  </Popconfirm>
16
- <Popconfirm title="Are you sure delete this task?"
12
+ <Popconfirm
13
+ title="Are you sure delete this task?"
17
14
  ok-text="Yes"
18
15
  cancel-text="No"
19
16
  @ok="ok"
20
17
  @cancel="cancel"
21
- >
18
+ >
22
19
  <Button type="primary">Confirm</Button>
23
20
  </Popconfirm>
24
21
  </Space>
25
22
  </template>
26
- <script>
27
- export default{
28
- methods:{
29
- ok(){
30
- this.$message.success('Clicked on Yes')
31
- },
32
- cancel(){
33
- this.$message.info('Clicked on No')
34
- }
35
- }
36
- }
37
- </script>
38
- ```
23
+ <script setup>
24
+ import { message } from "kui-vue";
25
+ const ok = () => {
26
+ message.success("Clicked on ok");
27
+ };
28
+ const cancel = () => {
29
+ message.info("Clicked on cancel");
30
+ };
31
+ </script>
32
+ ```
@@ -54,13 +54,7 @@
54
54
  </Space>
55
55
  </Flex>
56
56
  </template>
57
- <script>
58
- export default {
59
- data() {
60
- return {
61
- title: 'Are you sure to delete this task?',
62
- }
63
- }
64
- }
57
+ <script setup>
58
+ const title = "Are you sure to delete this task?";
65
59
  </script>
66
- ```
60
+ ```
@@ -1,10 +1,11 @@
1
1
  ## API
2
+
2
3
  | 属性 | 说明 | 类型 | 默认值 |
3
- |-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------|--------|
4
+ | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------ |
4
5
  | title | 显示的标题 | String,Slots | - |
5
6
  | placement | 提示框出现的位置,可选值为`top`,`top-left`,`top-right`,`bottom`,`bottom-left`,`bottom-right`,`left`,`left-top`,`left-bottom`,`right`,`right-top`,`right-bottom` | String | top |
6
7
  | width | 展示的宽度,默认为内容区域的大小 | String | - |
7
8
  | ok-text | 确定按钮的文字, | String | 确定 |
8
9
  | cancel-text | 取消按钮的文字, | String | 取消 |
9
10
  | cancel | 点击取消的回调, | Function | - |
10
- | ok | 点击确定的回调, | Function | - |
11
+ | ok | 点击确定的回调, | Function | - |