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.
84 lines
2.4 KiB
84 lines
2.4 KiB
import { shortcut, Widget, Bubbles } from "@/core"; |
|
|
|
@shortcut() |
|
export class Bubble extends Widget { |
|
static xtype = "demo.bubble"; |
|
|
|
props = { baseCls: "demo-bubble" }; |
|
|
|
render() { |
|
const btns = []; |
|
const items = [ |
|
{ |
|
el: { |
|
ref(_ref) { |
|
btns.push(_ref); |
|
}, |
|
type: "bi.button", |
|
text: "bubble测试(消息)", |
|
title: "123", |
|
height: 30, |
|
handler() { |
|
Bubbles.show("singleBubble1", "bubble测试", this, { |
|
level: "common", |
|
}); |
|
}, |
|
}, |
|
}, |
|
{ |
|
el: { |
|
ref(_ref) { |
|
btns.push(_ref); |
|
}, |
|
type: "bi.button", |
|
text: "bubble测试(成功)", |
|
height: 30, |
|
handler() { |
|
Bubbles.show("singleBubble2", "bubble测试", this, { |
|
offsetStyle: "center", |
|
level: "success", |
|
}); |
|
}, |
|
}, |
|
}, |
|
{ |
|
el: { |
|
ref(_ref) { |
|
btns.push(_ref); |
|
}, |
|
type: "bi.button", |
|
text: "bubble测试(错误)", |
|
height: 30, |
|
handler() { |
|
Bubbles.show("singleBubble3", "bubble测试", this, { |
|
offsetStyle: "right", |
|
level: "error", |
|
}); |
|
}, |
|
}, |
|
}, |
|
{ |
|
el: { |
|
ref(_ref) { |
|
btns.push(_ref); |
|
}, |
|
type: "bi.button", |
|
text: "bubble测试(警告)", |
|
height: 30, |
|
handler() { |
|
Bubbles.show("singleBubble4", "bubble测试", this, { |
|
level: "warning", |
|
}); |
|
}, |
|
}, |
|
} |
|
]; |
|
|
|
return { |
|
type: "bi.left", |
|
vgap: 200, |
|
hgap: 20, |
|
items, |
|
}; |
|
} |
|
}
|
|
|