wxxsd/UEditor/_src/ui/button.js
(完整代码) 1KB///import core
///import uicore
///import ui/stateful.js
(function (){
var utils = baidu.editor.utils,
UIBase = baidu.editor.ui.UIBase,
Stateful = baidu.editor.ui.Stateful,
Button = baidu.editor.ui.Button = function (options){
this.initOptions(options);
this.initButton();
};
Button.prototype = {
uiName: 'button',
label: '',
title: '',
showIcon: true,
showText: true,
initButton: function (){
this.initUIBase();
this.Stateful_init();
},
getHtmlTpl: function (){
return '<div id="##" class="edui-box %%">' +
'<div id="##_state" stateful>' +
'<div class="%%-wrap"><div id="##_body" unselectable="on" ' + (this.title ? 'title="' + this.title + '"' : '') +
' class="%%-body" onmousedown="return false;" onclick="return $$._onClick();">' +
(this.showIcon ? '<div class="edui-box edui-icon"></div>' : '') +
(this.showText ? '<div class="edui-box edui-label">' + this.label + '</div>' : '') +
'</div>' +
'</div>' +
'</div></div>';
},
postRender: function (){
this.Stateful_postRender();
},
_onClick: function (){
if (!this.isDisabled()) {
this.fireEvent('click');
}
}
};
utils.inherits(Button, UIBase);
utils.extend(Button.prototype, Stateful);
})();
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
