docs: update vant-weapp demo

This commit is contained in:
chenjiahan 2020-03-21 07:11:42 +08:00
parent 6343928da0
commit a8c671ecfd
9 changed files with 10 additions and 10 deletions

View File

@ -58,7 +58,7 @@
<van-button type="primary" block>{{ $t('blockElement') }}</van-button> <van-button type="primary" block>{{ $t('blockElement') }}</van-button>
</demo-block> </demo-block>
<demo-block :title="$t('router')"> <demo-block v-if="!isWeapp" :title="$t('router')">
<van-button <van-button
:text="$t('urlRoute')" :text="$t('urlRoute')"
type="primary" type="primary"

View File

@ -48,7 +48,7 @@ export default {
### 自定义颜色 ### 自定义颜色
通过`checked-color`属性可以自定义选中状态下的图标颜色 通过`checked-color`属性设置选中状态的图标颜色
```html ```html
<van-checkbox v-model="checked" checked-color="#07c160">复选框</van-checkbox> <van-checkbox v-model="checked" checked-color="#07c160">复选框</van-checkbox>

View File

@ -53,7 +53,7 @@
</van-checkbox-group> </van-checkbox-group>
</demo-block> </demo-block>
<demo-block :title="$t('horizontal')"> <demo-block v-if="!isWeapp" :title="$t('horizontal')">
<van-checkbox-group v-model="horizontalResult" direction="horizontal"> <van-checkbox-group v-model="horizontalResult" direction="horizontal">
<van-checkbox name="a">{{ $t('checkbox') }} a</van-checkbox> <van-checkbox name="a">{{ $t('checkbox') }} a</van-checkbox>
<van-checkbox name="b">{{ $t('checkbox') }} b</van-checkbox> <van-checkbox name="b">{{ $t('checkbox') }} b</van-checkbox>

View File

@ -32,7 +32,7 @@
/> />
</demo-block> </demo-block>
<demo-block :title="$t('cascade')"> <demo-block v-if="!isWeapp" :title="$t('cascade')">
<van-picker <van-picker
show-toolbar show-toolbar
:title="$t('title')" :title="$t('title')"
@ -54,7 +54,7 @@
<van-picker loading :columns="columns" /> <van-picker loading :columns="columns" />
</demo-block> </demo-block>
<demo-block :title="$t('withPopup')"> <demo-block v-if="!isWeapp" :title="$t('withPopup')">
<van-field <van-field
readonly readonly
clickable clickable

View File

@ -57,7 +57,7 @@ export default {
### 自定义形状 ### 自定义形状
通过`square`属性设置选中状态的图标颜色 `shape`属性设置为`square`,单选框的形状会变成方形
```html ```html
<van-radio-group v-model="radio"> <van-radio-group v-model="radio">

View File

@ -40,7 +40,7 @@
<van-rate v-model="value6" readonly /> <van-rate v-model="value6" readonly />
</demo-block> </demo-block>
<demo-block :title="$t('changeEvent')"> <demo-block v-if="!isWeapp" :title="$t('changeEvent')">
<van-rate v-model="value7" @change="onChange" /> <van-rate v-model="value7" @change="onChange" />
</demo-block> </demo-block>
</demo-section> </demo-section>

View File

@ -102,8 +102,8 @@ Use `action` slot to custom right button, `cancel` event will no longer be trigg
<van-search <van-search
v-model="value" v-model="value"
show-action show-action
shape="round"
label="Address" label="Address"
placeholder="Placeholder"
@search="onSearch" @search="onSearch"
> >
<template #action> <template #action>

View File

@ -102,8 +102,8 @@ export default {
<van-search <van-search
v-model="value" v-model="value"
show-action show-action
placeholder="请输入搜索关键词"
label="地址" label="地址"
placeholder="请输入搜索关键词"
@search="onSearch" @search="onSearch"
> >
<template #action> <template #action>

View File

@ -40,9 +40,9 @@
<demo-block :title="$t('customButton')"> <demo-block :title="$t('customButton')">
<van-search <van-search
v-model="value6" v-model="value6"
:placeholder="$t('placeholder')"
show-action show-action
:label="$t('label')" :label="$t('label')"
:placeholder="$t('placeholder')"
@search="onSearch" @search="onSearch"
> >
<template #action> <template #action>