123456789101112131415161718192021222324252627282930313233343536373839404142 |
- {extend name="public/base"/}
- {block name="css"}
- {/block}
- {block name="body"}
- <van-nav-bar
- class="nav-theme"
- :fixed="true"
- :placeholder="true"
- left-text="返回"
- left-arrow
- @click-left="onBack"
- >
- <template #title>
- <span class="text-white">首页</span>
- </template>
- </van-nav-bar>
- <van-tabbar v-model="active" @change="onTab" :placeholder="true">
- <van-tabbar-item icon="wap-home-o">首页</van-tabbar-item>
- <van-tabbar-item icon="description">文章</van-tabbar-item>
- <van-tabbar-item icon="user-circle-o">我的</van-tabbar-item>
- </van-tabbar>
- {/block}
- {block name="script"}
- <script>
- function v_setup() {
- let base = {};
- base.active = Vue.ref(0);
- base.onBack = () => {
- alert(1);
- }
- base.onTab = (index) => {
- alert(index)
- }
- return base;
- }
- </script>
- {/block}
|