docs(Field): remove unused CellGroup wrapper

This commit is contained in:
chenjiahan
2020-03-01 20:38:16 +08:00
parent 65bdc75ca6
commit de128b9719
12 changed files with 208 additions and 244 deletions
+8 -10
View File
@@ -1,15 +1,13 @@
<template>
<demo-block :title="$t('autosize')">
<van-cell-group>
<van-field
v-model="value"
autosize
rows="1"
type="textarea"
:label="$t('message')"
:placeholder="$t('placeholder')"
/>
</van-cell-group>
<van-field
v-model="value"
autosize
rows="1"
type="textarea"
:label="$t('message')"
:placeholder="$t('placeholder')"
/>
</demo-block>
</template>
+29 -31
View File
@@ -1,36 +1,34 @@
<template>
<demo-block :title="$t('customType')">
<van-cell-group>
<van-field
v-model="text"
:label="$t('text')"
:placeholder="$t('textPlaceholder')"
/>
<van-field
v-model="phone"
type="tel"
:label="$t('phone')"
:placeholder="$t('phonePlaceholder')"
/>
<van-field
v-model="digit"
type="digit"
:label="$t('digit')"
:placeholder="$t('digitPlaceholder')"
/>
<van-field
v-model="number"
type="number"
:label="$t('number')"
:placeholder="$t('numberPlaceholder')"
/>
<van-field
v-model="password"
type="password"
:label="$t('password')"
:placeholder="$t('passwordPlaceholder')"
/>
</van-cell-group>
<van-field
v-model="text"
:label="$t('text')"
:placeholder="$t('textPlaceholder')"
/>
<van-field
v-model="phone"
type="tel"
:label="$t('phone')"
:placeholder="$t('phonePlaceholder')"
/>
<van-field
v-model="digit"
type="digit"
:label="$t('digit')"
:placeholder="$t('digitPlaceholder')"
/>
<van-field
v-model="number"
type="number"
:label="$t('number')"
:placeholder="$t('numberPlaceholder')"
/>
<van-field
v-model="password"
type="password"
:label="$t('password')"
:placeholder="$t('passwordPlaceholder')"
/>
</demo-block>
</template>
+2 -4
View File
@@ -1,9 +1,7 @@
<template>
<demo-block :title="$t('disabled')">
<van-cell-group>
<van-field :value="$t('inputReadonly')" :label="$t('text')" readonly />
<van-field :value="$t('inputDisabled')" :label="$t('text')" disabled />
</van-cell-group>
<van-field :value="$t('inputReadonly')" :label="$t('text')" readonly />
<van-field :value="$t('inputDisabled')" :label="$t('text')" disabled />
</demo-block>
</template>
+14 -16
View File
@@ -1,21 +1,19 @@
<template>
<demo-block :title="$t('errorInfo')">
<van-cell-group>
<van-field
v-model="username"
error
required
:label="$t('username')"
:placeholder="$t('usernamePlaceholder')"
/>
<van-field
v-model="phone"
required
:label="$t('phone')"
:placeholder="$t('phonePlaceholder')"
:error-message="$t('phoneError')"
/>
</van-cell-group>
<van-field
v-model="username"
error
required
:label="$t('username')"
:placeholder="$t('usernamePlaceholder')"
/>
<van-field
v-model="phone"
required
:label="$t('phone')"
:placeholder="$t('phonePlaceholder')"
:error-message="$t('phoneError')"
/>
</demo-block>
</template>
+6 -8
View File
@@ -1,13 +1,11 @@
<template>
<demo-block v-if="!isWeapp" :title="$t('formatValue')">
<van-cell-group>
<van-field
v-model="formatValue"
:label="$t('text')"
:formatter="formatter"
:placeholder="$t('formatValue')"
/>
</van-cell-group>
<van-field
v-model="formatValue"
:label="$t('text')"
:formatter="formatter"
:placeholder="$t('formatValue')"
/>
</demo-block>
</template>
+6 -8
View File
@@ -1,13 +1,11 @@
<template>
<demo-block :title="$t('inputAlign')">
<van-cell-group>
<van-field
v-model="value"
:label="$t('text')"
:placeholder="$t('alignPlaceHolder')"
input-align="right"
/>
</van-cell-group>
<van-field
v-model="value"
:label="$t('text')"
:placeholder="$t('alignPlaceHolder')"
input-align="right"
/>
</demo-block>
</template>
+13 -15
View File
@@ -1,20 +1,18 @@
<template>
<demo-block :title="$t('insertButton')">
<van-cell-group>
<van-field
v-model="sms"
center
clearable
:label="$t('sms')"
:placeholder="$t('smsPlaceholder')"
>
<template #button>
<van-button size="small" type="primary">
{{ $t('sendSMS') }}
</van-button>
</template>
</van-field>
</van-cell-group>
<van-field
v-model="sms"
center
clearable
:label="$t('sms')"
:placeholder="$t('smsPlaceholder')"
>
<template #button>
<van-button size="small" type="primary">
{{ $t('sendSMS') }}
</van-button>
</template>
</van-field>
</demo-block>
</template>
+14 -16
View File
@@ -1,21 +1,19 @@
<template>
<demo-block :title="$t('showIcon')">
<van-cell-group>
<van-field
v-model="icon1"
:label="$t('text')"
left-icon="smile-o"
right-icon="warning-o"
:placeholder="$t('showIcon')"
/>
<van-field
v-model="icon2"
clearable
:label="$t('text')"
left-icon="music-o"
:placeholder="$t('showClearIcon')"
/>
</van-cell-group>
<van-field
v-model="icon1"
:label="$t('text')"
left-icon="smile-o"
right-icon="warning-o"
:placeholder="$t('showIcon')"
/>
<van-field
v-model="icon2"
clearable
:label="$t('text')"
left-icon="music-o"
:placeholder="$t('showClearIcon')"
/>
</demo-block>
</template>
+10 -12
View File
@@ -1,17 +1,15 @@
<template>
<demo-block v-if="!isWeapp" :title="$t('showWordLimit')">
<van-cell-group>
<van-field
v-model="value"
autosize
show-word-limit
rows="2"
type="textarea"
maxlength="50"
:label="$t('message')"
:placeholder="$t('placeholder')"
/>
</van-cell-group>
<van-field
v-model="value"
autosize
show-word-limit
rows="2"
type="textarea"
maxlength="50"
:label="$t('message')"
:placeholder="$t('placeholder')"
/>
</demo-block>
</template>