mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
26 lines
595 B
JavaScript
26 lines
595 B
JavaScript
import Control from './Control';
|
|
|
|
/**
|
|
* 水平线
|
|
* @author tengge / https://github.com/tengge1
|
|
* @param {*} options
|
|
*/
|
|
function HorizontalRule(options) {
|
|
Control.call(this, options);
|
|
options = options || {};
|
|
|
|
this.cls = options.cls || 'HorizontalRule';
|
|
};
|
|
|
|
HorizontalRule.prototype = Object.create(Control.prototype);
|
|
HorizontalRule.prototype.constructor = HorizontalRule;
|
|
|
|
HorizontalRule.prototype.render = function () {
|
|
this.dom = document.createElement('hr');
|
|
|
|
this.dom.className = this.cls;
|
|
|
|
this.parent.appendChild(this.dom);
|
|
};
|
|
|
|
export default HorizontalRule; |