forked from fanruan/fineui
Browse Source
Merge in VISUAL/fineui from ~TREECAT/fineui:es6 to es6 * commit 'ef32e98be6b3b78cb7581568bd78e88f29dace30': KERNEL-14076 refact: es6 脚本识别循环依赖。完成 base 处理。es6
treecat-罗群
2 years ago
81 changed files with 4716 additions and 3391 deletions
@ -1,47 +1,40 @@
|
||||
/** |
||||
* 表示当前对象 |
||||
* |
||||
* Created by GUY on 2015/9/7. |
||||
* @class BI.EL |
||||
* @extends BI.Widget |
||||
*/ |
||||
BI.Context = BI.inherit(BI.Widget, { |
||||
props: { |
||||
context: "", |
||||
watch: {}, |
||||
el: {}, |
||||
items: [], |
||||
}, |
||||
import { shortcut, Widget, createWidget, Controller } from "@/core"; |
||||
|
||||
render: function () { |
||||
var self = this, o = this.options; |
||||
@shortcut() |
||||
export class Context extends Widget { |
||||
static xtype = "bi.context"; |
||||
|
||||
props = { context: "", watch: {}, el: {}, items: [] }; |
||||
|
||||
render() { |
||||
const self = this, |
||||
o = this.options; |
||||
if (o.context) { |
||||
this.context = BI.useContext(o.context); |
||||
} |
||||
this.widget = BI.createWidget((o.items[0] || o.el)(this.context), { |
||||
this.widget = createWidget((o.items[0] || o.el)(this.context), { |
||||
element: this, |
||||
}); |
||||
this.widget.on(BI.Controller.EVENT_CHANGE, function () { |
||||
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
||||
this.widget.on(Controller.EVENT_CHANGE, function () { |
||||
self.fireEvent(Controller.EVENT_CHANGE, arguments); |
||||
}); |
||||
}, |
||||
} |
||||
|
||||
__initWatch: function () { |
||||
BI.Context.superclass.__initWatch.call(this); |
||||
var o = this.options; |
||||
__initWatch() { |
||||
super.__initWatch.call(this); |
||||
const o = this.options; |
||||
BI.watch(this.context, o.context, o.watch); |
||||
}, |
||||
} |
||||
|
||||
setValue: function (v) { |
||||
setValue(v) { |
||||
this.widget.setValue(v); |
||||
}, |
||||
} |
||||
|
||||
getValue: function () { |
||||
getValue() { |
||||
return this.widget.getValue(); |
||||
}, |
||||
} |
||||
|
||||
populate: function () { |
||||
populate() { |
||||
this.widget.populate.apply(this, arguments); |
||||
}, |
||||
}); |
||||
BI.shortcut("bi.context", BI.Context); |
||||
} |
||||
} |
||||
|
@ -1,38 +1,36 @@
|
||||
/** |
||||
* 表示当前对象 |
||||
* |
||||
* Created by GUY on 2015/9/7. |
||||
* @class BI.EL |
||||
* @extends BI.Widget |
||||
*/ |
||||
BI.EL = BI.inherit(BI.Widget, { |
||||
_defaultConfig: function () { |
||||
return BI.extend(BI.EL.superclass._defaultConfig.apply(this, arguments), { |
||||
import { shortcut, Widget, extend, createWidget, Controller } from "@/core"; |
||||
|
||||
@shortcut() |
||||
export class EL extends Widget { |
||||
static xtype = "bi.el"; |
||||
|
||||
_defaultConfig() { |
||||
return extend(super._defaultConfig(...arguments), { |
||||
baseCls: "bi-el", |
||||
el: {}, |
||||
}); |
||||
}, |
||||
} |
||||
|
||||
render: function () { |
||||
var self = this, o = this.options; |
||||
this.ele = BI.createWidget(o.el, { |
||||
render() { |
||||
const self = this, |
||||
o = this.options; |
||||
this.ele = createWidget(o.el, { |
||||
element: this, |
||||
}); |
||||
this.ele.on(BI.Controller.EVENT_CHANGE, function () { |
||||
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
||||
this.ele.on(Controller.EVENT_CHANGE, function () { |
||||
self.fireEvent(Controller.EVENT_CHANGE, arguments); |
||||
}); |
||||
}, |
||||
} |
||||
|
||||
setValue: function (v) { |
||||
setValue(v) { |
||||
this.ele.setValue(v); |
||||
}, |
||||
} |
||||
|
||||
getValue: function () { |
||||
getValue() { |
||||
return this.ele.getValue(); |
||||
}, |
||||
} |
||||
|
||||
populate: function () { |
||||
populate() { |
||||
this.ele.populate.apply(this, arguments); |
||||
}, |
||||
}); |
||||
BI.shortcut("bi.el", BI.EL); |
||||
} |
||||
} |
||||
|
@ -1,17 +1,17 @@
|
||||
export { BasicButton } from "./button.basic"; |
||||
export { NodeButton } from "./button.node"; |
||||
export { Button } from "./buttons/button"; |
||||
export { IconButton } from "./buttons/button.icon"; |
||||
export { ImageButton } from "./buttons/button.image"; |
||||
export { TextButton } from "./buttons/button.text"; |
||||
export { BlankIconIconTextItem } from "./listitem/blankiconicontextitem"; |
||||
export { BlankIconTextIconItem } from "./listitem/blankicontexticonitem"; |
||||
export { BlankIconTextItem } from "./listitem/blankicontextitem"; |
||||
export { IconTextIconItem } from "./listitem/icontexticonitem"; |
||||
export { IconTextItem } from "./listitem/icontextitem"; |
||||
export { TextIconItem } from "./listitem/texticonitem"; |
||||
export { TextItem } from "./listitem/textitem"; |
||||
export { IconTextIconNode } from "./node/icontexticonnode"; |
||||
export { IconTextNode } from "./node/icontextnode"; |
||||
export { TextIconNode } from "./node/texticonnode"; |
||||
export { TextNode } from "./node/textnode"; |
||||
export { BasicButton } from "./button.basic"; |
||||
export { NodeButton } from "./button.node"; |
||||
export { Button } from "./buttons/button"; |
||||
export { IconButton } from "./buttons/button.icon"; |
||||
export { ImageButton } from "./buttons/button.image"; |
||||
export { TextButton } from "./buttons/button.text"; |
||||
export { BlankIconIconTextItem } from "./listitem/blankiconicontextitem"; |
||||
export { BlankIconTextIconItem } from "./listitem/blankicontexticonitem"; |
||||
export { BlankIconTextItem } from "./listitem/blankicontextitem"; |
||||
export { IconTextIconItem } from "./listitem/icontexticonitem"; |
||||
export { IconTextItem } from "./listitem/icontextitem"; |
||||
export { TextIconItem } from "./listitem/texticonitem"; |
||||
export { TextItem } from "./listitem/textitem"; |
||||
export { IconTextIconNode } from "./node/icontexticonnode"; |
||||
export { IconTextNode } from "./node/icontextnode"; |
||||
export { TextIconNode } from "./node/texticonnode"; |
||||
export { TextNode } from "./node/textnode"; |
||||
|
@ -1,3 +1,3 @@
|
||||
export { Editor } from "./editor"; |
||||
export { MultifileEditor } from "./editor.multifile"; |
||||
export { TextAreaEditor } from "./editor.textarea"; |
||||
export { Editor } from "./editor"; |
||||
export { MultifileEditor } from "./editor.multifile"; |
||||
export { TextAreaEditor } from "./editor.textarea"; |
||||
|
@ -1,6 +1,6 @@
|
||||
export { Input } from "./input"; |
||||
export { File } from "./file"; |
||||
export { Checkbox } from "./checkbox/checkbox"; |
||||
export { ImageCheckbox } from "./checkbox/checkbox.image"; |
||||
export { Radio } from "./radio/radio"; |
||||
export { ImageRadio } from "./radio/radio.image"; |
||||
export { Input } from "./input"; |
||||
export { File } from "./file"; |
||||
export { Checkbox } from "./checkbox/checkbox"; |
||||
export { ImageCheckbox } from "./checkbox/checkbox.image"; |
||||
export { Radio } from "./radio/radio"; |
||||
export { ImageRadio } from "./radio/radio.image"; |
||||
|
@ -1,4 +1,4 @@
|
||||
export { AbstractLabel } from "./abstract.label"; |
||||
export { HtmlLabel } from "./html.label"; |
||||
export { IconLabel } from "./icon.label"; |
||||
export { Label } from "./label"; |
||||
export { AbstractLabel } from "./abstract.label"; |
||||
export { HtmlLabel } from "./html.label"; |
||||
export { IconLabel } from "./icon.label"; |
||||
export { Label } from "./label"; |
||||
|
Loading…
Reference in new issue