guy 7 years ago
parent
commit
fc719a3a13
  1. 56
      demo/js/widget/basewidget/demo.mask.loading.js
  2. 55
      dist/demo.js

56
demo/js/widget/basewidget/demo.mask.loading.js

@ -1,56 +0,0 @@
/**
* Created by Dailer on 2017/7/25.
*/
Demo.LoadingMask = BI.inherit(BI.Widget, {
render: function () {
var vessel = this;
var self = this;
var left = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "LoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_mask",
masker: vessel,
text: "加载中...3s后结束"
});
setTimeout(function () {
mask.destroy();
}, 3000);
}
}]
});
var right = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "CancelLoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_cancel_mask",
masker: vessel,
text: "正在加载数据"
});
mask.on(BI.LoadingCancelMask.EVENT_VALUE_CANCEL, function () {
mask.destroy();
BI.Msg.toast("取消加载了...");
});
}
}]
});
BI.createWidget({
type: "bi.center_adapt",
element: vessel,
items: [left, right],
hgap: 20
});
}
});
BI.shortcut("demo.loading_mask", Demo.LoadingMask);

55
dist/demo.js vendored

@ -11911,61 +11911,6 @@ BI.shortcut("demo.items", Demo.Items);/**
* Created by Dailer on 2017/7/25. * Created by Dailer on 2017/7/25.
*/ */
Demo.LoadingMask = BI.inherit(BI.Widget, {
render: function () {
var vessel = this;
var self = this;
var left = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "LoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_mask",
masker: vessel,
text: "加载中...3s后结束"
});
setTimeout(function () {
mask.destroy();
}, 3000);
}
}]
});
var right = BI.createWidget({
type: "bi.center_adapt",
items: [{
type: "bi.button",
text: "CancelLoadingMask",
height: 30,
handler: function () {
var mask = BI.createWidget({
type: "bi.loading_cancel_mask",
masker: vessel,
text: "正在加载数据"
});
mask.on(BI.LoadingCancelMask.EVENT_VALUE_CANCEL, function () {
mask.destroy();
BI.Msg.toast("取消加载了...");
});
}
}]
});
BI.createWidget({
type: "bi.center_adapt",
element: vessel,
items: [left, right],
hgap: 20
});
}
});
BI.shortcut("demo.loading_mask", Demo.LoadingMask);/**
* Created by Dailer on 2017/7/25.
*/
Demo.Nodes = BI.inherit(BI.Widget, { Demo.Nodes = BI.inherit(BI.Widget, {
render: function (vessel) { render: function (vessel) {

Loading…
Cancel
Save