|
|
@ -8543,12 +8543,13 @@ Demo.Func = BI.inherit(BI.Widget, { |
|
|
|
vgap: 10, |
|
|
|
vgap: 10, |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
type: "bi.text_button", |
|
|
|
type: "bi.text_button", |
|
|
|
text: "点击弹出Popover", |
|
|
|
text: "点击弹出Popover(normal size)", |
|
|
|
height: 30, |
|
|
|
height: 30, |
|
|
|
handler: function () { |
|
|
|
handler: function () { |
|
|
|
BI.Popovers.remove(id); |
|
|
|
BI.Popovers.remove(id); |
|
|
|
BI.Popovers.create(id, { |
|
|
|
BI.Popovers.create(id, { |
|
|
|
type: "bi.bar_popover", |
|
|
|
type: "bi.bar_popover", |
|
|
|
|
|
|
|
size: "big", |
|
|
|
header: { |
|
|
|
header: { |
|
|
|
type: "bi.label", |
|
|
|
type: "bi.label", |
|
|
|
text: "这个是header" |
|
|
|
text: "这个是header" |
|
|
@ -8557,10 +8558,67 @@ Demo.Func = BI.inherit(BI.Widget, { |
|
|
|
type: "bi.label", |
|
|
|
type: "bi.label", |
|
|
|
text: "这个是body" |
|
|
|
text: "这个是body" |
|
|
|
} |
|
|
|
} |
|
|
|
// footer: {
|
|
|
|
}).open(id); |
|
|
|
// type: "bi.label",
|
|
|
|
} |
|
|
|
// text: "这个是footer"
|
|
|
|
}, { |
|
|
|
// }
|
|
|
|
type: "bi.text_button", |
|
|
|
|
|
|
|
text: "点击弹出Popover(small size)", |
|
|
|
|
|
|
|
height: 30, |
|
|
|
|
|
|
|
handler: function () { |
|
|
|
|
|
|
|
BI.Popovers.remove(id); |
|
|
|
|
|
|
|
BI.Popovers.create(id, { |
|
|
|
|
|
|
|
type: "bi.bar_popover", |
|
|
|
|
|
|
|
size: "small", |
|
|
|
|
|
|
|
header: { |
|
|
|
|
|
|
|
type: "bi.label", |
|
|
|
|
|
|
|
text: "这个是header" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
body: { |
|
|
|
|
|
|
|
type: "bi.label", |
|
|
|
|
|
|
|
text: "这个是body" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).open(id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
type: "bi.text_button", |
|
|
|
|
|
|
|
text: "点击弹出Popover(big size)", |
|
|
|
|
|
|
|
height: 30, |
|
|
|
|
|
|
|
handler: function () { |
|
|
|
|
|
|
|
BI.Popovers.remove(id); |
|
|
|
|
|
|
|
BI.Popovers.create(id, { |
|
|
|
|
|
|
|
type: "bi.bar_popover", |
|
|
|
|
|
|
|
size: "big", |
|
|
|
|
|
|
|
header: { |
|
|
|
|
|
|
|
type: "bi.label", |
|
|
|
|
|
|
|
text: "这个是header" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
body: { |
|
|
|
|
|
|
|
type: "bi.label", |
|
|
|
|
|
|
|
text: "这个是body" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).open(id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
type: "bi.text_button", |
|
|
|
|
|
|
|
text: "点击弹出Popover(custom)", |
|
|
|
|
|
|
|
height: 30, |
|
|
|
|
|
|
|
handler: function () { |
|
|
|
|
|
|
|
BI.Popovers.remove(id); |
|
|
|
|
|
|
|
BI.Popovers.create(id, { |
|
|
|
|
|
|
|
width: 400, |
|
|
|
|
|
|
|
height: 300, |
|
|
|
|
|
|
|
header: { |
|
|
|
|
|
|
|
type: "bi.label", |
|
|
|
|
|
|
|
text: "这个是header" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
body: { |
|
|
|
|
|
|
|
type: "bi.label", |
|
|
|
|
|
|
|
text: "这个是body" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
footer: { |
|
|
|
|
|
|
|
type: "bi.label", |
|
|
|
|
|
|
|
text: "这个是footer" |
|
|
|
|
|
|
|
} |
|
|
|
}).open(id); |
|
|
|
}).open(id); |
|
|
|
} |
|
|
|
} |
|
|
|
}] |
|
|
|
}] |
|
|
@ -11605,19 +11663,56 @@ BI.shortcut("demo.preview", Demo.Preview);Demo.West = BI.inherit(BI.Widget, { |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
baseCls: "demo-west bi-border-right bi-card" |
|
|
|
baseCls: "demo-west bi-border-right bi-card" |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
mounted: function () { |
|
|
|
|
|
|
|
this.searcher.setAdapter(this.tree); |
|
|
|
|
|
|
|
}, |
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
var self = this; |
|
|
|
var self = this; |
|
|
|
return { |
|
|
|
return { |
|
|
|
type: "bi.vertical", |
|
|
|
type: "bi.vtape", |
|
|
|
|
|
|
|
items: [{ |
|
|
|
|
|
|
|
type: "bi.center_adapt", |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
|
|
|
|
type: "bi.searcher", |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: "bi.search_editor", |
|
|
|
|
|
|
|
watermark: "简单搜索" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
width: 200, |
|
|
|
|
|
|
|
isAutoSearch: false, |
|
|
|
|
|
|
|
isAutoSync: false, |
|
|
|
|
|
|
|
ref: function (ref) { |
|
|
|
|
|
|
|
self.searcher = ref; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
popup: { |
|
|
|
type: "bi.multilayer_single_level_tree", |
|
|
|
type: "bi.multilayer_single_level_tree", |
|
|
|
|
|
|
|
cls: "bi-card", |
|
|
|
listeners: [{ |
|
|
|
listeners: [{ |
|
|
|
eventName: BI.MultiLayerSingleLevelTree.EVENT_CHANGE, |
|
|
|
eventName: BI.MultiLayerSingleLevelTree.EVENT_CHANGE, |
|
|
|
action: function (v) { |
|
|
|
action: function (v) { |
|
|
|
self.fireEvent(Demo.West.EVENT_VALUE_CHANGE, v); |
|
|
|
self.fireEvent(Demo.West.EVENT_VALUE_CHANGE, v); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onSearch: function (op, callback) { |
|
|
|
|
|
|
|
var result = BI.Func.getSearchResult(Demo.CONFIG, op.keyword, "text"); |
|
|
|
|
|
|
|
var items = result.match.concat(result.find); |
|
|
|
|
|
|
|
callback(items); |
|
|
|
|
|
|
|
} |
|
|
|
}], |
|
|
|
}], |
|
|
|
items: Demo.CONFIG |
|
|
|
height: 40 |
|
|
|
|
|
|
|
}, { |
|
|
|
|
|
|
|
type: "bi.multilayer_single_level_tree", |
|
|
|
|
|
|
|
listeners: [{ |
|
|
|
|
|
|
|
eventName: BI.MultiLayerSingleLevelTree.EVENT_CHANGE, |
|
|
|
|
|
|
|
action: function (v) { |
|
|
|
|
|
|
|
self.fireEvent(Demo.West.EVENT_VALUE_CHANGE, v); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}], |
|
|
|
|
|
|
|
items: Demo.CONFIG, |
|
|
|
|
|
|
|
ref: function (ref) { |
|
|
|
|
|
|
|
self.tree = ref; |
|
|
|
|
|
|
|
} |
|
|
|
}] |
|
|
|
}] |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|