feat(vapor): devtools support
This commit is contained in:
parent
bce7164bf0
commit
ce35a8c2e7
|
@ -1164,12 +1164,15 @@ function baseCreateRenderer(
|
||||||
|
|
||||||
if ((n2.type as ConcreteComponent).__vapor) {
|
if ((n2.type as ConcreteComponent).__vapor) {
|
||||||
if (n1 == null) {
|
if (n1 == null) {
|
||||||
getVaporInterface(parentComponent, n2).mount(
|
const instance = getVaporInterface(parentComponent, n2).mount(
|
||||||
n2,
|
n2,
|
||||||
container,
|
container,
|
||||||
anchor,
|
anchor,
|
||||||
parentComponent,
|
parentComponent,
|
||||||
)
|
)
|
||||||
|
if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
|
||||||
|
devtoolsComponentAdded(instance)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
getVaporInterface(parentComponent, n2).update(
|
getVaporInterface(parentComponent, n2).update(
|
||||||
n1,
|
n1,
|
||||||
|
@ -2190,6 +2193,9 @@ function baseCreateRenderer(
|
||||||
if (shapeFlag & ShapeFlags.COMPONENT) {
|
if (shapeFlag & ShapeFlags.COMPONENT) {
|
||||||
if ((type as ConcreteComponent).__vapor) {
|
if ((type as ConcreteComponent).__vapor) {
|
||||||
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove)
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove)
|
||||||
|
if (__DEV__ || __FEATURE_PROD_DEVTOOLS__) {
|
||||||
|
devtoolsComponentRemoved(vnode.component!)
|
||||||
|
}
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
unmountComponent(vnode.component!, parentSuspense, doRemove)
|
unmountComponent(vnode.component!, parentSuspense, doRemove)
|
||||||
|
|
Loading…
Reference in New Issue