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.
42 lines
908 B
42 lines
908 B
import { A } from "../a/a"; |
|
import { Label } from "../label/label"; |
|
import { shortcut, extend } from "@/core"; |
|
|
|
/** |
|
* guy a元素 |
|
* @class Link |
|
* @extends Text |
|
*/ |
|
|
|
@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: A.xtype, |
|
textAlign, |
|
whiteSpace, |
|
lineHeight: textHeight, |
|
text, |
|
keyword, |
|
value, |
|
py, |
|
href, |
|
target, |
|
}; |
|
} |
|
}
|
|
|