using telerik ui for asp.net mvc vue.js

空扰寡人 提交于 2019-12-11 17:39:56

问题


Has anyone used vue.js with Telerik UI for ASP.Net MVC? Not the Kendo UI controls?

Specifically looking for examples on using v-bind and v-model with the controls.

for example a checkbox

@Html.Kendo.Checkbox().Name()

I'd like to bind the name and set the checked and such like I've done for a standard html checkbox

type="checkbox" v-bind:id="thePlan.Id"    class="plan-selection" v-bind:checked="thePlan.IsSelected" v-model="thePlan.IsSelected"

Has anyone done something like this?


回答1:


You can add all HTML attributes you need using new Dictionary<string, object> in HtmlAttributes.

Like this:

@Html.Kendo().CheckBox().Name("checkBox").HtmlAttributes(new Dictionary<string, object> { { "class", "plan-selection" }, { "v-bind:id", "thePlan.Id" } })


来源:https://stackoverflow.com/questions/51324481/using-telerik-ui-for-asp-net-mvc-vue-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!