[Doc] add Tab preview (#501)

This commit is contained in:
neverland 2018-09-05 15:02:57 +08:00 committed by GitHub
parent be87ff828c
commit 45e847caa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 21 deletions

View File

@ -35,6 +35,7 @@ const MAP = {
steps: 'steps-201808092138.png', steps: 'steps-201808092138.png',
switch: 'switch-201808092138.png', switch: 'switch-201808092138.png',
'switch-cell': 'switch-cell-201808221124.png', 'switch-cell': 'switch-cell-201808221124.png',
tab: 'tab-201809051457.png',
tag: 'tag-201808092138.png', tag: 'tag-201808092138.png',
tabbar: 'tabbar-201808160922.png', tabbar: 'tabbar-201808160922.png',
toast: 'toast-201808191046.png', toast: 'toast-201808191046.png',

View File

@ -48,7 +48,7 @@
wx:key="index" wx:key="index"
title="{{ '标签' + item }}" title="{{ '标签' + item }}"
> >
<view class="content"> <view class="content-2">
{{ '内容' + item }} {{ '内容' + item }}
</view> </view>
</van-tab> </van-tab>

View File

@ -2,3 +2,7 @@
padding: 20px; padding: 20px;
background-color: #fff; background-color: #fff;
} }
.content-2 {
padding: 20px;
}

View File

@ -1,6 +1,11 @@
import buttonBehaviors from '../behaviors/button'; import buttonBehaviors from '../behaviors/button';
import classnames from '../common/classnames'; import classnames from '../common/classnames';
const booleanProp = {
type: Boolean,
observer: 'setClasses'
};
Component({ Component({
options: { options: {
addGlobalClass: true addGlobalClass: true
@ -21,26 +26,11 @@ Component({
value: 'normal', value: 'normal',
observer: 'setClasses' observer: 'setClasses'
}, },
plain: { plain: booleanProp,
type: Boolean, block: booleanProp,
observer: 'setClasses' square: booleanProp,
}, loading: booleanProp,
disabled: { disabled: booleanProp
type: Boolean,
observer: 'setClasses'
},
loading: {
type: Boolean,
observer: 'setClasses'
},
block: {
type: Boolean,
observer: 'setClasses'
},
square: {
type: Boolean,
observer: 'setClasses'
}
}, },
attached() { attached() {