greenPro/pages/template/nav-button/nav-button.vue

33 lines
802 B
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view>
<page-head :title="title"></page-head>
<view class="uni-padding-wrap uni-common-mt">
<view class="uni-title">
<uni-icons size="16" type="info"></uni-icons> : </view>
<view class="uni-helllo-text">
<view>在App端可在pages.json里配置buttons暂不支持动态改变buttons的样式使用onNavigationBarButtonTap可监听buttons的点击事件</view>
<view>在小程序端不支持配置buttons故按钮不见了</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'nav-button'
}
},
onNavigationBarButtonTap(e) {
uni.showToast({
title: e.index === 0 ? "你点了分享按钮" : "你点了收藏按钮",
icon: "none"
})
}
}
</script>
<style>
</style>