mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-08 05:29:45 +08:00
docs(Field): remove unused CellGroup wrapper
This commit is contained in:
parent
65bdc75ca6
commit
de128b9719
@ -40,19 +40,19 @@ export default createComponent({
|
||||
},
|
||||
|
||||
faceAmount() {
|
||||
const { coupon } = this;
|
||||
const { coupon } = this.coupon;
|
||||
|
||||
if (coupon.valueDesc) {
|
||||
return `${coupon.valueDesc}<span>${coupon.unitDesc || ''}</span>`;
|
||||
}
|
||||
|
||||
if (coupon.denominations) {
|
||||
const denominations = formatAmount(this.coupon.denominations);
|
||||
const denominations = formatAmount(coupon.denominations);
|
||||
return `<span>${this.currency}</span> ${denominations}`;
|
||||
}
|
||||
|
||||
if (coupon.discount) {
|
||||
return t('discount', formatDiscount(this.coupon.discount));
|
||||
return t('discount', formatDiscount(coupon.discount));
|
||||
}
|
||||
|
||||
return '';
|
||||
@ -82,9 +82,9 @@ export default createComponent({
|
||||
<p class={bem('valid')}>{this.validPeriod}</p>
|
||||
{!this.disabled && (
|
||||
<Checkbox
|
||||
size={18}
|
||||
value={this.chosen}
|
||||
class={bem('corner')}
|
||||
size={18}
|
||||
checkedColor={RED}
|
||||
/>
|
||||
)}
|
||||
|
@ -20,7 +20,7 @@ Vue.use(Field);
|
||||
可以通过`v-model`双向绑定输入框的值,通过`placeholder`设置占位提示文字
|
||||
|
||||
```html
|
||||
<!-- Field 是基于 Cell 实现的,可以使用 CellGroup 作为父元素来提供外边框。 -->
|
||||
<!-- Field 是基于 Cell 实现的,可以使用 CellGroup 作为容器来提供外边框。 -->
|
||||
<van-cell-group>
|
||||
<van-field v-model="value" placeholder="请输入用户名" />
|
||||
</van-cell-group>
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<demo-block :title="$t('autosize')">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="value"
|
||||
autosize
|
||||
@ -9,7 +8,6 @@
|
||||
:label="$t('message')"
|
||||
:placeholder="$t('placeholder')"
|
||||
/>
|
||||
</van-cell-group>
|
||||
</demo-block>
|
||||
</template>
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<demo-block :title="$t('customType')">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="text"
|
||||
:label="$t('text')"
|
||||
@ -30,7 +29,6 @@
|
||||
:label="$t('password')"
|
||||
:placeholder="$t('passwordPlaceholder')"
|
||||
/>
|
||||
</van-cell-group>
|
||||
</demo-block>
|
||||
</template>
|
||||
|
||||
|
@ -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>
|
||||
</demo-block>
|
||||
</template>
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<demo-block :title="$t('errorInfo')">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="username"
|
||||
error
|
||||
@ -15,7 +14,6 @@
|
||||
:placeholder="$t('phonePlaceholder')"
|
||||
:error-message="$t('phoneError')"
|
||||
/>
|
||||
</van-cell-group>
|
||||
</demo-block>
|
||||
</template>
|
||||
|
||||
|
@ -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>
|
||||
</demo-block>
|
||||
</template>
|
||||
|
||||
|
@ -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>
|
||||
</demo-block>
|
||||
</template>
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<demo-block :title="$t('insertButton')">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="sms"
|
||||
center
|
||||
@ -14,7 +13,6 @@
|
||||
</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</demo-block>
|
||||
</template>
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<demo-block :title="$t('showIcon')">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="icon1"
|
||||
:label="$t('text')"
|
||||
@ -15,7 +14,6 @@
|
||||
left-icon="music-o"
|
||||
:placeholder="$t('showClearIcon')"
|
||||
/>
|
||||
</van-cell-group>
|
||||
</demo-block>
|
||||
</template>
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<demo-block v-if="!isWeapp" :title="$t('showWordLimit')">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="value"
|
||||
autosize
|
||||
@ -11,7 +10,6 @@
|
||||
:label="$t('message')"
|
||||
:placeholder="$t('placeholder')"
|
||||
/>
|
||||
</van-cell-group>
|
||||
</demo-block>
|
||||
</template>
|
||||
|
||||
|
@ -12,7 +12,6 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"><span>文本</span></div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -44,9 +43,7 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"><span>文本</span></div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -60,9 +57,7 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-field__left-icon"><i class="van-icon van-icon-smile-o">
|
||||
<!----></i></div>
|
||||
@ -83,9 +78,7 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell van-cell--required van-field van-field--error">
|
||||
<div class="van-cell__title van-field__label"><span>用户名</span></div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -100,9 +93,7 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell van-cell--center van-field">
|
||||
<div class="van-cell__title van-field__label"><span>短信验证码</span></div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -114,9 +105,7 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"><span>文本</span></div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -124,9 +113,7 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"><span>留言</span></div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -134,9 +121,7 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"><span>留言</span></div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -145,9 +130,7 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-cell-group van-hairline--top-bottom">
|
||||
<div class="van-cell van-field">
|
||||
<div class="van-cell__title van-field__label"><span>文本</span></div>
|
||||
<div class="van-cell__value van-field__value">
|
||||
@ -156,5 +139,4 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user