mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
27 lines
505 B
JavaScript
27 lines
505 B
JavaScript
import Control from './Control';
|
|
|
|
/**
|
|
* 原生html
|
|
* @author tengge / https://github.com/tengge1
|
|
* @param {*} options 选项
|
|
*/
|
|
function Html(options) {
|
|
Control.call(this, options);
|
|
options = options || {};
|
|
|
|
this.html = options.html || null;
|
|
}
|
|
|
|
Html.prototype = Object.create(Control.prototype);
|
|
Html.prototype.constructor = Html;
|
|
|
|
/**
|
|
* 渲染控件
|
|
*/
|
|
Html.prototype.render = function () {
|
|
if (this.html) {
|
|
this.parent.innerHTML += this.html;
|
|
}
|
|
};
|
|
|
|
export default Html; |