feat(Form): support using slider

This commit is contained in:
陈嘉涵
2020-02-10 17:17:09 +08:00
parent 7fa4e8cad1
commit dc77be6f8a
12 changed files with 122 additions and 62 deletions
+6 -6
View File
@@ -93,8 +93,12 @@ export default {
background: @white;
user-select: none;
.van-slider {
margin: 0 @padding-md @padding-xl;
.van-doc-demo-block {
padding: 0 @padding-md 20px;
}
.van-doc-demo-block__title {
padding-left: 0;
}
.custom-button {
@@ -106,9 +110,5 @@ export default {
background-color: @red;
border-radius: 100px;
}
.van-doc-demo-block__title {
padding-top: 25px;
}
}
</style>
+3 -2
View File
@@ -1,11 +1,12 @@
import { createNamespace, addUnit } from '../utils';
import { TouchMixin } from '../mixins/touch';
import { preventDefault } from '../utils/dom/event';
import { TouchMixin } from '../mixins/touch';
import { FieldMixin } from '../mixins/field';
const [createComponent, bem] = createNamespace('slider');
export default createComponent({
mixins: [TouchMixin],
mixins: [TouchMixin, FieldMixin],
props: {
disabled: Boolean,
+1
View File
@@ -2,6 +2,7 @@
.van-slider {
position: relative;
width: 100%;
background-color: @slider-inactive-background-color;
border-radius: @border-radius-max;
cursor: pointer;