Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Dynamic Field #4717

Closed
271915902 opened this issue Mar 29, 2024 · 1 comment
Closed

How to Dynamic Field #4717

271915902 opened this issue Mar 29, 2024 · 1 comment

Comments

@271915902
Copy link

For example,i have a button,with a function get a fieldName

addField(name:string){
}
or
deleteField(name:string){
}
but this field is not a Array
how to make my form like {name:xxx,email:xxxx}

@logaretm
Copy link
Owner

Hard to answer without a demo, but typically you can do that with v-if and a field hidden by it declaratively. At the moment you cannot add field programmatically because you won't have a way to use them outside of setup function or setup SFC block.

@logaretm logaretm closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants