nav tabs on admin dashboard
This commit is contained in:
92
node_modules/vue/src/server/render-context.js
generated
vendored
92
node_modules/vue/src/server/render-context.js
generated
vendored
@@ -66,54 +66,54 @@ export class RenderContext {
|
||||
}
|
||||
|
||||
next () {
|
||||
const lastState = this.renderStates[this.renderStates.length - 1]
|
||||
if (isUndef(lastState)) {
|
||||
return this.done()
|
||||
}
|
||||
switch (lastState.type) {
|
||||
case 'Element':
|
||||
case 'Fragment':
|
||||
const { children, total } = lastState
|
||||
const rendered = lastState.rendered++
|
||||
if (rendered < total) {
|
||||
this.renderNode(children[rendered], false, this)
|
||||
} else {
|
||||
this.renderStates.pop()
|
||||
if (lastState.type === 'Element') {
|
||||
this.write(lastState.endTag, this.next)
|
||||
// eslint-disable-next-line
|
||||
while (true) {
|
||||
const lastState = this.renderStates[this.renderStates.length - 1]
|
||||
if (isUndef(lastState)) {
|
||||
return this.done()
|
||||
}
|
||||
/* eslint-disable no-case-declarations */
|
||||
switch (lastState.type) {
|
||||
case 'Element':
|
||||
case 'Fragment':
|
||||
const { children, total } = lastState
|
||||
const rendered = lastState.rendered++
|
||||
if (rendered < total) {
|
||||
return this.renderNode(children[rendered], false, this)
|
||||
} else {
|
||||
this.next()
|
||||
this.renderStates.pop()
|
||||
if (lastState.type === 'Element') {
|
||||
return this.write(lastState.endTag, this.next)
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'Component':
|
||||
this.renderStates.pop()
|
||||
this.activeInstance = lastState.prevActive
|
||||
this.next()
|
||||
break
|
||||
case 'ComponentWithCache':
|
||||
this.renderStates.pop()
|
||||
const { buffer, bufferIndex, componentBuffer, key } = lastState
|
||||
const result = {
|
||||
html: buffer[bufferIndex],
|
||||
components: componentBuffer[bufferIndex]
|
||||
}
|
||||
this.cache.set(key, result)
|
||||
if (bufferIndex === 0) {
|
||||
// this is a top-level cached component,
|
||||
// exit caching mode.
|
||||
this.write.caching = false
|
||||
} else {
|
||||
// parent component is also being cached,
|
||||
// merge self into parent's result
|
||||
buffer[bufferIndex - 1] += result.html
|
||||
const prev = componentBuffer[bufferIndex - 1]
|
||||
result.components.forEach(c => prev.add(c))
|
||||
}
|
||||
buffer.length = bufferIndex
|
||||
componentBuffer.length = bufferIndex
|
||||
this.next()
|
||||
break
|
||||
break
|
||||
case 'Component':
|
||||
this.renderStates.pop()
|
||||
this.activeInstance = lastState.prevActive
|
||||
break
|
||||
case 'ComponentWithCache':
|
||||
this.renderStates.pop()
|
||||
const { buffer, bufferIndex, componentBuffer, key } = lastState
|
||||
const result = {
|
||||
html: buffer[bufferIndex],
|
||||
components: componentBuffer[bufferIndex]
|
||||
}
|
||||
this.cache.set(key, result)
|
||||
if (bufferIndex === 0) {
|
||||
// this is a top-level cached component,
|
||||
// exit caching mode.
|
||||
this.write.caching = false
|
||||
} else {
|
||||
// parent component is also being cached,
|
||||
// merge self into parent's result
|
||||
buffer[bufferIndex - 1] += result.html
|
||||
const prev = componentBuffer[bufferIndex - 1]
|
||||
result.components.forEach(c => prev.add(c))
|
||||
}
|
||||
buffer.length = bufferIndex
|
||||
componentBuffer.length = bufferIndex
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user