问题
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