对于从Kendo UI网站获取的Kendo Mobile TabStrip演示,默认示例移动选项卡是以下标记:
<div data-role="tabstrip" data-selected-index="1">
<a data-icon="contacts">foo</a>
<a data-icon="contacts">bar</a>
<a data-icon="info">baz</a>
</div>
但是AngularJS的等价物是:
<kendo-mobile-view id="tabstrip-foo" k-title="'foo'" k-layout="'mobile-tabstrip'">
</kendo-mobile-view>
<kendo-mobile-view id="tabstrip-bar" k-title="'bar'" k-layout="'mobile-tabstrip'">
</kendo-mobile-view>
<kendo-mobile-view id="tabstrip-baz" k-title="'baz'" k-layout="'mobile-tabstrip'">
</kendo-mobile-view>
为什么格式之间存在差异?
答案 0 :(得分:0)
不确定您正在查看哪个演示,但是Angular元素定义了tabstrip导航到的视图,而不是制表符本身。
This demo包含HTML:
<div data-role="footer">
<div data-role="tabstrip">
<a href="#tabstrip-profile" data-icon="contacts">Profile
</a><a href="#tabstrip-sales" data-icon="history">Sales
</a><a href="#tabstrip-rating" data-icon="favorites">Rating
</a><a href="#tabstrip-settings" data-icon="settings">Settings</a>
</div>
</div>
或Angular版本:
<kendo-mobile-footer>
<kendo-mobile-tab-strip>
<a href="#tabstrip-profile" data-icon="contacts">Profile
</a><a href="#tabstrip-sales" data-icon="history">Sales
</a><a href="#tabstrip-rating" data-icon="favorites">Rating
</a><a href="#tabstrip-settings" data-icon="settings">Settings</a>
</kendo-mobile-tab-strip>
</kendo-mobile-footer>