提交 2e671e79 编写于 作者: fxy060608's avatar fxy060608

feat(mp-toutiao): add route (getCurrentPages)

上级 1a9966d1
......@@ -1192,12 +1192,20 @@ function handleLink$1 ({
vm.__call_hook('onReady');
}
function parseApp (vm) {
function parseApp (vm) {
Vue.prototype._$fallback = true; // 降级(调整原 vue 的部分生命周期,如 created,beforeMount,inject,provide)
Vue.mixin({
created () { // 处理 injections,头条 triggerEvent 是异步,且触发时机很慢,故延迟 relation 设置
if (this.mpType !== 'app') {
if (
this.mpType === 'page' &&
!this.$scope.route &&
this.$scope.__route__
) {
this.$scope.route = this.$scope.__route__;
}
initRefs$1(this);
this.__init_injections(this);
......
{
"name": "@dcloudio/uni-mp-toutiao",
"version": "0.0.339",
"version": "0.0.340",
"description": "uni-app mp-toutiao",
"main": "dist/index.js",
"scripts": {
......
......@@ -7,12 +7,20 @@ import {
initRefs
} from './util'
export default function parseApp (vm) {
export default function parseApp (vm) {
Vue.prototype._$fallback = true // 降级(调整原 vue 的部分生命周期,如 created,beforeMount,inject,provide)
Vue.mixin({
created () { // 处理 injections,头条 triggerEvent 是异步,且触发时机很慢,故延迟 relation 设置
if (this.mpType !== 'app') {
if (
this.mpType === 'page' &&
!this.$scope.route &&
this.$scope.__route__
) {
this.$scope.route = this.$scope.__route__
}
initRefs(this)
this.__init_injections(this)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册