mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 20:04:09 +00:00
[improvement] rename packages dir to src (#3659)
This commit is contained in:
39
src/nav-bar/demo/index.vue
Normal file
39
src/nav-bar/demo/index.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<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
|
||||
>
|
||||
<template #right>
|
||||
<van-icon name="search" />
|
||||
</template>
|
||||
</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>
|
Reference in New Issue
Block a user