forked from fanruan/fineui
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.
40 lines
893 B
40 lines
893 B
/** |
|
* 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, |
|
}; |
|
} |
|
}
|
|
|