Commit 64857295 by 展昭

parseInt(barHeight);

parent c8e40d92
const setBarHeight = {
mounted() {
const barHeight = localStorage.getItem('barHeight');
const conHeight = 46 + barHeight;
const conHeight = 46 + parseInt(barHeight);
console.log('mixins barHeight=', barHeight);
// const dom = document.getElementsByClassName("iosStyle")[0];
// if (dom) {
// dom.setAttribute("style", "padding-top:" + barHeight + "px !important");
// }
const dom = document.getElementsByClassName("iosStyle")[0];
if (dom) {
dom.setAttribute("style", "padding-top:" + barHeight + "px !important");
}
// const dom2 = document.getElementsByClassName("container")[0];
// if (dom2) {
// dom2.setAttribute("style", "padding-top:" + conHeight + "px !important");
// }
const dom2 = document.getElementsByClassName("container")[0];
if (dom2) {
dom2.setAttribute("style", "padding-top:" + conHeight + "px !important");
}
}
}
......
......@@ -115,7 +115,7 @@ export default {
},
setBarHeight() {
const barHeight = localStorage.getItem("barHeight");
const conHeight = 46 + barHeight;
const conHeight = 46 + parseInt(barHeight);
console.log("setBarHeight conHeight=", conHeight);
const dom = document.getElementsByClassName("iosStyle")[0];
if (dom) {
......@@ -123,7 +123,6 @@ export default {
}
const dom2 = document.getElementsByClassName("temp-container")[0];
console.log("dom2=", dom2);
if (dom2) {
dom2.setAttribute("style","padding-top:" + conHeight + "px !important"
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment