wip(ssr): v-model w/ dynamic type & props

This commit is contained in:
Evan You
2020-02-05 17:01:00 -05:00
parent 1f2de9e232
commit 201f18b58b
10 changed files with 204 additions and 23 deletions

View File

@@ -238,7 +238,7 @@ export function generate(
for (let i = 0; i < ast.temps; i++) {
push(`${i > 0 ? `, ` : ``}_temp${i}`)
}
newline()
push(`\n`)
}
if (ast.components.length || ast.directives.length || ast.temps) {
newline()

View File

@@ -34,6 +34,7 @@ export { transformOn } from './transforms/vOn'
export { transformBind } from './transforms/vBind'
// exported for compiler-ssr
export { MERGE_PROPS } from './runtimeHelpers'
export { processIfBranches } from './transforms/vIf'
export { processForNode, createForLoopParams } from './transforms/vFor'
export {

View File

@@ -16,7 +16,8 @@ import {
ComponentCodegenNode,
createCallExpression,
CacheExpression,
createCacheExpression
createCacheExpression,
TemplateLiteral
} from './ast'
import {
isString,
@@ -62,6 +63,7 @@ export type DirectiveTransform = (
export interface DirectiveTransformResult {
props: Property[]
needRuntime?: boolean | symbol
ssrTagParts?: TemplateLiteral['elements']
}
// A structural directive transform is a technically a NodeTransform;