Blame view

pages/template/nav-button/nav-button.vue 802 Bytes
4b045f7c   刘淇   江阴初始化项目
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
  <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>