refactor: portal should not expect ref target
This commit is contained in:
parent
1a361e2e71
commit
957d3a0547
@ -39,7 +39,7 @@ describe('renderer: portal', () => {
|
|||||||
|
|
||||||
const Comp = createComponent(() => () =>
|
const Comp = createComponent(() => () =>
|
||||||
h(Fragment, [
|
h(Fragment, [
|
||||||
h(Portal, { target }, h('div', 'teleported')),
|
h(Portal, { target: target.value }, h('div', 'teleported')),
|
||||||
h('div', 'root')
|
h('div', 'root')
|
||||||
])
|
])
|
||||||
)
|
)
|
||||||
|
@ -680,11 +680,7 @@ export function createRenderer<
|
|||||||
isSVG: boolean,
|
isSVG: boolean,
|
||||||
optimized: boolean
|
optimized: boolean
|
||||||
) {
|
) {
|
||||||
let targetSelector = n2.props && n2.props.target
|
const targetSelector = n2.props && n2.props.target
|
||||||
if (isRef(targetSelector)) {
|
|
||||||
targetSelector = targetSelector.value
|
|
||||||
}
|
|
||||||
|
|
||||||
const { patchFlag, shapeFlag, children } = n2
|
const { patchFlag, shapeFlag, children } = n2
|
||||||
if (n1 == null) {
|
if (n1 == null) {
|
||||||
const target = (n2.target = isString(targetSelector)
|
const target = (n2.target = isString(targetSelector)
|
||||||
|
Loading…
Reference in New Issue
Block a user