mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[Improvement] Reorganize demos (#1052)
This commit is contained in:
33
packages/nav-bar/demo/index.vue
Normal file
33
packages/nav-bar/demo/index.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<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() {
|
||||
Toast(this.$t('back'));
|
||||
},
|
||||
onClickRight() {
|
||||
Toast(this.$t('button'));
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Reference in New Issue
Block a user