Skip to content

Commit 07c9c4b

Browse files
committed
feat: update veui and add vertical slider
1 parent 1943dcc commit 07c9c4b

File tree

6 files changed

+129
-75
lines changed

6 files changed

+129
-75
lines changed

one/docs/components/slider.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@
3030

3131
使用 [`secondary-progress`](#props-secondary-progress) 属性来指定一个次级进度条。
3232

33-
[[ demo src="/demo/slider/buffer.vue" ]]
33+
### 纵向
34+
35+
使用 [`vertical`](#props-vertical) 属性来指定是否使用纵向样式。
36+
37+
[[ demo src="/demo/slider/vertical.vue" ]]
3438

3539
### 定制内容
3640

@@ -51,6 +55,7 @@
5155
| ``max`` | `number` | `1` | `value` 经过 `parse` 函数处理后允许的最大值。 |
5256
| ``step`` | `number` | `0` | `value` 经过 `parse` 函数处理后的步进值。 |
5357
| ``mark`` | `boolean` | `false` | 是否显示步进标记。 |
58+
| ``vertical`` | `boolean` | `false` | 是否使用纵向样式。 |
5459
| ``parse`` | `function` | `val => val` | 传入值处理函数。 |
5560
| ``format`` | `function` | `val => val` | 输出值处理函数。 |
5661

one/docs/demo/slider/steps.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,11 @@ export default {
3333
}
3434
}
3535
</script>
36+
37+
<docs>
38+
在使用 [`step`](#props-step) 属性设置步长后,可以通过 [`mark`](#props-mark) 属性来显示刻度。
39+
</docs>
40+
41+
<docs locale="en-US">
42+
After setting the [`step`](#props-step) prop, you can display the scale marks by setting the [`mark`](#props-mark) prop.
43+
</docs>

one/docs/demo/slider/vertical.vue

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<template>
2+
<article>
3+
<veui-slider
4+
v-model="value"
5+
:min="0"
6+
:max="100"
7+
vertical
8+
style="height: 180px"
9+
/>
10+
</article>
11+
</template>
12+
13+
<script>
14+
import { Slider } from 'veui'
15+
16+
export default {
17+
components: {
18+
'veui-slider': Slider
19+
},
20+
data () {
21+
return {
22+
value: 42
23+
}
24+
}
25+
}
26+
</script>
27+
28+
<docs>
29+
在使用 [`step`](#props-step) 属性设置步长后,可以通过 [`mark`](#props-mark) 属性来显示刻度。
30+
</docs>
31+
32+
<docs locale="en-US">
33+
After setting the [`step`](#props-step) prop, you can display the scale marks by setting the [`mark`](#props-mark) prop.
34+
</docs>

one/docs/en-US/components/slider.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ Use the [`secondary-progress`](#props-secondary-progress) prop to specify a seco
3232

3333
[[ demo src="/demo/slider/buffer.vue" ]]
3434

35+
### Vertical
36+
37+
Use the [`vertical`](#props-vertical) prop to specify whether to use the vertical style.
38+
39+
[[ demo src="/demo/slider/vertical.vue" ]]
40+
3541
### Custom content
3642

3743
Use the [`thumb`](#slots-thumb) / [`tip`](#slots-tip) slots to customize the slider button, hover tips, and other content.
@@ -51,6 +57,7 @@ Use the [`thumb`](#slots-thumb) / [`tip`](#slots-tip) slots to customize the sli
5157
| ``max`` | `number` | `1` | The maximum value allowed after the `parse` function processes the `value`. |
5258
| ``step`` | `number` | `0` | The step value after the `parse` function processes the `value`. |
5359
| ``mark`` | `boolean` | `false` | Whether to display step marks. |
60+
| ``vertical`` | `boolean` | `false` | Whether to display vertically. |
5461
| ``parse`` | `function` | `val => val` | Value processing function. |
5562
| ``format`` | `function` | `val => val` | Output value processing function. |
5663

package-lock.json

Lines changed: 69 additions & 69 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@vue/runtime-dom": "^3.2.31",
3030
"babel-eslint": "^10.1.0",
3131
"babel-plugin-lodash": "^3.3.4",
32-
"babel-plugin-veui": "^2.14.1",
32+
"babel-plugin-veui": "^2.14.2",
3333
"cheerio": "^1.0.0-rc.10",
3434
"dls-graphics": "^1.0.0-alpha.3",
3535
"dls-icons-vue": "^2.6.0",
@@ -92,10 +92,10 @@
9292
"typescript": "^4.6.2",
9393
"unist-util-remove": "^1.0.1",
9494
"unist-util-visit": "^1.4.0",
95-
"veui": "^2.14.1",
96-
"veui-loader": "^2.14.1",
97-
"veui-theme-dls": "^2.14.1",
98-
"veui-theme-dls-icons": "^2.14.1",
95+
"veui": "^2.14.2",
96+
"veui-loader": "^2.14.2",
97+
"veui-theme-dls": "^2.14.2",
98+
"veui-theme-dls-icons": "^2.14.2",
9999
"vue-awesome": "^4.5.0",
100100
"vue-frag": "^1.4.0",
101101
"vue-i18n": "^8.16.0",

0 commit comments

Comments
 (0)