[improvement] update eslint rules (#2089)

This commit is contained in:
neverland
2018-11-15 15:30:17 +08:00
committed by GitHub
parent 0860901ec1
commit e14b43e66a
129 changed files with 1874 additions and 456 deletions
+11 -2
View File
@@ -2,7 +2,10 @@
<demo-section>
<demo-block :title="$t('basicUsage')">
<van-cell-group>
<van-field v-model="value" :placeholder="$t('usernamePlaceholder')" />
<van-field
v-model="value"
:placeholder="$t('usernamePlaceholder')"
/>
</van-cell-group>
</demo-block>
@@ -78,7 +81,13 @@
:label="$t('sms')"
:placeholder="$t('smsPlaceholder')"
>
<van-button slot="button" size="small" type="primary">{{ $t('sendSMS') }}</van-button>
<van-button
slot="button"
size="small"
type="primary"
>
{{ $t('sendSMS') }}
</van-button>
</van-field>
</van-cell-group>
</demo-block>
+17 -4
View File
@@ -13,8 +13,14 @@
'min-height': type === 'textarea' && !autosize
})"
>
<slot name="left-icon" slot="icon" />
<slot name="label" slot="title" />
<slot
name="left-icon"
slot="icon"
/>
<slot
name="label"
slot="title"
/>
<div :class="b('body')">
<textarea
v-if="type === 'textarea'"
@@ -41,12 +47,19 @@
:class="b('clear')"
@touchstart.prevent="onClear"
/>
<div v-if="$slots.icon || icon" :class="b('icon')" @click="onClickIcon">
<div
v-if="$slots.icon || icon"
:class="b('icon')"
@click="onClickIcon"
>
<slot name="icon">
<icon :name="icon" />
</slot>
</div>
<div v-if="$slots.button" :class="b('button')">
<div
v-if="$slots.button"
:class="b('button')"
>
<slot name="button" />
</div>
</div>
@@ -151,7 +151,9 @@ exports[`renders demo correctly 1`] = `
<!---->
<!---->
<div class="van-field__button">
<button class="van-button van-button--primary van-button--small"><span class="van-button__text">发送验证码</span></button>
<button class="van-button van-button--primary van-button--small"><span class="van-button__text">
发送验证码
</span></button>
</div>
</div>
<!---->