UI改版。

This commit is contained in:
liteng 2018-11-09 07:54:15 +08:00
parent 4e5fa0834c
commit 425e243987
49 changed files with 119 additions and 4 deletions

View File

@ -8,7 +8,7 @@ export default {
indent: '\t',
format: 'umd',
name: 'Shadow',
file: 'ShadowEditor.UI/dist/ShadowUI.js'
file: 'ShadowEditor.UI/dist/ShadowEditor.UI.js'
},
treeshake: true,
external: [],

View File

@ -1,7 +1,12 @@
import '../assets/css/main.css';
import UI from './UI';
// root
import './root/HtmlDom';
window.UI = UI;
// metadata
import './metadata/Link';
import './metadata/Meta';
import './metadata/Style';
import './metadata/Title';
export { default as UI } from './UI';
export { Control, UI } from './third_party';

View File

@ -0,0 +1,21 @@
import { Control, UI } from '../third_party';
/**
* Link
* @author tengge / https://github.com/tengge1
* @param {*} options
*/
function Link(options = {}) {
Control.call(this, options);
}
Link.prototype = Object.create(Control.prototype);
Link.prototype.constructor = Link;
Link.prototype.render = function () {
this.renderDom(this.createElement('link'));
};
UI.addXType('link', Link);
export default Link;

View File

@ -0,0 +1,21 @@
import { Control, UI } from '../third_party';
/**
* Meta
* @author tengge / https://github.com/tengge1
* @param {*} options
*/
function Meta(options = {}) {
Control.call(this, options);
}
Meta.prototype = Object.create(Control.prototype);
Meta.prototype.constructor = Meta;
Meta.prototype.render = function () {
this.renderDom(this.createElement('meta'));
};
UI.addXType('meta', Meta);
export default Meta;

View File

@ -0,0 +1,21 @@
import { Control, UI } from '../third_party';
/**
* Style
* @author tengge / https://github.com/tengge1
* @param {*} options
*/
function Style(options = {}) {
Control.call(this, options);
}
Style.prototype = Object.create(Control.prototype);
Style.prototype.constructor = Style;
Style.prototype.render = function () {
this.renderDom(this.createElement('style'));
};
UI.addXType('style', Style);
export default Style;

View File

@ -0,0 +1,21 @@
import { Control, UI } from '../third_party';
/**
* Title
* @author tengge / https://github.com/tengge1
* @param {*} options
*/
function Title(options = {}) {
Control.call(this, options);
}
Title.prototype = Object.create(Control.prototype);
Title.prototype.constructor = Title;
Title.prototype.render = function () {
this.renderDom(this.createElement('title'));
};
UI.addXType('title', Title);
export default Title;

View File

@ -0,0 +1,21 @@
import { Control, UI } from '../third_party';
/**
* HtmlDom
* @author tengge / https://github.com/tengge1
* @param {*} options
*/
function HtmlDom(options = {}) {
Control.call(this, options);
}
HtmlDom.prototype = Object.create(Control.prototype);
HtmlDom.prototype.constructor = HtmlDom;
HtmlDom.prototype.render = function () {
this.renderDom(this.createElement('html'));
};
UI.addXType('dom', HtmlDom);
export default HtmlDom;

View File

@ -0,0 +1,5 @@
import { Control, Manager } from '@tengge1/xtype.js';
const UI = new Manager();
export { Control, UI };