Ani*_*aha 5 asp.net-mvc razor asp.net-mvc-5 vue.js
我想添加v-on:click或@click,例如以下html helper方法:
@Html.TextBoxFor(x => x.ItnScanCaseCode, new { @id="txtid",@click = "onchangeevent();" })
Run Code Online (Sandbox Code Playgroud)
怎么做?
adi*_*iga 11
你可以像这样使用Dictionaryfor htmlAttributes:
@Html.TextBoxFor(x => x.ItnScanCaseCode, htmlAttributes: new Dictionary<string, object> {
{ "v-on:click", "onchangeevent()" },
{ "id", "txtid" }
})
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
186 次 |
| 最近记录: |