mirror of
https://github.com/youzan/vant.git
synced 2025-10-19 01:54:48 +00:00
[improvement] update eslint rules (#2089)
This commit is contained in:
@@ -5,12 +5,25 @@
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('disabled')">
|
||||
<van-checkbox :value="false" disabled>{{ $t('checkbox') }}</van-checkbox>
|
||||
<van-checkbox :value="true" disabled>{{ $t('checkbox') }}</van-checkbox>
|
||||
<van-checkbox
|
||||
:value="false"
|
||||
disabled
|
||||
>
|
||||
{{ $t('checkbox') }}
|
||||
</van-checkbox>
|
||||
<van-checkbox
|
||||
:value="true"
|
||||
disabled
|
||||
>
|
||||
{{ $t('checkbox') }}
|
||||
</van-checkbox>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('customColor')">
|
||||
<van-checkbox v-model="checkbox2" checked-color="#4b0">
|
||||
<van-checkbox
|
||||
v-model="checkbox2"
|
||||
checked-color="#4b0"
|
||||
>
|
||||
{{ $t('customColor') }}
|
||||
</van-checkbox>
|
||||
</demo-block>
|
||||
@@ -39,7 +52,10 @@
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('title4')">
|
||||
<van-checkbox-group v-model="result2" :max="2">
|
||||
<van-checkbox-group
|
||||
v-model="result2"
|
||||
:max="2"
|
||||
>
|
||||
<van-checkbox
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
@@ -60,7 +76,10 @@
|
||||
:title="$t('checkbox') + item"
|
||||
@click="toggle(index)"
|
||||
>
|
||||
<van-checkbox ref="checkboxes" :name="item" />
|
||||
<van-checkbox
|
||||
ref="checkboxes"
|
||||
:name="item"
|
||||
/>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</van-checkbox-group>
|
||||
|
@@ -1,11 +1,24 @@
|
||||
<template>
|
||||
<div :class="b()">
|
||||
<div :class="[b('icon', [shape, { disabled: isDisabled, checked }])]" @click="toggle">
|
||||
<slot name="icon" :checked="checked">
|
||||
<icon name="success" :style="iconStyle" />
|
||||
<div
|
||||
:class="[b('icon', [shape, { disabled: isDisabled, checked }])]"
|
||||
@click="toggle"
|
||||
>
|
||||
<slot
|
||||
name="icon"
|
||||
:checked="checked"
|
||||
>
|
||||
<icon
|
||||
name="success"
|
||||
:style="iconStyle"
|
||||
/>
|
||||
</slot>
|
||||
</div>
|
||||
<span v-if="$slots.default" :class="b('label', labelPosition)" @click="toggle('label')">
|
||||
<span
|
||||
v-if="$slots.default"
|
||||
:class="b('label', labelPosition)"
|
||||
@click="toggle('label')"
|
||||
>
|
||||
<slot />
|
||||
</span>
|
||||
</div>
|
||||
|
@@ -16,13 +16,17 @@ exports[`renders demo correctly 1`] = `
|
||||
<i class="van-icon van-icon-success" style="color:undefined;font-size:undefined;">
|
||||
<!---->
|
||||
</i>
|
||||
</div> <span class="van-checkbox__label">复选框</span></div>
|
||||
</div> <span class="van-checkbox__label">
|
||||
复选框
|
||||
</span></div>
|
||||
<div class="van-checkbox">
|
||||
<div class="van-checkbox__icon van-checkbox__icon--round van-checkbox__icon--disabled van-checkbox__icon--checked">
|
||||
<i class="van-icon van-icon-success" style="color:undefined;font-size:undefined;">
|
||||
<!---->
|
||||
</i>
|
||||
</div> <span class="van-checkbox__label">复选框</span></div>
|
||||
</div> <span class="van-checkbox__label">
|
||||
复选框
|
||||
</span></div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-checkbox">
|
||||
|
Reference in New Issue
Block a user