mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 19:24:16 +00:00
docs: simplify $t to t
This commit is contained in:
@@ -1,40 +1,40 @@
|
||||
<template>
|
||||
<demo-section>
|
||||
<demo-block :title="$t('basicUsage')">
|
||||
<demo-block :title="t('basicUsage')">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item v-model="value2" :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('customContent')">
|
||||
<demo-block :title="t('customContent')">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item :title="$t('itemTitle')" ref="item">
|
||||
<van-switch-cell v-model="switch1" :title="$t('switchTitle1')" />
|
||||
<van-switch-cell v-model="switch2" :title="$t('switchTitle2')" />
|
||||
<van-dropdown-item :title="t('itemTitle')" ref="item">
|
||||
<van-switch-cell v-model="switch1" :title="t('switchTitle1')" />
|
||||
<van-switch-cell v-model="switch2" :title="t('switchTitle2')" />
|
||||
<van-button type="info" block @click="onConfirm">
|
||||
{{ $t('confirm') }}
|
||||
{{ t('confirm') }}
|
||||
</van-button>
|
||||
</van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('customActiveColor')">
|
||||
<demo-block :title="t('customActiveColor')">
|
||||
<van-dropdown-menu active-color="#ee0a24">
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item v-model="value2" :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('expandDirection')">
|
||||
<demo-block :title="t('expandDirection')">
|
||||
<van-dropdown-menu direction="up">
|
||||
<van-dropdown-item v-model="value1" :options="option1" />
|
||||
<van-dropdown-item v-model="value2" :options="option2" />
|
||||
</van-dropdown-menu>
|
||||
</demo-block>
|
||||
|
||||
<demo-block :title="$t('disableMenu')">
|
||||
<demo-block :title="t('disableMenu')">
|
||||
<van-dropdown-menu>
|
||||
<van-dropdown-item v-model="value1" disabled :options="option1" />
|
||||
<van-dropdown-item v-model="value2" disabled :options="option2" />
|
||||
@@ -97,11 +97,11 @@ export default {
|
||||
|
||||
computed: {
|
||||
option1() {
|
||||
return this.$t('option1');
|
||||
return this.t('option1');
|
||||
},
|
||||
|
||||
option2() {
|
||||
return this.$t('option2');
|
||||
return this.t('option2');
|
||||
},
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user