1***@qq.com
1***@qq.com
  • 发布:2019-11-18 15:42
  • 更新:2020-12-14 14:08
  • 阅读:3924

uniapp如何动态设置原生导航栏中搜索框的placeholder值

分类:uni-app
2019-11-18 15:42 负责人:无 分享
已邀请:
陈晨1

陈晨1

你可以使用uni-ui的nav-bar组件,里面可以使用input标签

k***@163.com

k***@163.com

let text="hello"
let webView =this.$mp.page.$getAppWebview();
webView.setTitleNViewSearchInputText("text");

1***@qq.com

1***@qq.com

// 修改搜索占位
// #ifdef APP-PLUS
let currentWebview = this.$mp.page.$getAppWebview()
let tn = currentWebview.getStyle().titleNView
tn.searchInput.placeholder = '搜索' + pageTitle
currentWebview.setStyle({
titleNView: tn
})
// #endif

1***@163.com

1***@163.com - 啊啊啊

H5 的怎么改变啊

该问题目前已经被锁定, 无法添加新回复