mirror of https://github.com/vuejs/vue.git
types: add Fragment in RenderState typing (#7802)
This commit is contained in:
parent
882e7199fd
commit
35dc8c2555
|
|
@ -6,7 +6,12 @@ type RenderState = {
|
||||||
type: 'Element';
|
type: 'Element';
|
||||||
rendered: number;
|
rendered: number;
|
||||||
total: number;
|
total: number;
|
||||||
|
children: Array<VNode>;
|
||||||
endTag: string;
|
endTag: string;
|
||||||
|
} | {
|
||||||
|
type: 'Fragment';
|
||||||
|
rendered: number;
|
||||||
|
total: number;
|
||||||
children: Array<VNode>;
|
children: Array<VNode>;
|
||||||
} | {
|
} | {
|
||||||
type: 'Component';
|
type: 'Component';
|
||||||
|
|
@ -74,7 +79,7 @@ export class RenderContext {
|
||||||
this.renderNode(children[rendered], false, this)
|
this.renderNode(children[rendered], false, this)
|
||||||
} else {
|
} else {
|
||||||
this.renderStates.pop()
|
this.renderStates.pop()
|
||||||
if (lastState.endTag) {
|
if (lastState.type === 'Element') {
|
||||||
this.write(lastState.endTag, this.next)
|
this.write(lastState.endTag, this.next)
|
||||||
} else {
|
} else {
|
||||||
this.next()
|
this.next()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue