Browse Source
Merge in VISUAL/fineui from ~TREECAT/fineui:es6 to es6 * commit '072054c7cddd7b0b7c32d449a2ce9600d6340cd4': KERNEL-14076 feat: 循环依赖修复 && 无jira 替换 case 全部 xtypees6
treecat-罗群
2 years ago
112 changed files with 4471 additions and 3403 deletions
@ -1,62 +1,70 @@
|
||||
|
||||
import { shortcut, Widget, createItems, makeArrayByArray } from "@/core"; |
||||
import { ButtonGroup } from "@/base"; |
||||
import { LinearSegmentButton } from "./button.linear.segment"; |
||||
import { TableLayout, shortcut, Widget, createItems, makeArrayByArray } from "@/core"; |
||||
|
||||
@shortcut() |
||||
export class LinearSegment extends Widget { |
||||
static xtype = "bi.linear_segment" |
||||
|
||||
props = { baseCls:"bi-linear-segment", items:[], height:30 }; |
||||
|
||||
static xtype = "bi.linear_segment"; |
||||
|
||||
props = { baseCls: "bi-linear-segment", items: [], height: 30 }; |
||||
|
||||
render () { |
||||
render() { |
||||
const o = this.options; |
||||
|
||||
return { |
||||
type: "bi.button_group", |
||||
items: [createItems(o.items, { |
||||
type: "bi.linear_segment_button", |
||||
height: o.height, |
||||
})], |
||||
layouts: [{ |
||||
type: "bi.table", |
||||
columnSize: makeArrayByArray(o.items, "fill"), |
||||
}], |
||||
type: ButtonGroup.xtype, |
||||
items: [ |
||||
createItems(o.items, { |
||||
type: LinearSegmentButton.xtype, |
||||
height: o.height, |
||||
}) |
||||
], |
||||
layouts: [ |
||||
{ |
||||
type: TableLayout.xtype, |
||||
columnSize: makeArrayByArray(o.items, "fill"), |
||||
} |
||||
], |
||||
value: o.value, |
||||
listeners: [{ |
||||
eventName: "__EVENT_CHANGE__", |
||||
action: (...args) => { |
||||
this.fireEvent("__EVENT_CHANGE__", ...args); |
||||
}, |
||||
}, { |
||||
eventName: "EVENT_CHANGE", |
||||
action: () => { |
||||
this.fireEvent("EVENT_CHANGE"); |
||||
listeners: [ |
||||
{ |
||||
eventName: "__EVENT_CHANGE__", |
||||
action: (...args) => { |
||||
this.fireEvent("__EVENT_CHANGE__", ...args); |
||||
}, |
||||
}, |
||||
}], |
||||
{ |
||||
eventName: "EVENT_CHANGE", |
||||
action: () => { |
||||
this.fireEvent("EVENT_CHANGE"); |
||||
}, |
||||
} |
||||
], |
||||
ref: _ref => { |
||||
this.buttonGroup = _ref; |
||||
}, |
||||
}; |
||||
} |
||||
|
||||
setValue (v) { |
||||
setValue(v) { |
||||
this.buttonGroup.setValue(v); |
||||
} |
||||
|
||||
setEnabledValue (v) { |
||||
setEnabledValue(v) { |
||||
this.buttonGroup.setEnabledValue(v); |
||||
} |
||||
|
||||
getValue () { |
||||
getValue() { |
||||
return this.buttonGroup.getValue(); |
||||
} |
||||
|
||||
populate (buttons) { |
||||
populate(buttons) { |
||||
const o = this.options; |
||||
this.buttonGroup.populate([createItems(buttons, { |
||||
type: "bi.linear_segment_button", |
||||
height: o.height, |
||||
})]); |
||||
this.buttonGroup.populate([ |
||||
createItems(buttons, { |
||||
type: LinearSegmentButton.xtype, |
||||
height: o.height, |
||||
}) |
||||
]); |
||||
} |
||||
} |
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue