lilei 4 лет назад
Родитель
Сommit
b0e87d1f8f
2 измененных файлов с 13 добавлено и 7 удалено
  1. 2 7
      pages.json
  2. 11 0
      pages/toDoList/toDoList.vue

+ 2 - 7
pages.json

@@ -245,15 +245,10 @@
 			"style": {
 				"navigationBarTitleText": "待办单",
 				"app-plus": {
-					"bounce": "none", //关闭窗口回弹效果
 					"titleNView": {
-						"buttons": [ //原生标题栏按钮配置,
+						"buttons": [
 							{
-								"text": "\ue610 新增", //原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听
-								"fontSize": 16,
-								"color": "#eee",
-								"width": "80px",
-								"fontSrc": "/static/iconfont/iconfont.ttf"
+								"text": ""
 							}
 						]
 					}

+ 11 - 0
pages/toDoList/toDoList.vue

@@ -145,6 +145,17 @@
 			}
 		},
 		onLoad() {
+			if(this.$hasPermissions("B_todoList_new_mobile")){
+				// 设置标题栏按钮
+				let currentWebview = this.$scope.$getAppWebview();
+				currentWebview.setTitleNViewButtonStyle(0, {
+					text: '\ue610 新增',
+					fontSize: 16,
+					color: '#eee',
+					width: '80px',
+					fontSrc: '/static/iconfont/iconfont.ttf'
+				});
+			}
 			uni.$on('refreshBL',this.refresh)
 			this.pageInit()
 		},