mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-20 21:49:14 +08:00
parent
ed834afc44
commit
e0335973c9
@ -65,7 +65,9 @@ VantComponent({
|
||||
|
||||
wx.nextTick(() => {
|
||||
getRect.call(this, '.van-nav-bar').then((res) => {
|
||||
this.setData({ height: res.height });
|
||||
if (res && 'height' in res) {
|
||||
this.setData({ height: res.height });
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -1,15 +1,11 @@
|
||||
/* eslint-disable */
|
||||
function barStyle(data) {
|
||||
var styles = [
|
||||
['z-index', data.zIndex],
|
||||
['padding-top', data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0],
|
||||
];
|
||||
var style = require('../wxs/style.wxs');
|
||||
|
||||
return styles
|
||||
.map(function (item) {
|
||||
return item.join(':');
|
||||
})
|
||||
.join(';');
|
||||
function barStyle(data) {
|
||||
return style({
|
||||
'z-index': data.zIndex,
|
||||
'padding-top': data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0,
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
@ -4,7 +4,7 @@ var object = require('./object.wxs');
|
||||
function style(styles) {
|
||||
return object.keys(styles)
|
||||
.filter(function (key) {
|
||||
return styles[key];
|
||||
return styles[key] != null;
|
||||
})
|
||||
.map(function (key) {
|
||||
return [key, [styles[key]]].join(':');
|
||||
|
Loading…
x
Reference in New Issue
Block a user