11.27 工作笔记
@longpress 长按屏幕事件
uniapp隐藏默认按钮
APP端 autoBackButton
{
"path" : "pages/gopay/gopay",
"style" : {
"autoBackButton": false,//隐藏默认的返回按钮
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
H5端
mounted() {
document.querySelector('.uni-page-head-hd').style.display = 'none'
},
uniapp返回上一级页面
uni.navigateBack({
delta:1
})
enablePullDownRefresh
开启后可监听用户下拉刷新事件
{
"path": "pages/medicine/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false
},
"h5": {
"titleNView": false
}
}
},
window.location.hash
获取地址栏参数 http://localhost:8080/#/pages/medicine/index
let url = window.location.hash
console.log("地址栏参数",url)// 地址栏参数 #/pages/medicine/index
改变地址栏,跳转至页面
window.location.href = '#/pages/medicine/index'
iframe
html中的一个标签,标签可以当video标签使用,播放视频,也可以引入一个网页地址,直接显示这个网页