[improvement] add padding variables (#3911)

This commit is contained in:
neverland
2019-07-20 15:46:27 +08:00
committed by GitHub
parent e400c9b67d
commit 5d83423b34
59 changed files with 132 additions and 242 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ Vue.use(Divider);
### Custom Style
```html
<van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 15px' }">
<van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 16px' }">
Text
</van-divider>
```
+1 -1
View File
@@ -48,7 +48,7 @@ Vue.use(Divider);
可以直接通过`style`属性设置分割线的样式
```html
<van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 15px' }">
<van-divider :style="{ color: '#1989fa', borderColor: '#1989fa', padding: '0 16px' }">
文字
</van-divider>
```
+5 -3
View File
@@ -30,7 +30,7 @@
</demo-block>
<demo-block :title="$t('customStyle')">
<van-divider :style="{ borderColor: BLUE, color: BLUE, padding: '0 15px' }">
<van-divider :style="{ borderColor: BLUE, color: BLUE, padding: '0 16px' }">
{{ $t('text') }}
</van-divider>
</demo-block>
@@ -67,11 +67,13 @@ export default {
</script>
<style lang="less">
@import "../../style/var";
.demo-divider {
background-color: #fff;
background-color: @white;
.van-doc-demo-block__title {
padding-top: 15px;
padding-top: @padding-md;
}
}
</style>
@@ -24,7 +24,7 @@ exports[`renders demo correctly 1`] = `
</div>
</div>
<div>
<div class="van-divider van-divider--hairline van-divider--content-center" style="border-color: #1989fa; color: rgb(25, 137, 250); padding: 0px 15px;">
<div class="van-divider van-divider--hairline van-divider--content-center" style="border-color: #1989fa; color: rgb(25, 137, 250); padding: 0px 16px;">
文本
</div>
</div>