选项窗口。

This commit is contained in:
liteng 2018-08-20 07:51:58 +08:00
parent cee2c61a3e
commit a4f6db40fd
2 changed files with 49 additions and 1 deletions

View File

@ -0,0 +1,43 @@
import UI from '../../ui/UI';
import Ajax from '../../utils/Ajax';
import AddObjectCommand from '../../command/AddObjectCommand';
import UploadUtils from '../../utils/UploadUtils';
/**
* 选项窗口
* @param {*} options
*/
function OptionsWindow(options) {
UI.Control.call(this, options);
this.app = options.app;
}
OptionsWindow.prototype = Object.create(UI.Control.prototype);
OptionsWindow.prototype.constructor = OptionsWindow;
OptionsWindow.prototype.render = function () {
var _this = this;
var container = UI.create({
xtype: 'window',
id: 'optionsWindow',
parent: this.app.container,
title: '选项窗口',
width: '700px',
height: '500px',
bodyStyle: {
paddingTop: 0
},
shade: false,
children: [
]
});
container.render();
};
OptionsWindow.prototype.show = function () {
UI.get('optionsWindow').show();
};
export default OptionsWindow;

View File

@ -1,4 +1,5 @@
import MenuEvent from '../MenuEvent';
import OptionsWindow from '../../../editor/window/OptionsWindow';
/**
* 选项菜单事件
@ -21,7 +22,11 @@ OptionsEvent.prototype.stop = function () {
};
OptionsEvent.prototype.onOptions = function () {
debugger
if (this.window === undefined) {
this.window = new OptionsWindow({ app: this.app });
this.window.render();
}
this.window.show();
};
export default OptionsEvent;