forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.7 KiB
62 lines
1.7 KiB
import { shortcut, Widget, Stores } from "@/core"; |
|
|
|
@shortcut() |
|
export class Main extends Widget { |
|
static xtype = "demo.main"; |
|
|
|
props = { baseCls: "demo-main bi-background" }; |
|
|
|
_store() { |
|
return Stores.getStore("demo.store.main"); |
|
} |
|
|
|
beforeInit(cb) { |
|
this.store.init(cb); |
|
} |
|
|
|
render() { |
|
const self = this; |
|
|
|
return { |
|
type: "bi.border", |
|
items: { |
|
north: { |
|
height: 50, |
|
el: { |
|
type: "demo.north", |
|
listeners: [ |
|
{ |
|
eventName: Demo.North.EVENT_VALUE_CHANGE, |
|
action (v) { |
|
self.store.handleTreeSelectChange(v); |
|
}, |
|
} |
|
], |
|
}, |
|
}, |
|
west: { |
|
width: 230, |
|
el: { |
|
type: "demo.west", |
|
listeners: [ |
|
{ |
|
eventName: Demo.West.EVENT_VALUE_CHANGE, |
|
action (v) { |
|
self.store.handleTreeSelectChange(v); |
|
}, |
|
} |
|
], |
|
}, |
|
}, |
|
center: { |
|
el: { |
|
type: "demo.center", |
|
ref (_ref) { |
|
self.center = _ref; |
|
}, |
|
}, |
|
}, |
|
}, |
|
}; |
|
} |
|
}
|
|
|