chore(compiler-ssr): move `defaultProps` initialization into `input` tag branch (#14115)
ci / test (push) Waiting to run Details
ci / continuous-release (push) Waiting to run Details
size data / upload (push) Waiting to run Details

This commit is contained in:
Vida Xie 2025-11-19 13:42:16 +08:00 committed by GitHub
parent 3942dbe613
commit 83f6ab686d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -83,11 +83,11 @@ export const ssrTransformModel: DirectiveTransform = (dir, node, context) => {
if (node.tagType === ElementTypes.ELEMENT) {
const res: DirectiveTransformResult = { props: [] }
const defaultProps = [
// default value binding for text type inputs
createObjectProperty(`value`, model),
]
if (node.tag === 'input') {
const defaultProps = [
// default value binding for text type inputs
createObjectProperty(`value`, model),
]
const type = findProp(node, 'type')
if (type) {
const value = findValueBinding(node)