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
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 chuchur
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,8 +1,19 @@
1
1
  export function isEmptyNode(vnode = {}) {
2
2
  return !(vnode.eml || vnode.tag || (vnode.text && vnode.text.trim() !== ''))
3
3
  }
4
- export function getChild(child = []) {
5
- return child.filter(c => !isEmptyNode(c))
4
+ export function getChild(child = [], name) {
5
+ // return child.filter(c => !isEmptyNode(c, name) )
6
+ return child.filter(c => {
7
+ let tag_name = ''
8
+ if (name && c.componentOptions != null && c.componentOptions.Ctor != undefined) {
9
+ tag_name = c.componentOptions.Ctor.extendOptions.name
10
+ }
11
+ if (!isEmptyNode(c) && name !== tag_name) {
12
+ return true
13
+ } else {
14
+ return false
15
+ }
16
+ })
6
17
  }
7
18
 
8
19
  export function contains(ele, target) {
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |-------------|----------------------------------------------------|-------------|---------|
4
4
  | type | 按钮类型,可选值为 `success`、`info`、`warning`、`error` 或者不设置 | String | warning |
@@ -20,6 +20,7 @@
20
20
  justify-content: center;
21
21
  text-align: center;
22
22
  cursor: pointer;
23
+ flex-shrink: 0;
23
24
  &>img {
24
25
  display: block;
25
26
  width: 100%;
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |-----------|-----------------------------------------|----------------|--------|
4
4
  | count | 显示的文字 | String,Number | - |
@@ -1,4 +1,4 @@
1
- ### BreadcrumbItem API
1
+ ## BreadcrumbItem API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |-----------|-----------------------------------------|---------|-------|
4
4
  | separator | 自定义分隔符 | String | / |
@@ -48,7 +48,7 @@ export default {
48
48
  render() {
49
49
  const { $slots, $attrs, size, disabled, click, theme,
50
50
  shape, htmlType, icon, loading, $listeners, type, block } = this
51
- const onlyIcon = !getChild($slots.default).length && icon
51
+ const onlyIcon = !getChild($slots.default, 'Drop').length && icon
52
52
  const classes = [
53
53
  "k-btn",
54
54
  {
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |----------|------------------|--------------|--------|
4
4
  | title | 卡片的标题 | String、slot | - |
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |----------|----------------------------------------------------------|---------|--------|
4
4
  | value | 幻灯片的索引,从 0 开始,可以使用 `v-model` 双向绑定数据 | Number | 0 |
@@ -29,6 +29,7 @@
29
29
  line-height: 1;
30
30
  bottom: 10px;
31
31
  left: 0;
32
+ padding: 0;
32
33
  li {
33
34
  display: inline-block;
34
35
  background: #fff;
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | ------------- | --------------------------------------------- | ----------------- | ------ |
4
4
  | checked | 是否选中状态,可以使用 `v-model` 双向绑定数据 | Boolean | false |
@@ -7,7 +7,7 @@
7
7
  | indeterminate | 组合辅助选项控制半选状态 | Boolean | false |
8
8
  | change | 在选项状态发生改变时回调 | Function(e:Event) | - |
9
9
  | value | 组合使用时表示的值 | String、Number | - |
10
- ### CheckboxGroup API
10
+ ## CheckboxGroup API
11
11
  | 属性 | 说明 | 类型 | 默认值 |
12
12
  | --------- | ---------------------------------------------------- | ------------------------------------------------- | ---------- |
13
13
  | value | 用于设置当前选中的值,可以使用 `v-model` 双向绑定数据 | Array | - |
@@ -6,6 +6,7 @@
6
6
  user-select: none;
7
7
  line-height: 1;
8
8
  color: var(--kui-color-font);
9
+ white-space: nowrap;
9
10
  // margin-right: 16px;
10
11
  .k-checkbox-symbol {
11
12
  display: inline-block;
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |-----------|------------------------------------------------------|----------------|--------|
4
4
  | value | 当前激活的面板的 `name`,可以使用 `v-model` 双向绑定 | Array , String | - |
@@ -6,7 +6,7 @@
6
6
  | sample | 是否开启简洁模式 | Boolean | false |
7
7
  | change | 切换面板时触发回调,返回当前选项卡的 `name` | Function | - |
8
8
 
9
- ### Panel
9
+ ## Panel
10
10
 
11
11
  | 属性 | 说明 | 类型 | 默认值 |
12
12
  |-------|----------------------|--------|--------|
@@ -241,7 +241,7 @@ export function limit(value, min, max) {
241
241
  }
242
242
 
243
243
  export function canvasHelper(canvas) {
244
- const ctx = canvas.getContext('2d'),
244
+ const ctx = canvas.getContext('2d', { willReadFrequently: true }),
245
245
  width = canvas.width,
246
246
  height = canvas.height;
247
247
 
@@ -156,7 +156,7 @@ export default {
156
156
  this.currentMode = modes[i]
157
157
  },
158
158
  initHueCanvas(canvas) {
159
- const ctx = canvas.getContext('2d'),
159
+ const ctx = canvas.getContext('2d', { willReadFrequently: true }),
160
160
  setp = 1 / 360,
161
161
  width = canvas.width,
162
162
  height = canvas.height,
@@ -192,7 +192,7 @@ export default {
192
192
  })
193
193
  },
194
194
  alphaCanvsSetHue(canvas) {
195
- const ctx = canvas.getContext('2d'),
195
+ const ctx = canvas.getContext('2d', { willReadFrequently: true }),
196
196
  { width, height } = canvas,
197
197
  gradient = ctx.createLinearGradient(0, 0, width - 1, 0);
198
198
  let { H, S, L } = this
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | -------------- | ---------------------------------------------------- | -------- | ------ |
4
4
  | value | 当前激活的面板的 `name`,可以使用 `v-model` 双向绑定 | String | - |
@@ -20,6 +20,7 @@
20
20
  display: flex;
21
21
  align-items: center;
22
22
  padding: 2px;
23
+ cursor: pointer;
23
24
  }
24
25
 
25
26
  .k-color-picker-color {
@@ -15,7 +15,7 @@
15
15
  :showClose="false"
16
16
  :width="316"
17
17
  >
18
- <DateCalendar v-model="date" @change="change">
18
+ <DateCalendar v-model="date" @change="change"></DateCalendar>
19
19
  </Modal>
20
20
 
21
21
  <div class="date-demo">
@@ -25,13 +25,13 @@
25
25
  :closable="false"
26
26
  :footer="null"
27
27
  :title="null"
28
- height="300"
28
+ :height="300"
29
29
  placement="bottom"
30
30
  :target="()=>$refs['demo-date']">
31
- <DateCalendar v-model="date2" @change="change2" picker-size="small">
31
+ <DateCalendar v-model="date2" @change="change2" picker-size="small"></DateCalendar>
32
32
  </Drawer>
33
- <div>
34
- <div>
33
+ </div>
34
+ </div>
35
35
  </div>
36
36
  </template>
37
37
  <script>
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | -------- | ----------------------------------------- | -------------------------- | ---------- |
4
4
  | bordered | 是否展示边框 | Boolean | false |
@@ -7,7 +7,7 @@
7
7
  | layout | 描述布局 | horizontal \| vertical | horizontal |
8
8
  | size | 设置列表的大小。可以设置为 middle 、small | default \| middle \| small | default |
9
9
  | title | 描述列表的标题,显示在最顶部 | String,slot | - |
10
- ### Item props
10
+ ## Item props
11
11
  | 属性 | 说明 | 类型 | 默认值 |
12
12
  | ----- | ---------- | -------------- | ------ |
13
13
  | label | 内容的描述 | String \| slot | - |
@@ -1,4 +1,4 @@
1
- #### API
1
+ ## API
2
2
  | 参数 | 说明 | 类型 | 默认值 |
3
3
  |-------------|-----------------------------------|---------------------------|------------|
4
4
  | text | 分割线文字 | String | - |
@@ -1,4 +1,4 @@
1
- #### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | ------------ | ------------------------------------------------------------------ | ------------- | ------ |
4
4
  | title | 抽屉标题,为null或false时不显示标题 | String | - |
@@ -1,4 +1,4 @@
1
- #### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |-------------|----------------------------------------------|-----------------|--------|
4
4
  | description | 自定义描述内容 | [String、slot ] | - |
@@ -58,7 +58,7 @@
58
58
  <Col :span="8">
59
59
  <pre style="max-height:320px;overflow:'scroll'">{{JSON.stringify(form, null, 2)}}</pre>
60
60
  </Col>
61
- </div>
61
+ </Row>
62
62
  </template>
63
63
  <script>
64
64
  import { RemoveCircleOutline } from 'kui-icons'
@@ -1,11 +1,11 @@
1
- ### Row API
1
+ ## Row API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | ------- | -------------------------------------------------------------------------------- | ------------ | ------- |
4
4
  | align | flex 布局下的垂直对齐方式:`top` `middle` `bottom` | String | `top` |
5
5
  | justify | flex 布局下的水平排列方式:`start` `end` `center` `space-around` `space-between` | String | `start` |
6
6
  | gutter | 栅格间距,单位 px,左右平分,使用数组形式同时设置 [水平间距, 垂直间距] | Number,Array | - |
7
7
  | type | 布局模式,可选 flex,现代浏览器 下有效 | String | |
8
- ### Col API
8
+ ## Col API
9
9
  | 属性 | 说明 | 类型 | 默认值 |
10
10
  | ------ | -------------------------------------- | ------------- | ------ |
11
11
  | span | 栅格的占位格数,可选值为0~24的整数 | Number | - |
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | ----------- | ---------------------------- | ------------- | ------ |
4
4
  | type | 图标类型。遵循图标的命名规范 | Array | - |
@@ -108,7 +108,7 @@
108
108
  </Row>
109
109
  </div>
110
110
  </Image>
111
- <ImageGroup>
111
+ </ImageGroup>
112
112
  </template>
113
113
  <script>
114
114
  import { Ribbon ,Heart, IconImage, Calendar, Location, Camera } from 'kui-icons'
@@ -41,7 +41,7 @@ export default {
41
41
  beforeDestroy() {
42
42
  let preview = this.preview
43
43
  preview && preview.destroy()
44
- this.ImageGroup && this.ImageGroup.updateCollection(0, this.origin || this.src || this._uid + '')
44
+ this.ImageGroup && this.ImageGroup.updateCollection(false, this.origin || this.src || this._uid + '')
45
45
  },
46
46
  methods: {
47
47
  togglePanel() {
@@ -135,7 +135,7 @@ export default {
135
135
  },
136
136
  mounted() {
137
137
  this.reload()
138
- this.ImageGroup && this.ImageGroup.updateCollection(1, this.origin || this.src || this._uid + '')
138
+ this.ImageGroup && this.ImageGroup.updateCollection(true, this.origin || this.src || this._uid + '')
139
139
  },
140
140
  render() {
141
141
  const { imageUrl, alt, width, height, showImg, imgStyle,
@@ -1,4 +1,4 @@
1
- #### API
1
+ ## API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |-------------|----------------------------------------------|------------------|--------|
4
4
  | width | 组件的宽度 | [String、Number] | - |
@@ -14,7 +14,7 @@
14
14
  | tool | 自定义工具栏按钮 | slot | - |
15
15
  | panel | 自定义扩展面板 | slot | - |
16
16
 
17
- #### Image.method()
17
+ ## Image.method()
18
18
 
19
19
  组件提供了一些静态方法 `this.$Image.show(options)`
20
20
 
@@ -78,6 +78,7 @@
78
78
  align-items: center;
79
79
  justify-content: center;
80
80
  margin: 0;
81
+ padding: 0;
81
82
  path {
82
83
  stroke-width: 40px !important;
83
84
  }
@@ -1,4 +1,4 @@
1
- ### Input API
1
+ ## Input API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | --------- | ------------------------------------------ | ---------------- | ------ |
4
4
  | value | 绑定的值,可使用 `v-model` 双向绑定 | String 、 Number | - |
@@ -1,4 +1,4 @@
1
- ### InputNumber API
1
+ ## InputNumber API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | -------------- | -------------------------------------------------------------------- | ------------- | ------ |
4
4
  | min | 最小值 | number | 0 |
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
  </Col>
18
18
  <Col flex="1">
19
- <Input :icon="Search" placeholder="搜索功能" style="width:200px;" theme="light" shape="circle">
19
+ <Input :icon="Search" placeholder="搜索功能" style="width:200px;" theme="light" shape="circle" />
20
20
  </Col>
21
21
  <Col>
22
22
  <Tooltip title="全屏显示" placement="bottom">
@@ -16,7 +16,7 @@
16
16
  </div>
17
17
  </Col>
18
18
  <Col flex="1">
19
- <Input :icon="Search" placeholder="搜索功能" style="width:200px;" theme="light" shape="circle">
19
+ <Input :icon="Search" placeholder="搜索功能" style="width:200px;" theme="light" shape="circle" />
20
20
  </Col>
21
21
  <Col>
22
22
  <Tooltip title="全屏显示" placement="bottom">
@@ -28,7 +28,7 @@
28
28
  </Col>
29
29
  </Row>
30
30
  </Header>
31
- <Content class="k-demo-main" class="demo-back">
31
+ <Content class="k-demo-main demo-back">
32
32
  <Breadcrumb class="nav">
33
33
  <BreadcrumbItem>Home</BreadcrumbItem>
34
34
  <BreadcrumbItem>List</BreadcrumbItem>
@@ -1,4 +1,4 @@
1
- ### Loading API
1
+ ## Loading API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  |---------|------------------|-------------------|--------|
4
4
  | start | 开始加载 | Function | - |
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  组件提供了一些静态方法,使用方式如下
3
3
 
4
4
 
@@ -1,4 +1,4 @@
1
- ### API
1
+ ## API
2
2
  组件提供了一些静态方法,使用方式如下
3
3
 
4
4
 
@@ -1,11 +1,11 @@
1
- ### Radio API
1
+ ## Radio API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | -------- | --------------------------------------------- | ----------------- | ------ |
4
4
  | checked | 是否选中状态,可以使用 `v-model` 双向绑定数据 | Boolean | false |
5
5
  | label | 文字提示 | String 、 Number | - |
6
6
  | disabled | 是否禁用当前项 | Boolean | false |
7
7
  | change | 在选项状态发生改变时回调 | Function(e:Event) | - |
8
- ### RadioGroup API
8
+ ## RadioGroup API
9
9
  | 属性 | 说明 | 类型 | 默认值 |
10
10
  | --------- | -------------------------------------------------------------------------- | ------------------------------------------------- | ---------- |
11
11
  | value | 用于设置当前选中的值。可以使用 `v-model` 双向绑定数据 | Any | - |
@@ -1,4 +1,4 @@
1
- ### Rate API
1
+ ## Rate API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | -------------- | ---------------------- | ----------------------- | ------ |
4
4
  | value(v-model) | 当前数,受控值 | Number | - |
@@ -1,4 +1,4 @@
1
- ### Select API
1
+ ## Select API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | ----------- | ---------------------------------------------------------- | ------------------------------ | ---------- |
4
4
  | value | 指定选中项目的 `value` 值,可以使用 `v-model` 双向绑定数据 | String,Number | - |
@@ -20,7 +20,7 @@
20
20
  | icon | 自定义图标 | String | - |
21
21
  | shape | shape='circle' 时呈现圆角 | String | - |
22
22
 
23
- ### Option API
23
+ ## Option API
24
24
  | 属性 | 说明 | 类型 | 默认值 |
25
25
  | -------- | -------------------------------------------------------------------------------------------- | ------------- | ------ |
26
26
  | key | 和 value 含义一致。如果 Vue 需要你设置此项,此项值与 value 的值相同,然后可以省略 value 设置 | String,Number | - |
@@ -1,6 +1,7 @@
1
1
  <script>
2
2
  import Info from "./info.md";
3
3
  import Base from "./base.md";
4
+ import Size from "./size.md";
4
5
  import WithNumber from "./withNumber.md";
5
6
  import Formatter from "./formatter.md";
6
7
  import Marks from "./marks.md";
@@ -14,6 +15,7 @@ export default {
14
15
  <div class="demo-slider">
15
16
  <Info />
16
17
  <Base />
18
+ <Size />
17
19
  <WithNumber />
18
20
  <Formatter />
19
21
  <Marks />
@@ -0,0 +1,40 @@
1
+ <cn>
2
+ #### 尺寸/自定义
3
+ size 可以控制操作杆的大小
4
+ </cn>
5
+
6
+ ```vue
7
+ <template>
8
+ <div style="max-width:520px;">
9
+ <Slider v-model="v1" :step="10" :disabled="disabled" :min="20" size="small" />
10
+ <Slider v-model="v2" range :disabled="disabled" :min="10" :max="80" size="small"/>
11
+ <Slider v-model="v1" :step="10" :disabled="disabled" :min="20" size="small" class="slider-demo-custom"/>
12
+ <Slider v-model="v2" range :disabled="disabled" :min="10" :max="80" size="small" class="slider-demo-custom"/>
13
+
14
+ <Slider :marks="{ 0: '0°C',25: '25°C', 36: '36°C',100: '100°C', }"
15
+ :step="null"
16
+ :disabled="disabled"
17
+ size="small"
18
+ :value="25"></Slider>
19
+ <br />
20
+ <br />
21
+ Disabled: <Switch v-model="disabled" />
22
+ </div>
23
+ </template>
24
+ <script>
25
+ export default{
26
+ data() {
27
+ return {
28
+ disabled: false ,
29
+ v1: 80,
30
+ v2: [30, 50]
31
+ }
32
+ }
33
+ }
34
+ </script>
35
+ <style>
36
+ .slider-demo-custom .k-slider-track{
37
+ background: linear-gradient(270deg,green 5.56%,orange);
38
+ }
39
+ </style>
40
+ ```
@@ -24,7 +24,7 @@
24
24
  <Slider vertical reverse range :marks="{ 20: '20°C', 40: '40°C' }" :step="10" :value="[20, 60]"></Slider>
25
25
  </div>
26
26
  </template>
27
- <<style lang="less">
27
+ <style lang="less">
28
28
  .demo-slider-vertical{
29
29
  height: 300px;
30
30
  margin-left: 30px;
@@ -32,5 +32,5 @@
32
32
  padding-right: 30px;
33
33
  display: inline-block
34
34
  }
35
- </style>>
35
+ </style>
36
36
  ```
@@ -1,4 +1,4 @@
1
- ### Slider API
1
+ ## Slider API
2
2
  | 属性 | 说明 | 类型 | 默认值 |
3
3
  | -------------- | -------------------------------------------------------------------------- | ----------------------------------------------- | ------ |
4
4
  | value | 设置当前取值 | Number,Array | 0 |
@@ -11,6 +11,7 @@ export default {
11
11
  default: 1,
12
12
  validator: (val) => val !== 0
13
13
  },
14
+ size: String,
14
15
  range: Boolean,
15
16
  vertical: Boolean,
16
17
  reverse: Boolean,
@@ -204,10 +205,10 @@ export default {
204
205
 
205
206
  },
206
207
  thumbProps() {
207
- let { vertical, disabled, range, step, reverse, max, min, defaultValue, tooltipVisible, tipFormatter } = this
208
+ let { vertical, disabled, range, step, reverse, max, min, defaultValue, tooltipVisible, tipFormatter, size } = this
208
209
  return {
209
210
  props: {
210
- vertical, disabled, range, step, reverse, min,
211
+ vertical, disabled, range, step, reverse, min, size,
211
212
  max, tipFormatter, tooltipVisible,
212
213
  value: range ? [].concat(defaultValue) : defaultValue * 1
213
214
  },