树教程
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title></title>
<link rel="stylesheet" href="ext-4.2.1.883/resources/ext-theme-classic/ext-theme-classic-all-debug.css">
</head
<body>
</body>
<script type="text/javascript" src="ext-4.2.1.883/ext-all-debug.js"></script>
<script type="text/javascript" src="ext-4.2.1.883/locale/ext-lang-zh_CN.js"></script>
<script>
Ext.onReady(function() {
var store = Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
children: [
// { text: "detention", leaf: true },
{ text: "销售订单1", expanded: true, children: [
{ text: "订单1", leaf: true },
{ text: "内容1", leaf: true}
] },
{ text: "销售状态2", expanded: true, children: [
{ text: "状态2", leaf: true },
{ text: "调节2", leaf: true}
] },
{ text: "销售业务3", expanded: false, children: [
{ text: "基础3", leaf: true },
{ text: "哈哈3", leaf: true}
] },
{ text: "销售时间4", expanded: true, children: [
{ text: "啥呀4", leaf: true },
{ text: "随便写一个4", leaf: true}
] },
{ text: "销售内容5", expanded: true, children: [
{ text: "能超不5", leaf: true },
{ text: "不一定5", leaf: true}
] },
{ text: "销售人群6", expanded: false, children: [
{ text: "怎么办6", leaf: true },
{ text: "不知道6", leaf: true}
] },
]
}
});
Ext.create('Ext.tree.Panel', {
title: 'Simple Tree',
width: 200,
height:850,
store: store,
rootVisible: false,
renderTo: Ext.getBody()
});
});
</script>
</html>