简体   繁体   English

Kendo Tabstrip在带有MVVM的左侧显示标签

[英]Kendo Tabstrip show tabs on the Left-side with MVVM

I want to use Kendo Tabsrip with MVVM and show tabs on the left-side of the screen. 我想将Kendo Tabsrip与MVVM一起使用,并在屏幕左侧显示标签。 In general, in non-MVVM environment tab positions is set like this: 通常,在非MVVM环境中,选项卡的位置设置如下:

 $(document).ready(function () {
                $("#tabstrip-left").kendoTabStrip({
                    tabPosition: "left",
                    animation: { open: { effects: "fadeIn" } }
                });
 }

However, I don't know how to set tabPosition attribute in the kendo MVVM. 但是,我不知道如何在tabPosition MVVM中设置tabPosition属性。 I have tried this in MVVM but it did not worked: 我已经在MVVM中尝试过此方法,但没有成功:

<div data-role="tabstrip"
             data-tabPosition="left" 
             data-bind="events: { select: onSelect },
             visible: isVisible">
....
</div>

Here is a MVVM example of the code that has this data-tabPosition attribute but tab position is still on the top 这是具有此data-tabPosition属性,但选项卡位置仍在顶部的MVVM示例代码

http://dojo.telerik.com/UDELe http://dojo.telerik.com/UDELe

You should use this way: 您应该使用这种方式:

data-tab-position="left"

There is rule: data-some-variable parameter will produce javascript variable someVariable 有规则: data-some-variable参数将产生javascript变量someVariable

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM