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(() => {
|
wx.nextTick(() => {
|
||||||
getRect.call(this, '.van-nav-bar').then((res) => {
|
getRect.call(this, '.van-nav-bar').then((res) => {
|
||||||
|
if (res && 'height' in res) {
|
||||||
this.setData({ height: res.height });
|
this.setData({ height: res.height });
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,15 +1,11 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
function barStyle(data) {
|
var style = require('../wxs/style.wxs');
|
||||||
var styles = [
|
|
||||||
['z-index', data.zIndex],
|
|
||||||
['padding-top', data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0],
|
|
||||||
];
|
|
||||||
|
|
||||||
return styles
|
function barStyle(data) {
|
||||||
.map(function (item) {
|
return style({
|
||||||
return item.join(':');
|
'z-index': data.zIndex,
|
||||||
})
|
'padding-top': data.safeAreaInsetTop ? data.statusBarHeight + 'px' : 0,
|
||||||
.join(';');
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
@ -4,7 +4,7 @@ var object = require('./object.wxs');
|
|||||||
function style(styles) {
|
function style(styles) {
|
||||||
return object.keys(styles)
|
return object.keys(styles)
|
||||||
.filter(function (key) {
|
.filter(function (key) {
|
||||||
return styles[key];
|
return styles[key] != null;
|
||||||
})
|
})
|
||||||
.map(function (key) {
|
.map(function (key) {
|
||||||
return [key, [styles[key]]].join(':');
|
return [key, [styles[key]]].join(':');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user