From 8c2cdc58fa9632eea2783d4b355fbc9eb0a77dd9 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Wed, 24 Apr 2019 17:29:29 +0800 Subject: [PATCH] fix(mp): mp-alipay (Component=>my.createComponent v1.13.x) --- packages/uni-mp-alipay/dist/index.js | 6 +++++- src/platforms/mp-alipay/runtime/wrapper/index.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/uni-mp-alipay/dist/index.js b/packages/uni-mp-alipay/dist/index.js index 274ee1af1..71801f6ae 100644 --- a/packages/uni-mp-alipay/dist/index.js +++ b/packages/uni-mp-alipay/dist/index.js @@ -879,7 +879,7 @@ function initComponent (componentOptions, vueOptions) { delete componentOptions.lifetimes; delete componentOptions.pageLifetimes; - return Component(componentOptions) + return my.createComponent(componentOptions) } function initBehavior ({ @@ -907,6 +907,10 @@ function handleLink (detail) { if (detail.$parent) { detail.$parent.$children.push(detail); detail.$root = this.$vm.$root; + + if (!my.canIUse('component2')) { + handleRef.call(this, detail.$scope); + } } } } else { // vueOptions diff --git a/src/platforms/mp-alipay/runtime/wrapper/index.js b/src/platforms/mp-alipay/runtime/wrapper/index.js index ed756cd74..d73e749f8 100644 --- a/src/platforms/mp-alipay/runtime/wrapper/index.js +++ b/src/platforms/mp-alipay/runtime/wrapper/index.js @@ -153,7 +153,7 @@ export function initComponent (componentOptions, vueOptions) { delete componentOptions.lifetimes delete componentOptions.pageLifetimes - return Component(componentOptions) + return my.createComponent(componentOptions) } export function initBehavior ({ @@ -181,6 +181,10 @@ export function handleLink (detail) { if (detail.$parent) { detail.$parent.$children.push(detail) detail.$root = this.$vm.$root + + if (!my.canIUse('component2')) { + handleRef.call(this, detail.$scope) + } } } } else { // vueOptions -- GitLab