# 搜索页开发(上)

page.json

			"path": "pages/search/search",
			"style": {
				"app-plus": {
					// 隐藏滚动条
					"scrollIndicator": "none",
					"bounce": "none", // 关闭返弹效果
					"titleNView": {
						"autoBackButton": false, //隐藏返回图标
						// 搜索框的配置
						"searchInput": {
							"align": "center",
							"backgroundColor": "#f7f7f7",
							"borderRadius": "4px",
							"placeholder": "搜索",
							"placeholderColor": "#ccc",
							"disabled": false
						},
						// button按钮
						"buttons": [
							// 右边
							{
								"color": "#333",
								"colorPressed": "#BBBBBB",
								"float": "right",
								"fontSize": "16px",
								"text": "取消"
							}
						]
					}
				}
			}
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

seach.vue

		// 监听原生标题导航按钮点击事件
		onNavigationBarButtonTap(e) {
			if (e.index === 0) {
				uni.navigateBack({
					delta: 1
				})
			}
		}
1
2
3
4
5
6
7
8
上次更新: 2021/2/22 上午10:53:04