|
|
|
/**
|
|
|
|
* guy a元素
|
|
|
|
* @class BI.Link
|
|
|
|
* @extends BI.Text
|
|
|
|
*/
|
|
|
|
import { shortcut, extend } from "../../../core";
|
|
|
|
import { Label } from "../label/label";
|
|
|
|
|
|
|
|
@shortcut()
|
|
|
|
export class Link extends Label {
|
|
|
|
static xtype = "bi.link";
|
|
|
|
|
|
|
|
_defaultConfig() {
|
|
|
|
const conf = super._defaultConfig(...arguments);
|
|
|
|
|
|
|
|
return extend(conf, {
|
|
|
|
baseCls: (conf.baseCls || "") + " bi-link display-block",
|
|
|
|
tagName: "a",
|
|
|
|
href: "",
|
|
|
|
target: "_blank",
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
_createJson() {
|
|
|
|
const { textAlign, whiteSpace, textHeight, text, keyword, value, py, href, target } = this.options;
|
|
|
|
|
|
|
|
return {
|
|
|
|
type: "bi.a",
|
|
|
|
textAlign,
|
|
|
|
whiteSpace,
|
|
|
|
lineHeight: textHeight,
|
|
|
|
text,
|
|
|
|
keyword,
|
|
|
|
value,
|
|
|
|
py,
|
|
|
|
href,
|
|
|
|
target,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|