[Improvement] follow eslint-plugin-vue strongly-recommended code style (#482)

This commit is contained in:
neverland
2017-12-26 10:34:38 +08:00
committed by GitHub
parent 6362f7b74b
commit 508cdfc0c9
105 changed files with 409 additions and 462 deletions

View File

@@ -7,7 +7,7 @@
<demo-block :title="$t('title2')">
<van-button @click="show2 = true">{{ $t('button2') }}</van-button>
<van-actionsheet v-model="show2" :actions="actions" :cancelText="$t('cancel')" />
<van-actionsheet v-model="show2" :actions="actions" :cancel-text="$t('cancel')" />
</demo-block>
<demo-block :title="$t('title3')">

View File

@@ -2,11 +2,11 @@
<demo-section>
<demo-block :title="$t('basicUsage')">
<van-address-edit
:areaList="areaList"
:showPostal="true"
:showSetDefault="true"
:showSearchResult="true"
:searchResult="searchResult"
:area-list="areaList"
:show-postal="true"
:show-set-default="true"
:show-search-result="true"
:search-result="searchResult"
@save="onSave"
@delete="onDelete"
@change-detail="onChangeDetail"

View File

@@ -67,7 +67,7 @@ export default {
data() {
return {
chosenAddressId: '1'
}
};
},
methods: {

View File

@@ -1,15 +1,15 @@
<template>
<demo-section>
<demo-block :title="$t('basicUsage')">
<van-area :areaList="$t('areaList')" />
<van-area :area-list="$t('areaList')" />
</demo-block>
<demo-block :title="$t('title2')">
<van-area :areaList="$t('areaList')" :value="value" />
<van-area :area-list="$t('areaList')" :value="value" />
</demo-block>
<demo-block :title="$t('title3')">
<van-area :areaList="$t('areaList')" :columnsNum="2" :title="$t('title')" />
<van-area :area-list="$t('areaList')" :columns-num="2" :title="$t('title')" />
</demo-block>
</demo-section>
</template>

View File

@@ -1,11 +1,11 @@
<template>
<demo-section>
<demo-block :title="$t('basicUsage')">
<van-badge-group :activeKey="activeKey">
<van-badge :title="$t('title')" @click="onClick"></van-badge>
<van-badge :title="$t('title')" @click="onClick" info="8"></van-badge>
<van-badge :title="$t('title')" @click="onClick" info="99"></van-badge>
<van-badge :title="$t('title')" @click="onClick" info="199"></van-badge>
<van-badge-group :active-key="activeKey">
<van-badge :title="$t('title')" @click="onClick" />
<van-badge :title="$t('title')" @click="onClick" info="8" />
<van-badge :title="$t('title')" @click="onClick" info="99" />
<van-badge :title="$t('title')" @click="onClick" info="199" />
</van-badge-group>
</demo-block>
</demo-section>

View File

@@ -5,7 +5,7 @@
<van-button type="primary">{{ $t('primary') }}</van-button>
<van-button type="danger">{{ $t('danger') }}</van-button>
</demo-block>
<demo-block :title="$t('title2')">
<van-button size="large">{{ $t('large') }}</van-button>
<van-button size="normal">{{ $t('normal') }}</van-button>
@@ -18,8 +18,8 @@
</demo-block>
<demo-block :title="$t('title3')">
<van-button loading></van-button>
<van-button loading type="primary"></van-button>
<van-button loading />
<van-button loading type="primary" />
</demo-block>
<demo-block :title="$t('title4')">
@@ -29,14 +29,14 @@
</demo-block>
<demo-block :title="$t('title5')">
<van-button type="primary" bottomAction>{{ $t('button') }}</van-button>
<van-button type="primary" bottom-action>{{ $t('button') }}</van-button>
<van-row>
<van-col span="12">
<van-button bottomAction>{{ $t('button') }}</van-button>
<van-button bottom-action>{{ $t('button') }}</van-button>
</van-col>
<van-col span="12">
<van-button type="primary" bottomAction>{{ $t('button') }}</van-button>
<van-button type="primary" bottom-action>{{ $t('button') }}</van-button>
</van-col>
</van-row>
</demo-block>
@@ -75,10 +75,9 @@ export default {
mini: 'Mini'
}
}
}
};
</script>
<style lang="postcss">
.demo-button {
.van-button {
@@ -103,4 +102,4 @@ export default {
padding-left: 0;
}
}
</style>
</style>

View File

@@ -8,7 +8,7 @@
price="2.00"
:thumb="imageURL"
/>
</demo-block>
</demo-block>
<demo-block :title="$t('advancedUsage')">
<van-card
@@ -32,7 +32,7 @@ export default {
data() {
return {
imageURL: '//img.yzcdn.cn/upload_files/2017/07/02/af5b9f44deaeb68000d7e4a711160c53.jpg'
}
};
}
}
};
</script>

View File

@@ -6,7 +6,7 @@
<van-cell-swipe :right-width="65" :left-width="65">
<span slot="left">{{ $t('button1') }}</span>
<van-cell-group>
<van-cell :title="$t('title')" :value="$t('content')"></van-cell>
<van-cell :title="$t('title')" :value="$t('content')" />
</van-cell-group>
<span slot="right">{{ $t('button2') }}</span>
</van-cell-swipe>
@@ -16,7 +16,7 @@
<van-cell-swipe :right-width="65" :left-width="65" :on-close="onClose">
<span slot="left">{{ $t('button1') }}</span>
<van-cell-group>
<van-cell :title="$t('title')" :value="$t('content')"></van-cell>
<van-cell :title="$t('title')" :value="$t('content')" />
</van-cell-group>
<span slot="right">{{ $t('button2') }}</span>
</van-cell-swipe>
@@ -82,7 +82,7 @@ export default {
line-height: 44px;
}
.van-cell-swipe__left {
background-color: #FF4444;
background-color: #FF4444;
}
.van-cell-swipe__right {
background-color: #84c483;

View File

@@ -37,12 +37,12 @@
<van-cell :title="$t('cell')" icon="location" is-link />
<van-cell :title="$t('cell')">
<template slot="right-icon">
<van-icon name="search" class="van-cell__right-icon"></van-icon>
<van-icon name="search" class="van-cell__right-icon" />
</template>
</van-cell>
</van-cell-group>
</demo-block>
</demo-section>
</demo-section>
</template>
<script>
@@ -83,4 +83,4 @@ export default {
vertical-align: middle;
}
}
</style>
</style>

View File

@@ -20,8 +20,8 @@
<van-popup v-model="showEdit" position="bottom">
<van-contact-edit
:contactInfo="editingContact"
:isEdit="isEdit"
:contact-info="editingContact"
:is-edit="isEdit"
@save="onSave"
@delete="onDelete"
/>

View File

@@ -3,15 +3,15 @@
<demo-block :title="$t('basicUsage')">
<van-coupon-cell
:coupons="coupons"
:chosenCoupon="chosenCoupon"
:chosen-coupon="chosenCoupon"
@click="showList = true"
/>
<van-popup v-model="showList" position="bottom">
<van-coupon-list
:coupons="coupons"
:chosenCoupon="chosenCoupon"
:disabledCoupons="disabledCoupons"
:chosen-coupon="chosenCoupon"
:disabled-coupons="disabledCoupons"
@change="onChange"
@exchange="onExchange"
/>
@@ -21,6 +21,7 @@
</template>
<script>
/* eslint-disable camelcase */
export default {
i18n: {
'zh-CN': {
@@ -67,7 +68,7 @@ export default {
name: this.$t('coupon.name'),
start_at: 1489104000,
end_at: 1514592000
}
};
},
discountCoupon() {
@@ -78,7 +79,7 @@ export default {
denominations: 0,
origin_condition: 50,
value: 12
}
};
},
disabledCoupon() {
@@ -87,7 +88,7 @@ export default {
id: 3,
available: 0,
reason: this.$t('coupon.reason')
}
};
},
disabledDiscountCoupon() {
@@ -96,13 +97,13 @@ export default {
id: 4,
available: 0,
reason: this.$t('coupon.reason')
}
};
}
},
methods: {
onChange(index) {
this.showList = false;
this.showList = false;
this.chosenCoupon = index;
},
onExchange(code) {

View File

@@ -4,10 +4,10 @@
<van-datetime-picker
v-model="currentDate1"
type="datetime"
:minHour="minHour"
:maxHour="maxHour"
:minDate="minDate"
:maxDate="maxDate"
:min-hour="minHour"
:max-hour="maxHour"
:min-date="minDate"
:max-date="maxDate"
/>
</demo-block>
@@ -15,9 +15,9 @@
<van-datetime-picker
v-model="currentDate2"
type="date"
:minHour="minHour"
:maxHour="maxHour"
:minDate="minDate"
:min-hour="minHour"
:max-hour="maxHour"
:min-date="minDate"
/>
</demo-block>
@@ -25,9 +25,9 @@
<van-datetime-picker
v-model="currentDate3"
type="time"
:minHour="minHour"
:maxHour="maxHour"
:minDate="minDate"
:min-hour="minHour"
:max-hour="maxHour"
:min-date="minDate"
/>
</demo-block>
</demo-section>

View File

@@ -44,13 +44,12 @@ export default {
Dialog.confirm({
title: this.$t('title'),
message: this.$t('content')
})
});
}
}
};
</script>
<style lang="postcss">
.demo-dialog {
.van-button {

View File

@@ -2,7 +2,7 @@
<demo-section>
<demo-block :title="$t('basicUsage')">
<van-cell-group>
<van-field v-model="value" :placeholder="$t('usernamePlaceholder')"></van-field>
<van-field v-model="value" :placeholder="$t('usernamePlaceholder')" />
</van-cell-group>
</demo-block>
@@ -15,28 +15,27 @@
:placeholder="$t('usernamePlaceholder')"
required
@click-icon="username = ''"
>
</van-field>
/>
<van-field
v-model="password"
type="password"
:label="$t('password')"
:placeholder="$t('passwordPlaceholder')"
required>
</van-field>
required
/>
</van-cell-group>
</demo-block>
<demo-block :title="$t('title3')">
<van-cell-group>
<van-field :value="$t('inputDisabled')" :label="$t('username')" disabled></van-field>
<van-field :value="$t('inputDisabled')" :label="$t('username')" disabled />
</van-cell-group>
</demo-block>
<demo-block :title="$t('title4')">
<van-cell-group>
<van-field :label="$t('username')" :placeholder="$t('usernamePlaceholder')" error></van-field>
<van-field :label="$t('username')" :placeholder="$t('usernamePlaceholder')" error />
</van-cell-group>
</demo-block>
@@ -49,8 +48,7 @@
:placeholder="$t('messagePlaceholder')"
rows="1"
autosize
>
</van-field>
/>
</van-cell-group>
</demo-block>
</demo-section>

View File

@@ -58,7 +58,6 @@ export default {
};
</script>
<style lang="postcss">
.demo-goods-action {
.van-goods-action {

View File

@@ -26,7 +26,7 @@ export default {
this.icons = icons.glyphs.map(icon => icon.css);
return {};
}
}
};
</script>
<style lang="postcss">

View File

@@ -60,4 +60,4 @@ export default {
pointer-events: none;
}
}
</style>
</style>

View File

@@ -37,7 +37,7 @@ export default {
title2: 'Column Spacing'
}
}
}
};
</script>
<style lang="postcss">
@@ -67,4 +67,4 @@ export default {
}
}
}
</style>
</style>

View File

@@ -1,7 +1,7 @@
<template>
<demo-section>
<demo-block :title="$t('basicUsage')">
<img v-for="img in imageList" v-lazy="img" />
<img v-for="img in imageList" v-lazy="img" >
</demo-block>
<demo-block :title="$t('title2')">
@@ -10,7 +10,7 @@
<demo-block :title="$t('title3')">
<lazy-component>
<img v-for="img in componentImageList" v-lazy="img" />
<img v-for="img in componentImageList" v-lazy="img" >
</lazy-component>
</demo-block>
</demo-section>
@@ -53,7 +53,7 @@ export default {
console.log('component show');
}
}
}
};
</script>
<style lang="postcss">
@@ -79,4 +79,4 @@ export default {
padding-left: 0;
}
}
</style>
</style>

View File

@@ -31,7 +31,7 @@ export default {
title3: 'Spinner'
}
}
}
};
</script>
<style lang="postcss">

View File

@@ -3,16 +3,16 @@
<demo-block :title="$t('basicUsage')">
<van-nav-bar
:title="$t('title')"
:leftText="$t('back')"
:rightText="$t('button')"
leftArrow
:left-text="$t('back')"
:right-text="$t('button')"
left-arrow
@click-left="onClickLeft"
@click-right="onClickRight"
/>
</demo-block>
<demo-block :title="$t('advancedUsage')">
<van-nav-bar :title="$t('title')" :leftText="$t('back')" leftArrow>
<van-nav-bar :title="$t('title')" :left-text="$t('back')" left-arrow>
<van-icon name="search" slot="right" />
</van-nav-bar>
</demo-block>
@@ -29,5 +29,5 @@ export default {
Toast(this.$t('button'));
}
}
}
};
</script>

View File

@@ -3,7 +3,7 @@
<demo-block :title="$t('basicUsage')">
<van-notice-bar
:text="$t('text')"
leftIcon="//img.yzcdn.cn/public_files/2017/8/10/6af5b7168eed548100d9041f07b7c616.png"
left-icon="//img.yzcdn.cn/public_files/2017/8/10/6af5b7168eed548100d9041f07b7c616.png"
/>
</demo-block>
@@ -32,7 +32,7 @@ export default {
text: 'Only those who have the patience to do simple things perfectly ever acquire the skill to do difficult things easily.'
}
}
}
};
</script>
<style lang="postcss">
@@ -41,4 +41,4 @@ export default {
margin-top: 15px;
}
}
</style>
</style>

View File

@@ -7,8 +7,8 @@
<van-number-keyboard
:show="keyboard === 'default'"
:closeButtonText="$t('close')"
extraKey="."
:close-button-text="$t('close')"
extra-key="."
@blur="keyboard = ''"
@input="onInput"
@delete="onDelete"
@@ -22,9 +22,9 @@
<van-number-keyboard
:show="keyboard === 'custom'"
:closeButtonText="$t('close')"
:close-button-text="$t('close')"
theme="custom"
extraKey="."
extra-key="."
@blur="keyboard = ''"
@input="onInput"
@delete="onDelete"

View File

@@ -1,34 +1,34 @@
<template>
<demo-section>
<demo-block :title="$t('basicUsage')">
<van-pagination
v-model="currentPage1"
:totalItems="24"
:itemsPerPage="5"
:previousText= "$t('prevText')"
:nextText= "$t('nextText')"
<van-pagination
v-model="currentPage1"
:total-items="24"
:items-per-page="5"
:previous-text= "$t('prevText')"
:next-text= "$t('nextText')"
/>
</demo-block>
<demo-block :title="$t('title2')">
<van-pagination
<van-pagination
v-model="currentPage2"
:pageCount="12"
:previousText= "$t('prevText')"
:nextText= "$t('nextText')"
mode="simple"
size="small"
:page-count="12"
:previous-text= "$t('prevText')"
:next-text= "$t('nextText')"
mode="simple"
size="small"
/>
</demo-block>
<demo-block :title="$t('title3')">
<van-pagination
forceEllipses
v-model="currentPage3"
:totalItems="125"
:showPageSize="3"
:previousText= "$t('prevText')"
:nextText= "$t('nextText')"
<van-pagination
force-ellipses
v-model="currentPage3"
:total-items="125"
:show-page-size="3"
:previous-text= "$t('prevText')"
:next-text= "$t('nextText')"
/>
</demo-block>
</demo-section>
@@ -55,7 +55,7 @@ export default {
return {
currentPage1: 1,
currentPage2: 1,
currentPage3: 1,
currentPage3: 1
};
}
};

View File

@@ -32,4 +32,4 @@
padding: 20px;
}
}
</style>
</style>

View File

@@ -10,7 +10,7 @@
<demo-block :title="$t('title3')">
<van-picker
showToolbar
show-toolbar
:title="$t('area')"
:columns="$t('column1')"
@cancel="onCancel"
@@ -49,7 +49,6 @@ export default {
title2: 'Disable Option',
title3: 'Show Toolbar',
title4: 'Multi Columns',
title2: 'Picker with toolbar',
column1: ['Delaware', 'Florida', 'Georqia', 'Indiana', 'Maine'],
column2: [
{ text: 'Delaware', disabled: true },

View File

@@ -31,7 +31,7 @@
<van-button @click="show4 = false">{{ $t('button6') }}</van-button>
</van-popup>
</demo-block>
</demo-section>
</demo-section>
</template>
<script>
@@ -63,7 +63,7 @@ export default {
show2: false,
show3: false,
show4: false
}
};
},
watch: {
@@ -81,7 +81,7 @@ export default {
Dialog.confirm({
title: 'confirm标题',
message: '弹窗提示文字左右始终距离边20PX上下距离20PX文字左对齐。弹窗提示文字左右始终距离边20PX上下距离20PX文字左对齐。'
})
});
}
}
};
@@ -138,4 +138,4 @@ export default {
}
}
}
</style>
</style>

View File

@@ -13,9 +13,9 @@
</demo-block>
<demo-block :title="$t('title3')">
<van-progress :pivotText="$t('red')" color="#ed5050" :percentage="26" />
<van-progress :pivotText="$t('orange')" color="#f60" :percentage="46" />
<van-progress :pivotText="$t('yellow')" color="#f09000" :percentage="66" />
<van-progress :pivot-text="$t('red')" color="#ed5050" :percentage="26" />
<van-progress :pivot-text="$t('orange')" color="#f60" :percentage="46" />
<van-progress :pivot-text="$t('yellow')" color="#f09000" :percentage="66" />
</demo-block>
</demo-section>
</template>
@@ -32,7 +32,7 @@ export default {
title3: 'Custom Style'
}
}
}
};
</script>
<style lang="postcss">
@@ -44,5 +44,5 @@ export default {
margin-top: 10px;
}
}
}
</style>
}
</style>

View File

@@ -81,7 +81,7 @@ export default {
float: right;
position: static;
}
.van-radio__label {
margin: 0;
}

View File

@@ -9,7 +9,7 @@
<van-search
v-model="value"
:placeholder="$t('placeholder')"
:showAction="true"
:show-action="true"
@search="onSearch"
@cancel="onCancel"
/>
@@ -19,8 +19,9 @@
<demo-block :title="$t('title3')">
<van-search
v-model="value"
:showAction="true"
@search="onSearch">
:show-action="true"
@search="onSearch"
>
<div slot="action" @click="onSearch">{{ $t('search') }}</div>
</van-search>
</demo-block>
@@ -44,7 +45,7 @@ export default {
data() {
return {
value: '',
value: ''
};
},
@@ -65,4 +66,4 @@ export default {
padding: 0 10px;
}
}
</style>
</style>

View File

@@ -6,16 +6,15 @@
v-model="showBase"
:sku="$t('sku').sku"
:goods="$t('sku').goods_info"
:goodsId="$t('sku').goods_id"
:hideStock="$t('sku').sku.hide_stock"
:goods-id="$t('sku').goods_id"
:hide-stock="$t('sku').sku.hide_stock"
:quota="$t('sku').quota"
:quotaUsed="$t('sku').quota_used"
:resetStepperOnHide="true"
:disableStepperInput="true"
:quota-used="$t('sku').quota_used"
:reset-stepper-on-hide="true"
:disable-stepper-input="true"
@buy-clicked="handleBuyClicked"
@add-cart="handleAddCartClicked"
>
</van-sku>
/>
<van-button type="primary" @click="showBase = true" block>{{ $t('basicUsage') }}</van-button>
</div>
</demo-block>
@@ -24,24 +23,24 @@
<div class="sku-container">
<van-sku
v-model="showCustomAction"
:stepperTitle="$t('stepperTitle')"
:stepper-title="$t('stepperTitle')"
:sku="$t('sku').sku"
:goods="$t('sku').goods_info"
:goodsId="$t('sku').goods_id"
:hideStock="$t('sku').sku.hide_stock"
:showAddCartBtn="true"
:goods-id="$t('sku').goods_id"
:hide-stock="$t('sku').sku.hide_stock"
:show-add-cart-btn="true"
:quota="$t('sku').quota"
:quotaUsed="$t('sku').quota_used"
:resetStepperOnHide="true"
:initialSku="initialSku"
:quota-used="$t('sku').quota_used"
:reset-stepper-on-hide="true"
:initial-sku="initialSku"
@buy-clicked="handleBuyClicked"
@add-cart="handleAddCartClicked"
>
<template slot="sku-messages"></template>
<template slot="sku-messages" />
<template slot="sku-actions" slot-scope="props">
<div class="van-sku-actions">
<van-button bottomAction @click="handlePointClicked">{{ $t('button1') }}</van-button>
<van-button type="primary" bottomAction @click="props.skuEventBus.$emit('sku:buy')">{{ $t('button2') }}</van-button>
<van-button bottom-action @click="handlePointClicked">{{ $t('button1') }}</van-button>
<van-button type="primary" bottom-action @click="props.skuEventBus.$emit('sku:buy')">{{ $t('button2') }}</van-button>
</div>
</template>
</van-sku>

View File

@@ -9,9 +9,9 @@
</demo-block>
<demo-block :title="$t('advancedUsage')">
<van-stepper v-model="stepper2" min="5" max="40" step="2" defaultValue="9" />
<van-stepper v-model="stepper2" min="5" max="40" step="2" default-value="9" />
</demo-block>
</demo-section>
</demo-section>
</template>
<script>
@@ -19,7 +19,7 @@ export default {
data() {
return {
stepper1: 1,
stepper2: null,
stepper2: null
};
}
};
@@ -31,4 +31,4 @@ export default {
margin-left: 15px;
}
}
</style>
</style>

View File

@@ -9,7 +9,7 @@
</van-steps>
<van-button @click="nextStep">{{ $t('nextStep') }}</van-button>
</demo-block>
</demo-block>
<demo-block :title="$t('title2')">
<van-steps
@@ -28,19 +28,19 @@
<demo-block :title="$t('title3')">
<van-steps direction="vertical" :active="0" active-color="#f60">
<van-step>
<h3>{{ $t('status1') }}</h3>
<p>2016-07-12 12:40</p>
</van-step>
<van-step>
<h3>{{ $t('status2') }}</h3>
<p>2016-07-11 10:00</p>
</van-step>
<van-step>
<h3>{{ $t('status3') }}</h3>
<p>2016-07-10 09:30</p>
</van-step>
</van-steps>
<van-step>
<h3>{{ $t('status1') }}</h3>
<p>2016-07-12 12:40</p>
</van-step>
<van-step>
<h3>{{ $t('status2') }}</h3>
<p>2016-07-11 10:00</p>
</van-step>
<van-step>
<h3>{{ $t('status3') }}</h3>
<p>2016-07-10 09:30</p>
</van-step>
</van-steps>
</demo-block>
</demo-section>
</template>
@@ -85,7 +85,7 @@ export default {
this.active = ++this.active % 4;
}
}
}
};
</script>
<style lang="postcss">
@@ -110,4 +110,4 @@ export default {
font-weight: normal;
}
}
</style>
</style>

View File

@@ -3,7 +3,7 @@
<demo-block :title="$t('basicUsage')">
<van-submit-bar
:price="3050"
:buttonText="$t('submit')"
:button-text="$t('submit')"
@submit="onClickButton"
/>
</demo-block>
@@ -12,7 +12,7 @@
<van-submit-bar
disabled
:price="3050"
:buttonText="$t('submit')"
:button-text="$t('submit')"
:tip="$t('tip1')"
@submit="onClickButton"
/>
@@ -22,7 +22,7 @@
<van-submit-bar
loading
:price="3050"
:buttonText="$t('submit')"
:button-text="$t('submit')"
@submit="onClickButton"
/>
</demo-block>
@@ -30,7 +30,7 @@
<demo-block :title="$t('advancedUsage')">
<van-submit-bar
:price="3050"
:buttonText="$t('submit')"
:button-text="$t('submit')"
@submit="onClickButton"
>
<van-checkbox v-model="checked">{{ $t('check') }}</van-checkbox>

View File

@@ -12,7 +12,7 @@
<demo-block :title="$t('title2')">
<van-swipe :autoplay="3000">
<van-swipe-item v-for="(image, index) in images" :key="index">
<img v-lazy="image" />
<img v-lazy="image" >
</van-swipe-item>
</van-swipe>
</demo-block>
@@ -77,4 +77,4 @@ export default {
}
}
}
</style>
</style>

View File

@@ -22,15 +22,6 @@
<script>
export default {
i18n: {
'zh-CN': {
},
'en-US': {
}
},
data() {
return {
checked: true
@@ -38,8 +29,3 @@ export default {
}
};
</script>
<style lang="postcss">
</style>

View File

@@ -51,7 +51,6 @@ export default {
};
</script>
<style lang="postcss">
.demo-switch {
.van-switch {

View File

@@ -14,7 +14,7 @@
<van-tabbar-item icon="shop">
<span>{{ $t('custom') }}</span>
<template slot="icon" slot-scope="props">
<img :src="props.active ? icon.active : icon.normal" />
<img :src="props.active ? icon.active : icon.normal" >
</template>
</van-tabbar-item>
<van-tabbar-item icon="chat">{{ $t('tab') }}</van-tabbar-item>
@@ -43,12 +43,11 @@ export default {
normal: 'https://img.yzcdn.cn/public_files/2017/10/13/c547715be149dd3faa817e4a948b40c4.png',
active: 'https://img.yzcdn.cn/public_files/2017/10/13/793c77793db8641c4c325b7f25bf130d.png'
}
}
};
}
}
};
</script>
<style lang="postcss">
.demo-tabbar {
.van-tabbar {

View File

@@ -85,7 +85,6 @@ export default {
};
</script>
<style lang="postcss">
.demo-toast {
.van-button {

View File

@@ -3,8 +3,8 @@
<demo-block :title="$t('basicUsage')">
<van-tree-select
:items="items"
:mainActiveIndex="mainActiveIndex"
:activeId="activeId"
:main-active-index="mainActiveIndex"
:active-id="activeId"
@navclick="onNavClick"
@itemclick="onItemClick"
/>
@@ -110,10 +110,5 @@ export default {
this.activeId = data.id;
}
}
}
};
</script>
<style lang="postcss">
</style>

View File

@@ -40,7 +40,7 @@ export default {
loadMore() {
this.disabled = true;
setTimeout(() => {
for (let i = 0; i < 5; i ++) {
for (let i = 0; i < 5; i++) {
this.list.push(this.list.length);
}
this.disabled = false;
@@ -50,7 +50,6 @@ export default {
};
</script>
<style lang="postcss">
.demo-waterfall {
ul {