From 6f9ecd5220cd5afacaaa087c5357dcf9d1d75264 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Tue, 19 Nov 2019 10:49:16 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=BF=AE=E6=94=B9=E7=99=BE=E5=BA=A6?= =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=94=9F=E5=91=BD=E5=91=A8=E6=9C=9F?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/platforms/mp-baidu/runtime/wrapper/component-parser.js | 4 ++-- src/platforms/mp-baidu/runtime/wrapper/page-parser.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platforms/mp-baidu/runtime/wrapper/component-parser.js b/src/platforms/mp-baidu/runtime/wrapper/component-parser.js index b7a692a8..d415a9c7 100644 --- a/src/platforms/mp-baidu/runtime/wrapper/component-parser.js +++ b/src/platforms/mp-baidu/runtime/wrapper/component-parser.js @@ -17,9 +17,9 @@ export default function parseComponent (vueOptions) { initRelation }) - // 关于百度小程序新生命周期(2.0)的说明(组件作为页面时): + // 关于百度小程序生命周期的说明(组件作为页面时): // lifetimes:attached --> methods:onShow --> methods:onLoad --> methods:onReady - // 这里在新生命周期强制将onShow挪到onLoad之后触发,另外一处修改在page-parser.js + // 这里在强制将onShow挪到onLoad之后触发,另外一处修改在page-parser.js const oldAttached = componentOptions.lifetimes.attached componentOptions.lifetimes.attached = function attached () { oldAttached.call(this) diff --git a/src/platforms/mp-baidu/runtime/wrapper/page-parser.js b/src/platforms/mp-baidu/runtime/wrapper/page-parser.js index 0425f321..fe275ec5 100644 --- a/src/platforms/mp-baidu/runtime/wrapper/page-parser.js +++ b/src/platforms/mp-baidu/runtime/wrapper/page-parser.js @@ -25,7 +25,7 @@ export default function parsePage (vuePageOptions) { initRelation }) - // 纠正百度小程序新生命周期(2.0)methods:onShow在methods:onLoad之前触发的问题 + // 纠正百度小程序生命周期methods:onShow在methods:onLoad之前触发的问题 pageOptions.methods.onShow = function onShow () { if (this.$vm && this.$vm.$mp.query) { this.$vm.__call_hook('onShow') -- GitLab