帖子
帖子
用户
博客
课程
显示全部楼层
3
帖子
2
勋章
2万+
Y币

[插件使用] opentablayout,底部导航栏上移

[复制链接]
发表于 2023-3-20 23:28:49
使用opentablayout,input弹出输入框,底部导航栏上移。如何将它固定在底部
您好,可以这样操作一下

监听键盘弹起来 隐藏导航栏
3
帖子
2
勋章
2万+
Y币
技术咨询-特特 · 2023-3-21 10:02您好,可以这样操作一下

监听键盘弹起来 隐藏导航栏
  1. api.openTabLayout({
  2.         name: "tabLayout",
  3.         url: "widget://html/home.html",
  4.         hideTabBar: false,
  5.         tabBar: {
  6.             height: 50,
  7.             selectedColor: "#1296db",
  8.             shadow: "#B6B6B6",
  9.             fontSize: 12,
  10.             textOffset: 6,
  11.             scrollEnabled: false,
  12.             preload: 1,
  13.             list: [
  14.                 {
  15.                     text: "首页",
  16.                     iconPath: "widget://image/icon/home.png",
  17.                     selectedIconPath: "widget://image/icon/home_selected.png",
  18.                 },
  19.                 {
  20.                     text: "我的",
  21.                     iconPath: "widget://image/icon/my.png",
  22.                     selectedIconPath: "widget://image/icon/my_selected.png",
  23.                 },
  24.             ],
  25.             frames: [
  26.                 {
  27.                     name: "home_default",
  28.                     url: "widget://html/home.html",
  29.                 },
  30.                 {
  31.                     name: "my",
  32.                     url: "widget://html/my.html",
  33.                 },
  34.             ],
  35.         },
  36.     });
复制代码


它是直接将底部导航栏抬起来了,例如我用opentablayout打开了两个页面,底部有个导航栏,高度为50px。在首页中有个弹框,上面有个input,键盘弹出时直接把底部的导航栏顶起来了。影藏导航栏也只是把icon和文字影藏掉了,高度依然存在。
380
帖子
4
勋章
6
Y币
<preference name="softInputMode" value="pan"/>    config.xml配置此项,提交代码,云编译测试看看。
您需要登录后才可以回帖 登录

本版积分规则