提交 8c2cdc58 编写于 作者: fxy060608's avatar fxy060608

fix(mp): mp-alipay (Component=>my.createComponent v1.13.x)

上级 39f98c73
...@@ -879,7 +879,7 @@ function initComponent (componentOptions, vueOptions) { ...@@ -879,7 +879,7 @@ function initComponent (componentOptions, vueOptions) {
delete componentOptions.lifetimes; delete componentOptions.lifetimes;
delete componentOptions.pageLifetimes; delete componentOptions.pageLifetimes;
return Component(componentOptions) return my.createComponent(componentOptions)
} }
function initBehavior ({ function initBehavior ({
...@@ -907,6 +907,10 @@ function handleLink (detail) { ...@@ -907,6 +907,10 @@ function handleLink (detail) {
if (detail.$parent) { if (detail.$parent) {
detail.$parent.$children.push(detail); detail.$parent.$children.push(detail);
detail.$root = this.$vm.$root; detail.$root = this.$vm.$root;
if (!my.canIUse('component2')) {
handleRef.call(this, detail.$scope);
}
} }
} }
} else { // vueOptions } else { // vueOptions
......
...@@ -153,7 +153,7 @@ export function initComponent (componentOptions, vueOptions) { ...@@ -153,7 +153,7 @@ export function initComponent (componentOptions, vueOptions) {
delete componentOptions.lifetimes delete componentOptions.lifetimes
delete componentOptions.pageLifetimes delete componentOptions.pageLifetimes
return Component(componentOptions) return my.createComponent(componentOptions)
} }
export function initBehavior ({ export function initBehavior ({
...@@ -181,6 +181,10 @@ export function handleLink (detail) { ...@@ -181,6 +181,10 @@ export function handleLink (detail) {
if (detail.$parent) { if (detail.$parent) {
detail.$parent.$children.push(detail) detail.$parent.$children.push(detail)
detail.$root = this.$vm.$root detail.$root = this.$vm.$root
if (!my.canIUse('component2')) {
handleRef.call(this, detail.$scope)
}
} }
} }
} else { // vueOptions } else { // vueOptions
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册