Skip to content

Commit

Permalink
fix(mp): mp-alipay (Component=>my.createComponent v1.13.x)
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed Apr 24, 2019
1 parent 39f98c7 commit 8c2cdc5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/uni-mp-alipay/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ function initComponent (componentOptions, vueOptions) {
delete componentOptions.lifetimes;
delete componentOptions.pageLifetimes;

return Component(componentOptions)
return my.createComponent(componentOptions)
}

function initBehavior ({
Expand Down Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion src/platforms/mp-alipay/runtime/wrapper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ({
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8c2cdc5

Please sign in to comment.