-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpanel-tab.html
37 lines (37 loc) · 1.2 KB
/
panel-tab.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css" rel="stylesheet" />
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function () {
Ext.create('Ext.tab.Panel', {
renderTo: Ext.getBody(),
height: 100,
width: 200,
items: [{
xtype: 'panel',
title: 'Tab One', // tab 标题
html: 'The first tab', // 内容
listeners: {
render: function() {
Ext.MessageBox.alert('Tab one', 'Tab One was clicked.');
}
}
},{
// xtype for all Component configurations in a Container
title: 'Tab Two',
html: 'The second tab',
listeners: {
render: function() {
Ext.MessageBox.alert('Tab two', 'Tab Two was clicked.');
}
}
}]
});
});
</script>
</head>
<body>
</body>
</html>