mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
41 lines
786 B
Vue
41 lines
786 B
Vue
<template>
|
|
<demo-section>
|
|
<demo-block :title="$t('basicUsage')">
|
|
<van-nav-bar
|
|
:title="$t('title')"
|
|
:left-text="$t('back')"
|
|
:right-text="$t('button')"
|
|
left-arrow
|
|
@click-left="onClickLeft"
|
|
@click-right="onClickRight"
|
|
/>
|
|
</demo-block>
|
|
|
|
<demo-block :title="$t('advancedUsage')">
|
|
<van-nav-bar
|
|
:title="$t('title')"
|
|
:left-text="$t('back')"
|
|
left-arrow
|
|
>
|
|
<van-icon
|
|
name="search"
|
|
slot="right"
|
|
/>
|
|
</van-nav-bar>
|
|
</demo-block>
|
|
</demo-section>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
methods: {
|
|
onClickLeft() {
|
|
this.$toast(this.$t('back'));
|
|
},
|
|
onClickRight() {
|
|
this.$toast(this.$t('button'));
|
|
}
|
|
}
|
|
};
|
|
</script>
|