fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
727 B

8 years ago
/**
* 超链接
*
* Created by GUY on 2015/9/9.
* @class BI.A
* @extends BI.Text
* @abstract
*/
2 years ago
import { shortcut } from "../../../core/decorator";
@shortcut()
export class A extends BI.Text {
static xtype = "bi.a";
2 years ago
_defaultConfig() {
const conf = super._defaultConfig(arguments);
2 years ago
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-a display-block",
href: "",
target: "_blank",
el: null,
tagName: "a",
});
}
2 years ago
render() {
const { href, target, el} = this.options;
2 years ago
super.render();
this.element.attr({ href, target });
if (el) {
BI.createWidget(el, {
2 years ago
element: this,
7 years ago
});
2 years ago
}
}
2 years ago
}
8 years ago
2 years ago
BI.extend(BI, { A });