[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
+1 -1
View File
@@ -27,7 +27,7 @@
@click.stop="$emit('input', false)"
/>
<div v-else class="van-actionsheet__content">
<slot></slot>
<slot />
</div>
</div>
</transition>
+1 -1
View File
@@ -9,7 +9,7 @@
rows="1"
:value="value"
:error="isError"
:onIconClick="onIconClick"
:on-icon-click="onIconClick"
@input="$emit('input', $event)"
@focus="handleFocus"
@blur="handleBlur"
+5 -5
View File
@@ -24,9 +24,9 @@
</cell>
<address-edit-detail
:value="currentInfo.address_detail"
:isError="errorInfo.address_detail"
:showSearchResult="showSearchResult"
:searchResult="searchResult"
:is-error="errorInfo.address_detail"
:show-search-result="showSearchResult"
:search-result="searchResult"
@focus="onFocus('address_detail')"
@blur="onDetailBlur"
@input="onChangeDetail"
@@ -44,7 +44,7 @@
:error="errorInfo.postal_code"
@focus="onFocus('postal_code')"
/>
<switch-cell
<switch-cell
v-if="showSetDefault"
v-show="!hideBottomFields"
v-model="currentInfo.is_default"
@@ -63,7 +63,7 @@
<van-area
ref="area"
:value="currentInfo.area_code"
:areaList="areaList"
:area-list="areaList"
@confirm="onAreaConfirm"
@cancel="showAreaSelect = false"
/>
+1 -1
View File
@@ -16,7 +16,7 @@
class="van-address-list__add van-hairline--top"
@click="$emit('add')"
:title="addButtonText || $t('add')"
isLink
is-link
/>
</div>
</template>
+2 -2
View File
@@ -2,8 +2,8 @@
<picker
class="van-area"
ref="picker"
showToolbar
valueKey="name"
show-toolbar
value-key="name"
:title="title"
:columns="columns"
@change="onChange"
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-badge-group van-hairline--top-bottom">
<slot></slot>
<slot />
</div>
</template>
+3 -3
View File
@@ -14,8 +14,8 @@
'van-button--bottom-action': bottomAction
}
]"
@click="onClick"
>
@click="onClick"
>
<loading
v-if="loading"
class="van-button__icon-loading"
@@ -23,7 +23,7 @@
:color="type === 'default' ? 'black' : 'white'"
/>
<span class="van-button__text">
<slot></slot>
<slot />
</span>
</component>
</template>
+3 -3
View File
@@ -2,7 +2,7 @@
<div class="van-card" :class="{ 'van-card--center': centered }">
<div class="van-card__thumb">
<slot name="thumb">
<img :src="thumb" class="van-card__img" />
<img :src="thumb" class="van-card__img" >
</slot>
</div>
<div class="van-card__content">
@@ -18,10 +18,10 @@
<div v-if="num !== undefined" class="van-card__num">x {{ num }}</div>
</div>
</slot>
<slot name="tags"></slot>
<slot name="tags" />
</div>
<div class="van-card__footer" v-if="$slots.footer">
<slot name="footer"></slot>
<slot name="footer" />
</div>
</div>
</template>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-cell-group" :class="{ 'van-hairline--top-bottom': border }">
<slot></slot>
<slot />
</div>
</template>
+4 -4
View File
@@ -1,5 +1,5 @@
<template>
<div
<div
v-clickoutside:touchstart="onClick"
class="van-cell-swipe"
@click="onClick('cell')"
@@ -10,11 +10,11 @@
>
<div class="van-cell-swipe__wrapper" :style="wrapperStyle" @transitionend="swipe = false">
<div class="van-cell-swipe__left" @click.stop="onClick('left')" v-if="leftWidth">
<slot name="left"></slot>
<slot name="left" />
</div>
<slot></slot>
<slot />
<div class="van-cell-swipe__right" @click.stop="onClick('right')" v-if="rightWidth">
<slot name="right"></slot>
<slot name="right" />
</div>
</div>
</div>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-checkbox-group">
<slot></slot>
<slot />
</div>
</template>
+6 -5
View File
@@ -2,20 +2,21 @@
<div
class="van-checkbox"
:class="[
`van-checkbox--${shape}`, {
'van-checkbox--disabled': isDisabled
}]">
`van-checkbox--${shape}`,
{ 'van-checkbox--disabled': isDisabled }
]"
>
<span class="van-checkbox__input">
<input
v-model="currentValue"
type="checkbox"
class="van-checkbox__control"
:disabled="isDisabled"
/>
>
<icon name="success" />
</span>
<span class="van-checkbox__label" @click="onClickLabel">
<slot></slot>
<slot />
</span>
</div>
</template>
+1 -1
View File
@@ -4,7 +4,7 @@
:class="{ [`van-col-${span}`]: span, [`van-col-offset-${offset}`]: offset}"
:style="style"
>
<slot></slot>
<slot />
</div>
</template>
+4 -4
View File
@@ -7,16 +7,16 @@
:label="$t('name')"
:placeholder="$t('namePlaceholder')"
:error="errorInfo.name"
@focus="onFocus('name')">
</field>
@focus="onFocus('name')"
/>
<field
v-model="currentInfo.tel"
type="tel"
:label="$t('tel')"
:placeholder="$t('telPlaceholder')"
:error="errorInfo.tel"
@focus="onFocus('tel')">
</field>
@focus="onFocus('tel')"
/>
</cell-group>
<div class="van-contact-edit__buttons">
<van-button block :loading="isSaving" @click="onSaveContact" type="primary">{{ $t('save') }}</van-button>
+7 -1
View File
@@ -11,7 +11,13 @@
</cell>
</cell-group>
</radio-group>
<cell icon="add" class="van-contact-list__add van-hairline--top" @click="$emit('add')" :title="addText || $t('addText')" isLink />
<cell
icon="add"
class="van-contact-list__add van-hairline--top"
@click="$emit('add')"
:title="addText || $t('addText')"
is-link
/>
</div>
</template>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<cell-group class="van-coupon-cell">
<cell :title="title || $t('title')" :value="value" :isLink="editable" @click="$emit('click')" />
<cell :title="title || $t('title')" :value="value" :is-link="editable" @click="$emit('click')" />
</cell-group>
</template>
+1 -1
View File
@@ -1,7 +1,7 @@
<template>
<div class="van-coupon-item" :class="{ 'van-coupon-item--disabled': disabled }">
<div class="van-coupon-item__head">
<div class="van-coupon-item__lines"></div>
<div class="van-coupon-item__lines" />
<div class="van-coupon-item__gradient">
<h2 v-html="faceAmount" />
<p>{{ conditionMessage }}</p>
+2 -2
View File
@@ -1,9 +1,9 @@
<template>
<picker
ref="picker"
showToolbar
show-toolbar
:columns="columns"
:visibleItemCount="visibleItemCount"
:visible-item-count="visibleItemCount"
@change="onChange"
@confirm="onConfirm"
@cancel="$emit('cancel')"
+4 -3
View File
@@ -12,7 +12,8 @@
'van-field--autosize': autosize,
'van-field--has-icon': hasIcon,
'van-hairline--surround': border
}">
}"
>
<textarea
v-if="type === 'textarea'"
v-bind="$attrs"
@@ -23,12 +24,12 @@
/>
<input
v-else
v-bind="$attrs"
v-bind="$attrs"
v-on="listeners"
class="van-field__control"
:type="type"
:value="value"
/>
>
<div
v-if="hasIcon"
v-show="$slots.icon || value"
+1 -1
View File
@@ -4,7 +4,7 @@
:href="url"
class="van-goods-action__big-btn"
:type="primary ? 'primary' : 'default'"
bottomAction
bottom-action
@click="onClick"
>
<slot>{{ text }}</slot>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-goods-action">
<slot></slot>
<slot />
</div>
</template>
+3 -1
View File
@@ -1,6 +1,6 @@
<template>
<i class="van-icon" :class="`van-icon-${name}`" v-on="$listeners">
<slot></slot>
<slot />
<div v-if="info" class="van-icon__info">{{ info }}</div>
</i>
</template>
@@ -10,7 +10,9 @@ import install from '../utils/install';
export default {
install,
name: 'van-icon',
props: {
name: String,
info: String
+1 -1
View File
@@ -7,7 +7,7 @@
@touchend="onTouchEnd"
@touchcancel="onTouchEnd"
>
<swipe :initialSwipe="startPosition">
<swipe :initial-swipe="startPosition">
<swipe-item v-for="(item, index) in images" :key="index">
<img class="van-image-preview__image" :src="item" >
</swipe-item>
+1 -1
View File
@@ -7,7 +7,7 @@
@click="$emit('click')"
>
<div class="van-notice-bar__left-icon" v-if="leftIcon">
<img :src="leftIcon" />
<img :src="leftIcon" >
</div>
<div class="van-notice-bar__content-wrap" ref="contentWrap">
<div
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<transition :name="transition ? 'van-slide-bottom' : ''">
<div
<div
v-show="show"
:style="style"
class="van-number-keyboard"
+7 -7
View File
@@ -7,10 +7,10 @@
>
{{ prevText || $t('prev') }}
</li>
<li
v-if="isMultiMode"
v-for="(page, index) in pages"
:key="index"
<li
v-if="isMultiMode"
v-for="(page, index) in pages"
:key="index"
class="van-pagination__item van-pagination__page van-hairline"
:class="{ 'van-pagination--active': page.active }"
@click="selectPage(page.number)"
@@ -22,8 +22,8 @@
</li>
<li
class="van-pagination__item van-pagination__next van-hairline"
:class="{ 'van-pagination--disabled': value === computedPageCount }"
@click="selectPage(value + 1)"
:class="{ 'van-pagination--disabled': value === computedPageCount }"
@click="selectPage(value + 1)"
>
{{ nextText || $t('next') }}
</li>
@@ -144,4 +144,4 @@ export default create({
}
}
});
</script>
</script>
+2 -2
View File
@@ -8,10 +8,10 @@
</slot>
</div>
<div class="van-panel__content">
<slot></slot>
<slot />
</div>
<div class="van-panel__footer van-hairline--top" v-if="$slots.footer">
<slot name="footer"></slot>
<slot name="footer" />
</div>
</div>
</template>
+4 -4
View File
@@ -5,12 +5,12 @@
<i :style="`visibility: ${visibility}`" />
</li>
</ul>
<div
v-if="errorInfo || info"
v-text="errorInfo || info"
<div
v-if="errorInfo || info"
v-text="errorInfo || info"
:class="errorInfo ? 'van-password-input__error-info' : 'van-password-input__info'"
/>
</div>
</div>
</template>
<script>
+1 -1
View File
@@ -11,7 +11,7 @@
>
<ul :style="wrapperStyle">
<li
v-for="(option, index) in options"
v-for="(option, index) in options"
v-text="getOptionText(option)"
:class="{
'van-picker-column--disabled': isDisabled(option),
+5 -5
View File
@@ -11,12 +11,12 @@
<picker-column
v-for="(item, index) in currentColumns"
:key="index"
:valueKey="valueKey"
:value-key="valueKey"
:options="item.values"
:className="item.className"
:defaultIndex="item.defaultIndex"
:itemHeight="itemHeight"
:visibileColumnCount="visibileColumnCount"
:class-name="item.className"
:default-index="item.defaultIndex"
:item-height="itemHeight"
:visibile-column-count="visibileColumnCount"
@change="onChange(index)"
/>
<div class="van-picker__frame van-hairline--top-bottom" :style="frameStyle" />
+1 -1
View File
@@ -1,7 +1,7 @@
<template>
<transition :name="currentTransition">
<div v-show="value" class="van-popup" :class="{ [`van-popup--${position}`]: position }">
<slot></slot>
<slot />
</div>
</transition>
</template>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-progress">
<span class="van-progress__portion" :style="portionStyle"></span>
<span class="van-progress__portion" :style="portionStyle" />
<span class="van-progress__pivot" v-show="showPivot" :style="pivotStyle">{{ pivotText }}</span>
</div>
</template>
+2 -2
View File
@@ -9,7 +9,7 @@
@touchcancel="onTouchEnd"
>
<div class="van-pull-refresh__head">
<slot name="normal" v-if="status === 'normal'"></slot>
<slot name="normal" v-if="status === 'normal'"/>
<slot name="pulling" v-if="status === 'pulling'">
<span class="van-pull-refresh__text">{{ pullingText || $t('pullingText') }}</span>
</slot>
@@ -23,7 +23,7 @@
</div>
</slot>
</div>
<slot></slot>
<slot />
</div>
</div>
</template>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-radio-group">
<slot></slot>
<slot />
</div>
</template>
+1 -1
View File
@@ -14,7 +14,7 @@
<icon :name="currentValue === name ? 'checked' : 'check'" />
</span>
<span class="van-radio__label" @click="handleLabelClick">
<slot></slot>
<slot />
</span>
</div>
</template>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-row" :style="style">
<slot></slot>
<slot />
</div>
</template>
+2 -2
View File
@@ -1,7 +1,7 @@
<template>
<div class="van-sku-actions">
<van-button v-if="showAddCartBtn" bottomAction @click="onAddCartClicked">{{ $t('cart') }}</van-button>
<van-button type="primary" bottomAction @click="onBuyClicked">{{ buyText || $t('buy') }}</van-button>
<van-button v-if="showAddCartBtn" bottom-action @click="onAddCartClicked">{{ $t('cart') }}</van-button>
<van-button type="primary" bottom-action @click="onBuyClicked">{{ buyText || $t('buy') }}</van-button>
</div>
</template>
+1 -1
View File
@@ -6,7 +6,7 @@
<div class="van-sku-header__goods-info">
<div class="van-sku__goods-name">{{ goods.title }}</div>
<div class="van-sku__goods-price"><span class="van-sku__price-symbol"></span><span class="van-sku__price-num">{{ price }}</span></div>
<span class="van-sku__close-icon" @click="onCloseClicked"></span>
<span class="van-sku__close-icon" @click="onCloseClicked" />
</div>
</div>
</template>
+9 -7
View File
@@ -1,23 +1,25 @@
<template>
<cell-group class="van-sku-messages">
<template v-for="(message, index) in internalMessages">
<template v-if="message.type === 'image'"></template>
<field v-else-if="message.multiple == '1'"
<template v-if="message.type === 'image'" />
<field
v-else-if="message.multiple == '1'"
:key="`${goodsId}-${index}`"
:required="message.required == '1'"
:label="message.name"
:placeholder="getPlaceholder('textarea')"
type="textarea"
v-model="messageValues[index]">
</field>
<field v-else
v-model="messageValues[index]"
/>
<field
v-else
:key="`${goodsId}-${index}`"
:required="message.required == '1'"
:label="message.name"
:placeholder="getPlaceholder(message.type)"
:type="getType(message)"
v-model="messageValues[index]">
</field>
v-model="messageValues[index]"
/>
</template>
</cell-group>
</template>
+1 -1
View File
@@ -2,7 +2,7 @@
<div class="van-sku-row">
<div class="van-sku-row__title">{{ skuRow.k }}</div>
<div class="van-sku-row__items">
<slot></slot>
<slot />
</div>
</div>
</template>
+2 -1
View File
@@ -1,5 +1,6 @@
<template>
<span v-if="isChoosable"
<span
v-if="isChoosable"
@click="onSkuSelected"
class="van-sku-row__item"
:class="{ 'van-sku-row__item--active': isChoosed }">
+3 -3
View File
@@ -7,9 +7,9 @@
v-model="currentNum"
:min="1"
:max="stepperLimit"
:disableInput="disableStepperInput"
@overlimit="handleOverLimit">
</stepper>
:disable-input="disableStepperInput"
@overlimit="handleOverLimit"
/>
</div>
<div v-if="!hideStock" class="van-sku__stock">{{ $t('remain', stock) }}</div>
<div v-if="quota > 0" class="van-sku__quota">{{ $t('quota', quota) }}</div>
+54 -45
View File
@@ -1,69 +1,71 @@
<template>
<popup v-model="show" v-if="!isSkuEmpty" position="bottom" lockOnScroll preventScroll>
<popup v-model="show" v-if="!isSkuEmpty" position="bottom" lock-on-scroll prevent-scroll>
<div class="van-sku-container">
<div class="van-sku-layout">
<slot name="sku-header" :skuEventBus="skuEventBus" :selectedSku="selectedSku" :selectedSkuComb="selectedSkuComb">
<sku-header
:skuEventBus="skuEventBus"
:selectedSku="selectedSku"
:selectedSkuComb="selectedSkuComb"
:sku-event-bus="skuEventBus"
:selected-sku="selectedSku"
:selected-sku-comb="selectedSkuComb"
:goods="goods"
:sku="sku">
</sku-header>
:sku="sku"
/>
</slot>
<div class="van-sku-body scroller" :style="bodyStyle">
<slot name="sku-group" :selectedSku="selectedSku" :skuEventBus="skuEventBus">
<div v-if="hasSku" class="van-sku-group-container van-hairline--bottom">
<div v-for="(skuTreeItem, index) in skuTree"
<div
v-for="(skuTreeItem, index) in skuTree"
class="van-sku-row-group"
:key="index">
<sku-row
:skuEventBus="skuEventBus"
:skuRow="skuTreeItem">
:sku-event-bus="skuEventBus"
:sku-row="skuTreeItem"
>
<sku-row-item
v-for="(skuValue, index) in skuTreeItem.v"
:key="index"
:skuKeyStr="skuTreeItem.k_s"
:skuValue="skuValue"
:skuEventBus="skuEventBus"
:selectedSku="selectedSku"
:skuList="sku.list">
</sku-row-item>
:sku-key-str="skuTreeItem.k_s"
:sku-value="skuValue"
:sku-event-bus="skuEventBus"
:selected-sku="selectedSku"
:sku-list="sku.list"
/>
</sku-row>
</div>
</div>
</slot>
<slot name="extra-sku-group" :skuEventBus="skuEventBus"></slot>
<slot name="extra-sku-group" :skuEventBus="skuEventBus"/>
<slot name="sku-stepper" :skuEventBus="skuEventBus" :selectedSku="selectedSku" :selectedSkuComb="selectedSkuComb" :selectedNum="selectedNum">
<sku-stepper
ref="skuStepper"
:skuEventBus="skuEventBus"
:selectedSku="selectedSku"
:selectedSkuComb="selectedSkuComb"
:selectedNum="selectedNum"
:stepperTitle="stepperTitle"
:skuStockNum="sku.stock_num"
:sku-event-bus="skuEventBus"
:selected-sku="selectedSku"
:selected-sku-comb="selectedSkuComb"
:selected-num="selectedNum"
:stepper-title="stepperTitle"
:sku-stock-num="sku.stock_num"
:quota="quota"
:quotaUsed="quotaUsed"
:disableStepperInput="disableStepperInput"
:hideStock="hideStock">
</sku-stepper>
:quota-used="quotaUsed"
:disable-stepper-input="disableStepperInput"
:hide-stock="hideStock"
/>
</slot>
<slot name="sku-messages">
<slot name="sku-messages">
<sku-messages
ref="skuMessages"
:goodsId="goodsId"
:messagePlaceholderMap="messagePlaceholderMap"
:messages="sku.messages">
</sku-messages>
:goods-id="goodsId"
:message-placeholder-map="messagePlaceholderMap"
:messages="sku.messages"
/>
</slot>
</div>
<slot name="sku-actions" :skuEventBus="skuEventBus">
<sku-actions
:skuEventBus="skuEventBus"
:buyText="buyText"
:showAddCartBtn="showAddCartBtn">
</sku-actions>
:sku-event-bus="skuEventBus"
:buy-text="buyText"
:show-add-cart-btn="showAddCartBtn"
/>
</slot>
</div>
</div>
@@ -71,6 +73,7 @@
</template>
<script>
/* eslint-disable camelcase */
import Vue from 'vue';
import Popup from '../../popup';
import Toast from '../../toast';
@@ -80,7 +83,11 @@ import SkuRowItem from '../components/SkuRowItem';
import SkuStepper from '../components/SkuStepper';
import SkuMessages from '../components/SkuMessages';
import SkuActions from '../components/SkuActions';
import { isAllSelected, getSkuComb, getSelectedSkuValues } from '../utils/skuHelper';
import {
isAllSelected,
getSkuComb,
getSelectedSkuValues
} from '../utils/skuHelper';
import { LIMIT_TYPE } from '../constants';
import { create } from '../../utils';
@@ -147,7 +154,10 @@ export default create({
show(val) {
this.$emit('input', val);
if (!val) {
const selectedSkuValues = getSelectedSkuValues(this.sku.tree, this.selectedSku);
const selectedSkuValues = getSelectedSkuValues(
this.sku.tree,
this.selectedSku
);
this.$emit('sku-close', {
selectedSkuValues,
@@ -200,7 +210,7 @@ export default create({
return {
id: this.sku.collection_id,
price: Math.round(this.sku.price * 100),
'stock_num': this.sku.stock_num
stock_num: this.sku.stock_num
};
} else if (this.isSkuCombSelected) {
return getSkuComb(this.sku.list, this.selectedSku);
@@ -231,7 +241,7 @@ export default create({
methods: {
resetSelectedSku(skuTree) {
this.selectedSku = {};
skuTree.forEach((item) => {
skuTree.forEach(item => {
// 只有一个sku规格值时默认选中
if (item.v.length === 1) {
this.selectedSku[item.k_s] = item.v[0].id;
@@ -241,9 +251,7 @@ export default create({
});
},
getSkuMessages() {
return this.$refs.skuMessages
? this.$refs.skuMessages.getMessages()
: {};
return this.$refs.skuMessages ? this.$refs.skuMessages.getMessages() : {};
},
getSkuCartMessages() {
return this.$refs.skuMessages
@@ -273,9 +281,10 @@ export default create({
},
handleSkuSelected(skuValue) {
// 点击已选中的sku时则取消选中
this.selectedSku = this.selectedSku[skuValue.skuKeyStr] === skuValue.id
? { ...this.selectedSku, [skuValue.skuKeyStr]: '' }
: { ...this.selectedSku, [skuValue.skuKeyStr]: skuValue.id };
this.selectedSku =
this.selectedSku[skuValue.skuKeyStr] === skuValue.id
? { ...this.selectedSku, [skuValue.skuKeyStr]: '' }
: { ...this.selectedSku, [skuValue.skuKeyStr]: skuValue.id };
this.$emit('sku-selected', {
skuValue,
+1 -1
View File
@@ -5,7 +5,7 @@
<icon v-else name="checked" :style="{ color: $parent.activeColor }" />
</div>
<div class="van-step__title" :style="titleStyle">
<slot></slot>
<slot />
</div>
<div class="van-step__line" />
</div>
+2 -4
View File
@@ -4,8 +4,7 @@
class="van-stepper__stepper van-stepper__minus"
:class="{ 'van-stepper__minus--disabled': isMinusDisabled }"
@click="onChange('minus')"
>
</button>
/>
<input
type="number"
class="van-stepper__input"
@@ -17,8 +16,7 @@
class="van-stepper__stepper van-stepper__plus"
:class="{ 'van-stepper__plus--disabled': isPlusDisabled }"
@click="onChange('plus')"
>
</button>
/>
</div>
</template>
+1 -1
View File
@@ -13,7 +13,7 @@
<slot name="message-extra" />
</div>
<div class="van-steps__items" :class="{ 'van-steps__items--alone': !title && !description }">
<slot></slot>
<slot />
</div>
</div>
</template>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-swipe-item" :style="style">
<slot></slot>
<slot />
</div>
</template>
+4 -4
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-swipe">
<div
<div
v-if="count > 1"
:style="trackStyle"
class="van-swipe__track"
@@ -10,15 +10,15 @@
@touchcancel="onTouchEnd"
@transitionend="$emit('change', activeIndicator)"
>
<slot></slot>
<slot />
</div>
<div v-else class="van-swipe__track">
<slot></slot>
<slot />
</div>
<div class="van-swipe__indicators" v-if="showIndicators && count > 1">
<i v-for="index in count" :class="{ 'van-swipe__indicator--active': index - 1 === activeIndicator }" />
</div>
</div>
</div>
</template>
<script>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-tab__pane" :class="{ 'van-tab__pane--select': index === parentGroup.curActive }">
<slot></slot>
<slot />
</div>
</template>
+1 -1
View File
@@ -7,7 +7,7 @@
<div v-if="info" class="van-icon__info">{{ info }}</div>
</div>
<div class="van-tabbar-item__text">
<slot :active="active"></slot>
<slot :active="active"/>
</div>
</div>
</template>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-tabbar van-hairline--top-bottom" :class="{ 'van-tabbar--fixed': fixed }">
<slot></slot>
<slot />
</div>
</template>
+8 -5
View File
@@ -1,9 +1,12 @@
<template>
<div class="van-tabs" :class="[`van-tabs--${type}`]">
<div class="van-tabs__wrap" :class="[`van-tabs__wrap--${position}`, {
'van-tabs--scrollable': scrollable,
'van-hairline--top-bottom': type === 'line'
}]">
<div
class="van-tabs__wrap"
:class="[`van-tabs__wrap--${position}`, {
'van-tabs--scrollable': scrollable,
'van-hairline--top-bottom': type === 'line'
}]"
>
<div class="van-tabs__nav" :class="`van-tabs__nav--${type}`" ref="nav">
<div v-if="type === 'line'" class="van-tabs__nav-bar" :style="navBarStyle" />
<div
@@ -22,7 +25,7 @@
</div>
</div>
<div class="van-tabs__content">
<slot></slot>
<slot />
</div>
</div>
</template>
+1 -1
View File
@@ -1,6 +1,6 @@
<template>
<span class="van-tag van-hairline--surround" :class="{ [`van-tag--${type}`]: type, 'van-tag--plain': plain, 'van-tag--mark': mark }">
<slot></slot>
<slot />
</span>
</template>
+2 -2
View File
@@ -1,6 +1,6 @@
<template>
<div class="van-uploader">
<slot></slot>
<slot />
<input
ref="input"
type="file"
@@ -8,7 +8,7 @@
v-bind="$attrs"
:disabled="disabled"
@change="onChange"
/>
>
</div>
</template>
@@ -8,6 +8,7 @@
}
.van-icon {
position: relative;
display: inline-block;
font: normal normal normal 14px/1 "<%= fontName %>";
font-size: inherit;
+1
View File
@@ -8,6 +8,7 @@
}
.van-icon {
position: relative;
display: inline-block;
font: normal normal normal 14px/1 "vant-icon";
font-size: inherit;