描述
Layout Card:此布局以标签形式排列不同的组件。标签将显示在容器顶部。每次只有一个选项卡可见,并且每个选项卡都被视为不同的组件。
语法
以下是使用卡片布局的简单语法。
layout: 'card'
例
以下是显示卡布局用法的简单示例。
<!DOCTYPE html> <html> <head> <link href = "https://cdn.sencha.com/touch/sencha-touch-2.4.2/resources/css/sencha-touch.css" rel = "stylesheet" /> <script type = "text/javascript" src = "https://cdn.sencha.com/touch/sencha-touch-2.4.2/sencha-touch-all.js"></script> <script type = "text/javascript"> Ext.application({ name: 'Sencha', launch: function() { var panel = Ext.create('Ext.Panel', { layout: 'card', items: [ { html: "First Item index value is 0" }, { html: "Second Item index value is 1 which we are setting as active index" }, { html: "Third Item index value is 2" }, { html: "Fourth Item index value is 3" } ] }); panel.setActiveItem(1); Ext.Viewport.add(panel); } }); </script> </head> <body> </body> </html>
作者:terry,如若转载,请注明出处:https://www.web176.com/senchatouch/1609.html