如何设置导航栏自定义滑动功能?

更新于
2026-09-29 14:02:22
2阅读来源:SEO资源
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计117个文字,预计阅读时间需要1分钟。

如何设置导航栏自定义滑动功能?

wxml:

js: data: { latitude2: 22.817002, longitude2: 113.366543, map2: [{ latitude: 22.817002, longitude: 113.366543, title: '地址:XXXX' }] }, getMap2: function() { var height='200px'; if (height.indexOf('%') > -1) { var str=height.replace('%', ''); str=str / 1; } }

wxml

js

data: { latitude2: 22.817002, longitude2: 113.366543, map2: [{ latitude: 22.817002, longitude: 113.366543, title: '地址:XXXX' }] }, getMap2(){ var height = '200px'; if(height.indexOf("%")>0){ var str=height.replace("%",""); str= str/100; App.WxService.getSystemInfo().then(data => { this.setData({ mapHeight2: data.windowHeight*str+"px", }) }) }else{ this.setData({ mapHeight2: height, }) } }

如何设置导航栏自定义滑动功能?

本文共计117个文字,预计阅读时间需要1分钟。

如何设置导航栏自定义滑动功能?

wxml:

js: data: { latitude2: 22.817002, longitude2: 113.366543, map2: [{ latitude: 22.817002, longitude: 113.366543, title: '地址:XXXX' }] }, getMap2: function() { var height='200px'; if (height.indexOf('%') > -1) { var str=height.replace('%', ''); str=str / 1; } }

wxml

js

data: { latitude2: 22.817002, longitude2: 113.366543, map2: [{ latitude: 22.817002, longitude: 113.366543, title: '地址:XXXX' }] }, getMap2(){ var height = '200px'; if(height.indexOf("%")>0){ var str=height.replace("%",""); str= str/100; App.WxService.getSystemInfo().then(data => { this.setData({ mapHeight2: data.windowHeight*str+"px", }) }) }else{ this.setData({ mapHeight2: height, }) } }

如何设置导航栏自定义滑动功能?