jQuery EasyUI bentuk Plugin - Combotree kombinasi pohon
Memanjang dari $ .fn.combo.defaults dan $ .fn.tree.defaults. Dengan $ .fn.combotree.defaults menimpa default default.
Kombinasi Pohon (combotree) untuk memilih dan mengontrol pohon drop-down bersama-sama. Ini combo box (kotak kombo) mirip, kecuali bahwa daftar komponen pengganti ke pohon. Kombinasi Pohon (combotree) pohon dengan dukungan negara pohon untuk kotak pilihan cek beberapa.
mengandalkan
- combo
- pohon
pemakaian
Membuat kombinasi dari pohon tag (combotree).
<Pilih id = "cc" class = "easyui-combotree" style = "width: 200px;" Data-opsi = "url: 'get_data.php', diperlukan: true"> </ Pilih>
Gunakan javascript untuk membuat kombinasi pohon (combotree).
<Input id = "cc" value = "01">
$ ( '# Cc'). Combotree ({ url: 'get_data.php', diperlukan: true });
milik
Properti membentang dari kombinasi (combo) dan pohon (tree), di bawah ini adalah kombinasi dari pohon (combotree) untuk menambah atau menulis ulang atribut.
名称 | 类型 | 描述 | 默认值 |
---|---|---|---|
editable | boolean | 定义用户是否可以直接往文本域中输入文字。 | false |
peristiwa
Acara diperluas dari kombinasi (combo) dan pohon (tree)
cara
Metode memperpanjang dari kombinasi (combo), di bawah ini adalah kombinasi dari pohon (combotree) menambah atau mengganti metode.
名称 | 参数 | 描述 |
---|---|---|
options | none | 返回选项(options)对象。 |
tree | none | 返回树(tree)对象。下面的实例演示如何取得选中的树节点。
var t = $('#cc').combotree('tree'); // get the tree object var n = t.tree('getSelected'); // get selected node alert(n.text); |
loadData | data | 记住本地的树(tree)数据。 代码实例: $('#cc').combotree('loadData', [{ id: 1, text: 'Languages', children: [{ id: 11, text: 'Java' },{ id: 12, text: 'C++' }] }]); |
reload | url | 再一次请求远程的树(tree)数据。传 'url' 参数来重写原始的 URL 值。 |
clear | none | 清除组件的值。 |
setValues | values | 设置组件值的数组。 代码实例: $('#cc').combotree('setValues', [1,3,21]); |
setValue | value | 设置组件的值。 代码实例: $('#cc').combotree('setValue', 6); |
jQuery EasyUI Plugin