How do i clone html from extjs ?
我如何从extjs克隆html?
like a
像一个
$('#copy').append($('#orig .elem')
.clone()
.children('a')
.prepend('foo - ')
.parent()
.clone());
I thought something like
我觉得有点像
//Component 1
var comp1 = new Ext.form.TextField({});
//Component cloning...
var comp2 = comp1.cloneConfig();
But I need to add a button
但我需要添加一个按钮
1 个解决方案
#1
1
ExtJS is object oriented, so instead of "cloning" you can "extend" one component from another and override any methods or properties as needed.
ExtJS是面向对象的,因此您可以“扩展”另一个组件而不是“克隆”,并根据需要覆盖任何方法或属性。
#1
1
ExtJS is object oriented, so instead of "cloning" you can "extend" one component from another and override any methods or properties as needed.
ExtJS是面向对象的,因此您可以“扩展”另一个组件而不是“克隆”,并根据需要覆盖任何方法或属性。