Skip to content

Commit

Permalink
fix(vue): setScope ignore uni-app web components
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Jun 9, 2022
1 parent a6d2195 commit d0e4f5b
Show file tree
Hide file tree
Showing 12 changed files with 33 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6139,10 +6139,13 @@ function createPatchFunction (backend) {
}
}
// for slot content they should also get the scopeId from the host instance.
// ignore uni-app web components
if (isDef(i = activeInstance) &&
i !== vnode.context &&
i !== vnode.fnContext &&
isDef(i = i.$options._scopeId)
isDef(i = i.$options._scopeId) &&
// TODO use other flag
!activeInstance._vnode.elm.__uniDataset
) {
nodeOps.setStyleScope(vnode.elm, i);
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6171,10 +6171,13 @@ function createPatchFunction (backend) {
}
}
// for slot content they should also get the scopeId from the host instance.
// ignore uni-app web components
if (isDef(i = activeInstance) &&
i !== vnode.context &&
i !== vnode.fnContext &&
isDef(i = i.$options._scopeId)
isDef(i = i.$options._scopeId) &&
// TODO use other flag
!activeInstance._vnode.elm.__uniDataset
) {
nodeOps.setStyleScope(vnode.elm, i);
}
Expand Down

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6159,10 +6159,13 @@ function createPatchFunction (backend) {
}
}
// for slot content they should also get the scopeId from the host instance.
// ignore uni-app web components
if (isDef(i = activeInstance) &&
i !== vnode.context &&
i !== vnode.fnContext &&
isDef(i = i.$options._scopeId)
isDef(i = i.$options._scopeId) &&
// TODO use other flag
!activeInstance._vnode.elm.__uniDataset
) {
nodeOps.setStyleScope(vnode.elm, i);
}
Expand Down
5 changes: 4 additions & 1 deletion packages/vue-cli-plugin-uni/packages/h5-vue/dist/vue.js
Original file line number Diff line number Diff line change
Expand Up @@ -6143,10 +6143,13 @@
}
}
// for slot content they should also get the scopeId from the host instance.
// ignore uni-app web components
if (isDef(i = activeInstance) &&
i !== vnode.context &&
i !== vnode.fnContext &&
isDef(i = i.$options._scopeId)
isDef(i = i.$options._scopeId) &&
// TODO use other flag
!activeInstance._vnode.elm.__uniDataset
) {
nodeOps.setStyleScope(vnode.elm, i);
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6128,10 +6128,13 @@ function createPatchFunction (backend) {
}
}
// for slot content they should also get the scopeId from the host instance.
// ignore uni-app web components
if (isDef(i = activeInstance) &&
i !== vnode.context &&
i !== vnode.fnContext &&
isDef(i = i.$options._scopeId)
isDef(i = i.$options._scopeId) &&
// TODO use other flag
!activeInstance._vnode.elm.__uniDataset
) {
nodeOps.setStyleScope(vnode.elm, i);
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -6148,10 +6148,13 @@ function createPatchFunction (backend) {
}
}
// for slot content they should also get the scopeId from the host instance.
// ignore uni-app web components
if (isDef(i = activeInstance) &&
i !== vnode.context &&
i !== vnode.fnContext &&
isDef(i = i.$options._scopeId)
isDef(i = i.$options._scopeId) &&
// TODO use other flag
!activeInstance._vnode.elm.__uniDataset
) {
nodeOps.setStyleScope(vnode.elm, i);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6132,10 +6132,13 @@
}
}
// for slot content they should also get the scopeId from the host instance.
// ignore uni-app web components
if (isDef(i = activeInstance) &&
i !== vnode.context &&
i !== vnode.fnContext &&
isDef(i = i.$options._scopeId)
isDef(i = i.$options._scopeId) &&
// TODO use other flag
!activeInstance._vnode.elm.__uniDataset
) {
nodeOps.setStyleScope(vnode.elm, i);
}
Expand Down

Large diffs are not rendered by default.

0 comments on commit d0e4f5b

Please sign in to comment.