diff --git a/index.js b/index.js index 958716d..7410129 100644 --- a/index.js +++ b/index.js @@ -25,14 +25,15 @@ module.exports = { // 快速输出详尽提示,可用来取代 console.log clog(...message) { console.log( - '【【【【【【【【【【', + '【', getCurrentPages().length > 0 ? getCurrentPages().pop().route : 'pages/Welcome', // 在首页时,getApp() 或 getCurrentPages() 有可能获取不到。 + '【', ...message, - '】】】】】】】】】】】' + '】】' ) }, - thisPage(){ + thisPage() { return getCurrentPages()[getCurrentPages().length - 1] // 准备挂在到 window 下使用,因此不必探测 this.$store 了,肯定不存在。 },