kui-vue 3.3.5-b → 3.3.5-d

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 (71) hide show
  1. package/LICENSE +21 -0
  2. package/components/_tool/utils.js +13 -2
  3. package/components/alert/index.md +1 -1
  4. package/components/avatar/styles/index.less +1 -0
  5. package/components/badge/index.md +1 -1
  6. package/components/breadcrumb/index.md +1 -1
  7. package/components/button/button.jsx +1 -1
  8. package/components/card/index.md +1 -1
  9. package/components/carousel/index.md +1 -1
  10. package/components/carousel/styles/index.less +1 -0
  11. package/components/checkbox/index.md +2 -2
  12. package/components/checkbox/styles/index.less +1 -0
  13. package/components/collapse/index.md +2 -2
  14. package/components/colorPicker/canvasHelper.js +1 -1
  15. package/components/colorPicker/colorpicker.jsx +2 -2
  16. package/components/colorPicker/index.md +1 -1
  17. package/components/colorPicker/styles/index.less +1 -0
  18. package/components/datePicker/demo/inside.md +5 -5
  19. package/components/descriptions/index.md +2 -2
  20. package/components/divider/index.md +1 -1
  21. package/components/drawer/index.md +1 -1
  22. package/components/empty/index.md +1 -1
  23. package/components/form/demo/dynamicvalid.md +1 -1
  24. package/components/grid/index.md +2 -2
  25. package/components/icon/index.md +1 -1
  26. package/components/image/demo/extra.md +1 -1
  27. package/components/image/image.jsx +2 -2
  28. package/components/image/index.md +2 -2
  29. package/components/image/styles/index.less +1 -0
  30. package/components/input/index.md +1 -1
  31. package/components/inputNumber/index.md +1 -1
  32. package/components/layout/demo/layout1.md +1 -1
  33. package/components/layout/demo/layout2.md +2 -2
  34. package/components/loading/index.md +1 -1
  35. package/components/message/index.md +1 -1
  36. package/components/notice/index.md +1 -1
  37. package/components/radio/index.md +2 -2
  38. package/components/rate/index.md +1 -1
  39. package/components/select/index.md +2 -2
  40. package/components/slider/demo/index.vue +2 -0
  41. package/components/slider/demo/size.md +40 -0
  42. package/components/slider/demo/vertical.md +2 -2
  43. package/components/slider/index.md +1 -1
  44. package/components/slider/slider.jsx +3 -2
  45. package/components/slider/styles/index.less +48 -7
  46. package/components/slider/thumb.jsx +4 -4
  47. package/components/space/index.md +1 -1
  48. package/components/spin/index.md +1 -1
  49. package/components/tabs/index.md +2 -2
  50. package/components/tag/index.md +1 -1
  51. package/components/timeline/index.md +1 -1
  52. package/components/tree/demo/custom-render.md +3 -4
  53. package/components/upload/demo/form.md +1 -1
  54. package/components/upload/demo/transform.md +1 -1
  55. package/dist/k-ui.css +2 -2
  56. package/dist/k-ui.js +2 -2
  57. package/dist/locale/de.js +2 -2
  58. package/dist/locale/el.js +2 -2
  59. package/dist/locale/en.js +2 -2
  60. package/dist/locale/fr.js +2 -2
  61. package/dist/locale/it.js +2 -2
  62. package/dist/locale/ja.js +2 -2
  63. package/dist/locale/ko.js +2 -2
  64. package/dist/locale/ru.js +2 -2
  65. package/dist/locale/th.js +2 -2
  66. package/dist/locale/ua.js +2 -2
  67. package/dist/locale/vi.js +2 -2
  68. package/dist/locale/zhCN.js +2 -2
  69. package/dist/locale/zhTW.js +2 -2
  70. package/package.json +2 -1
  71. /package/{README.md → readme.md} +0 -0
@@ -1,38 +1,56 @@
1
1
  @import '../../styles/var.less';
2
+
2
3
  .k-slider {
3
4
  width: 100%;
4
5
  display: inline-block;
5
6
  position: relative;
6
- // height: 12px;
7
- // font-size: 0;
8
7
  margin: 0;
9
8
  padding: 0 13px;
9
+ -webkit-user-select: none;
10
10
  user-select: none;
11
+ box-sizing: border-box;
12
+
11
13
  .k-slider-bar {
12
14
  height: 32px;
13
15
  width: 100%;
14
16
  position: relative;
15
17
  }
18
+
16
19
  .k-slider-thumb {
17
20
  outline: none;
21
+ -webkit-user-select: none;
18
22
  user-select: none;
19
23
  touch-action: none;
20
24
  box-shadow: 0 4px 6px rgb(0 0 0 / 10%), 0 0 1px rgb(0 0 0 / 30%);
21
25
  width: 24px;
22
26
  height: 24px;
23
- margin-top: 3px;
27
+ margin: 0;
24
28
  border: none;
25
29
  border-radius: 50%;
26
30
  position: absolute;
27
31
  cursor: grab;
28
32
  background: #fff;
29
33
  border: 1px solid #fff;
30
- transform: translateX(-50%);
34
+ top: 50%;
35
+ transform: translateX(-50%) translateY(-50%);
36
+
31
37
  &:active {
32
38
  border: 1px solid var(--kui-color-main);
33
39
  cursor: grabbing;
34
40
  }
35
41
  }
42
+
43
+ .k-slider-thumb-sm {
44
+ height: 14px;
45
+ width: 14px;
46
+ border: 2px solid var(--kui-color-main);
47
+
48
+ &:active {
49
+ border-width: 2px;
50
+ box-shadow: 0 0 2px 5px var(--kui-color-main-60);
51
+ }
52
+ }
53
+
36
54
  .k-slider-track {
37
55
  height: 4px;
38
56
  cursor: pointer;
@@ -42,6 +60,7 @@
42
60
  top: 14px;
43
61
  pointer-events: none;
44
62
  }
63
+
45
64
  .k-slider-rail {
46
65
  touch-action: none;
47
66
  cursor: pointer;
@@ -52,6 +71,7 @@
52
71
  width: 100%;
53
72
  top: 14px;
54
73
  }
74
+
55
75
  .k-slider-marks {
56
76
  position: absolute;
57
77
  width: 100%;
@@ -60,6 +80,7 @@
60
80
  font-size: 14px;
61
81
  z-index: 0;
62
82
  }
83
+
63
84
  .k-slider-mark-symbol {
64
85
  position: absolute;
65
86
  height: 4px;
@@ -70,10 +91,12 @@
70
91
  transform: translateX(-50%);
71
92
  pointer-events: none;
72
93
  box-sizing: content-box;
94
+
73
95
  &-active {
74
96
  border-color: var(--kui-color-main);
75
97
  }
76
98
  }
99
+
77
100
  .k-slider-mark-text {
78
101
  position: absolute;
79
102
  transform: translateX(-50%);
@@ -81,6 +104,7 @@
81
104
  z-index: 0;
82
105
  line-height: 1;
83
106
  margin-top: 18px;
107
+
84
108
  &-active {
85
109
  color: var(--kui-color-font);
86
110
  }
@@ -89,35 +113,49 @@
89
113
 
90
114
  .k-slider-vertical {
91
115
  padding: 13px 0;
116
+ margin: -13px 0;
92
117
  height: 100%;
118
+
93
119
  .k-slider-bar {
94
120
  width: 32px;
95
121
  height: 100%;
96
122
  }
123
+
97
124
  .k-slider-track {
98
125
  width: 4px;
99
126
  left: 14px;
100
127
  top: 0;
101
128
  }
129
+
102
130
  .k-slider-rail {
103
131
  height: 100%;
104
132
  width: 4px;
105
133
  left: 14px;
106
134
  top: 0;
107
135
  }
136
+
108
137
  .k-slider-marks {
109
138
  left: 12px;
110
139
  top: auto;
111
140
  height: 100%;
112
141
  width: auto;
113
142
  }
143
+
114
144
  .k-slider-thumb {
115
145
  transform: translateY(-50%);
116
146
  margin: 0 0 0 3px;
147
+ top: auto;
117
148
  }
118
- .k-slider-mark-symbol, .k-slider-mark-text {
149
+
150
+ .k-slider-thumb-sm {
151
+ margin-left: 9px;
152
+ }
153
+
154
+ .k-slider-mark-symbol,
155
+ .k-slider-mark-text {
119
156
  transform: translateY(-50%);
120
157
  }
158
+
121
159
  .k-slider-mark-text {
122
160
  margin: 0 0 0 18px;
123
161
  }
@@ -126,10 +164,13 @@
126
164
  .k-slider-disabled {
127
165
  opacity: .5;
128
166
  cursor: not-allowed;
129
- .k-slider-thumb, .k-slider-thumb:active {
167
+
168
+ .k-slider-thumb,
169
+ .k-slider-thumb:active {
130
170
  cursor: not-allowed;
131
- border-color: #fff;
171
+ // border-color: inherit;
132
172
  }
173
+
133
174
  .k-slider-rail {
134
175
  cursor: not-allowed;
135
176
  }
@@ -1,5 +1,4 @@
1
1
  import Tooltip from "../tooltip"
2
- import { times } from '../_tool/number'
3
2
  export default {
4
3
  props: {
5
4
  vertical: Boolean,
@@ -8,6 +7,7 @@ export default {
8
7
  reverse: Boolean,
9
8
  max: Number,
10
9
  min: Number,
10
+ size: String,
11
11
  step: Number,
12
12
  value: [Number, Array],
13
13
  tipFormatter: [Function, Object],
@@ -98,9 +98,9 @@ export default {
98
98
 
99
99
  },
100
100
  render() {
101
- let { vertical, value, index, disabled, max, min, tipFormatter, range, type, reverse, tooltipVisible } = this
101
+ let { vertical, value, index, disabled, max, min, size, tipFormatter, range, type, reverse, tooltipVisible } = this
102
102
  const props = {
103
- class: 'k-slider-thumb',
103
+ class: ['k-slider-thumb', { 'k-slider-thumb-sm': size == 'small' }],
104
104
  style: {
105
105
  // left: `${percent}%`,
106
106
  zIndex: index
@@ -133,7 +133,7 @@ export default {
133
133
  sty = reverse ? { bottom: `${percent}%`, transform: 'translateY(50%)' } :
134
134
  { top: `${percent}%` }
135
135
  } else {
136
- sty = reverse ? { right: `${percent}%`, transform: 'translateX(50%)' } :
136
+ sty = reverse ? { right: `${percent}%`, transform: 'translateX(50%) translateY(-50%)' } :
137
137
  { left: `${percent}%` }
138
138
  }
139
139
  props.style = Object.assign(props.style, sty)
@@ -1,4 +1,4 @@
1
- ### Space API
1
+ ## Space API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | -------- | ------------ | ----------------------------- | ------ |
4
4
  | align | 对齐方式 | start , end ,center ,baseline | center |
@@ -1,4 +1,4 @@
1
- ### Radio API
1
+ ## Radio API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | ----- | --------------------------------------------- | ------------- | ------ |
4
4
  | value | 是否加载状态,可以使用 `v-model` 双向绑定数据 | Boolean | false |
@@ -1,4 +1,4 @@
1
- ### Tabs API
1
+ ## Tabs API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |-----------|---------------------------------------|---------------------|--------|
4
4
  | value | 当前激活 tab 面板的 key | String | - |
@@ -9,7 +9,7 @@
9
9
  | change | 切换面板的回调 | Function(activeKey) | - |
10
10
  | tab-click | tab点击时的回调 | Function(activeKey) | - |
11
11
 
12
- ### Tabs.TabPane API
12
+ ## Tabs.TabPane API
13
13
  | 属性 | 说明 | 类型 | 默认值 |
14
14
  |----------|---------------------|---------|--------|
15
15
  | key | vue需要的key值 | String | - |
@@ -1,4 +1,4 @@
1
- ### Tag API
1
+ ## Tag API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |-----------|--------------------|----------|--------|
4
4
  | closeable | 是否显示关闭按钮 | Boolean | false |
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | ----- | -------------------------------------------------------------------------------------- | ----------- | ------ |
4
4
  | icon | 时间轴 `item` 图标 | String | - |
@@ -10,9 +10,9 @@
10
10
  <Divider>默认</Divider>
11
11
  <!-- 默认 -->
12
12
  <Tree :data="data" @expand="expand" :expandedKeys="expandedKeys" show-extra>
13
- <template v-slot:extra="{ node , parent}">
14
- <Button :icon="Add" size="small" @click="append(node)" style="margin-right:5px" />
15
- <Button :icon="Remove" size="small" @click="remove(node,parent)" v-if="node.key!='0-0'" />
13
+ <template v-slot:extra="{ node , parent}">
14
+ <Button :icon="Add" size="small" @click="append(node)" style="margin-right:5px"></Button>
15
+ <Button :icon="Remove" size="small" @click="remove(node,parent)" v-if="node.key!='0-0'" ></Button>
16
16
  </template>
17
17
  </Tree>
18
18
  </Col>
@@ -137,5 +137,4 @@ export default {
137
137
  }
138
138
  }
139
139
  </script>
140
-
141
140
  ```
@@ -53,7 +53,7 @@
53
53
  <FormItem :wrapperCol="{offset:6}">
54
54
  <Button type="primary" htmlType="submit">提交表单</Button>
55
55
  </FormItem>
56
- <Form>
56
+ </Form>
57
57
  </template>
58
58
  <script>
59
59
  import { CloudUploadOutline,CameraOutline } from "kui-icons";
@@ -35,7 +35,7 @@ export default{
35
35
  transformFile(file){
36
36
  return new Promise((res, rej) => {
37
37
  const canvas = document.createElement('canvas');
38
- const ctx = canvas.getContext('2d');
38
+ const ctx = canvas.getContext('2d', { willReadFrequently: true });
39
39
 
40
40
  const img = new Image();
41
41
  img.onload = function () {