babel-plugin-jsx icon indicating copy to clipboard operation
babel-plugin-jsx copied to clipboard

[Question] How to use multiple v-model in ts

Open colgin opened this issue 3 years ago • 2 comments

🧐 Problem Description

According the doc, we can use v-model like

<A v-model={[val, "argument", ["modifier"]]} />

we can use multiple v-model with differectn argument like

<A v-model={[val1, "argument1", ["modifier1"]]} v-model={[val2, "argument2", ["modifier2"]]} />

but, if we use tsx, ts will throw a error like "TS17001: JSX elements cannot have multiple attributes with the same name."

Although, I don't think it's a issue of babel-plugin-jsx, see ts playground, I want to know any workaround except using prop + event handler

💻 Sample code

🚑 Other information

colgin avatar Jul 13 '22 03:07 colgin

@colgin, it will take a lot of time write, but checkout this component and if you have any questions you are free to ask.

funny-family avatar Sep 13 '22 09:09 funny-family

@colgin, it will take a lot of time write, but checkout this component and if you have any questions you are free to ask.

@colgin, it will take a lot of time write, but checkout this component and if you have any questions you are free to ask.

没看明白,能都简单明了?

QAQLC avatar Apr 08 '24 06:04 QAQLC