merge
This commit is contained in:
17
App.vue
17
App.vue
@@ -1,7 +1,19 @@
|
||||
<script>
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
if (typeof WeixinJSBridge == 'object' && typeof WeixinJSBridge.invoke == 'function') {
|
||||
handleFontSize();
|
||||
} else {
|
||||
document.addEventListener('WeixinJSBridgeReady', handleFontSize, false);
|
||||
}
|
||||
function handleFontSize() {
|
||||
// 设置网页字体为默认大小
|
||||
WeixinJSBridge.invoke('setFontSizeCallback', { fontSize: 0 });
|
||||
// 重写设置网页字体大小的事件
|
||||
WeixinJSBridge.on('menu:setfont', function() {
|
||||
WeixinJSBridge.invoke('setFontSizeCallback', { fontSize: 0 });
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
@@ -15,9 +27,10 @@
|
||||
<style>
|
||||
page{
|
||||
background: #F5F5F5;
|
||||
-webkit-text-size-adjust: 100% !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
@import "uview-ui/index.scss";
|
||||
@import "uview-ui/index.scss";
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user