1、状态栏的问题
<!-- 这里是状态栏 -->
<view class="status_bar"></view>
<view class="topBar"></view>
/* 固定定位 */
.status_bar{
height: var(--status-bar-height);
width: 100%;
}
.topBar{
position: fixed;
top: 0;
left: 0;
width: 100%;
height:var(--status-bar-height);
background-color: #FFFFFF;
z-index: 99;
}
//顶部导航栏的class top
.top {
position: fixed;
top: var(--status-bar-height);
left: 0;
z-index: 99;
/* width: 670rpx; */
width:100%;
height: 98rpx;
color: #282828;
font-size: 36rpx;
font-weight:bold;
text-align: center;
line-height: 98rpx;
padding:0 40rpx;
background-color: #FFFFFF;
}
2、页面宽度的问题
不知是怎么回事,原文中的宽度是没问题的,而我只在android手机上运行,宽度就总不对。
设宽度不一样,但可以居中显示,这样的宽度就看不出来了
有个postion属性设置fixed,当使用:top: 50%;left: 50%;, 是以左上角为原点,故不处于中心位置 translate(-50%,-50%) 作用是,往上(x轴),左(y轴)移动自身长宽的 50%,以使其居于中心位置。
3、折叠面板的插件中的插槽slot,有点不明白下载的折叠面板中的slot
默认中的内容是默认的内容,一旦父组件的内容传过来就会替换原有的内容
4、picker需要好好练习下
5、uni.getSystemInfoSync()和uni.getSystemInfo(OBJECT)有什么区别,都什么场景中用啊?
6、props 的用法和注意事项
7、uniapp封装共有的方法需要注意的事项
8、分享uni.share的注意事项
比如qq分享与微信分享的不同
qq需要辨别手机设备是android和ios
qq需要先uni.downloadFile()
9、保存图片到本地
uni.getImageInfo({
src:_that.url,
success: function (image) {
console.log(image.path,)
uni.saveImageToPhotosAlbum({
filePath: _that.url,
success: function () {
uni.showToast({
title:'保存成功' ,
duration: 2000,
icon:'none'
});
}
});
}
});
10、分享到qq
uni.downloadFile({
url: _that.url, //仅为示例,并非真实的资源
success: (res) => {
if (res.statusCode === 200) {
console.log(res.tempFilePath);
uni.share({
provider: 'qq',
type: 2,
imageUrl: res.tempFilePath,
success: function (res) {
console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
console.log("fail:" + JSON.stringify(err));
}
});
}
}
});
11、分享到微信
uni.share({
provider: "weixin",
scene: "WXSceneSession",
type: 2,
imageUrl: _that.url,
success: function (res) {
// console.log("success:" + JSON.stringify(res));
},
fail: function (err) {
// console.log("fail:" + JSON.stringify(err));
}
});
12、三个点的扩展符需要再次了解下
13、import与@import的区别
首先语法不一样:import是ES6语法,意为引进模块的意思,而@import是stylus的语法;
其次,@import是在
onPageScroll(e) {
if(e.scrollTop >= 163){
this.tabFlag=true
e.scrollTop=163
}else{
this.tabFlag=false
}
},
16、uniapp的picker和w-picker空件的比较和研究
17、支付功能,再未打包前是微信不能够支付的,打包之后就可以支付了,这是什么情况啊