mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
UI改版。
This commit is contained in:
parent
4e5fa0834c
commit
425e243987
@ -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: [],
|
||||
|
||||
@ -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';
|
||||
21
ShadowEditor.UI/src/metadata/Link.js
Normal file
21
ShadowEditor.UI/src/metadata/Link.js
Normal 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;
|
||||
21
ShadowEditor.UI/src/metadata/Meta.js
Normal file
21
ShadowEditor.UI/src/metadata/Meta.js
Normal 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;
|
||||
21
ShadowEditor.UI/src/metadata/Style.js
Normal file
21
ShadowEditor.UI/src/metadata/Style.js
Normal 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;
|
||||
21
ShadowEditor.UI/src/metadata/Title.js
Normal file
21
ShadowEditor.UI/src/metadata/Title.js
Normal 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;
|
||||
21
ShadowEditor.UI/src/root/HtmlDom.js
Normal file
21
ShadowEditor.UI/src/root/HtmlDom.js
Normal 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;
|
||||
5
ShadowEditor.UI/src/third_party.js
Normal file
5
ShadowEditor.UI/src/third_party.js
Normal file
@ -0,0 +1,5 @@
|
||||
import { Control, Manager } from '@tengge1/xtype.js';
|
||||
|
||||
const UI = new Manager();
|
||||
|
||||
export { Control, UI };
|
||||
Loading…
x
Reference in New Issue
Block a user