<template> <div id="app"> <keep-alive> <router-view v-if="this.$route.meta.keepAlive" /> </keep-alive> <router-view v-if="!this.$route.meta.keepAlive" /> </div> </template> <script> export default { mounted () { ZWJSBridge.onReady(() => { console.log('初始化完成后,执行bridge方法') }) }, methods: { } } </script> <style> html, body, #app { height: 100%; color: #333333; font-size: 0; } p { margin: 0; } </style>