How to create input name field with string-variable schema in Vue Js?

前端 未结 2 570
陌清茗
陌清茗 2021-02-08 00:50

I use VueJs, i need to extract javascript variable to generate hidden fields.

But i need to set the name by the index of the variable.

I want to use zig-zag nami

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-08 01:07

    To create input elements with dynamic names by index, you can use the + in a JS expression to concatenate:

    Generates:

    
    
    
    

    See: https://vuejs.org/v2/guide/syntax.html#Using-JavaScript-Expressions

提交回复
热议问题