|
|
@ -6,10 +6,16 @@ |
|
|
|
* @extends BI.Text |
|
|
|
* @extends BI.Text |
|
|
|
* @abstract |
|
|
|
* @abstract |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
BI.A = BI.inherit(BI.Text, { |
|
|
|
import { shortcut } from "../../../core/decorator"; |
|
|
|
_defaultConfig: function () { |
|
|
|
@shortcut() |
|
|
|
var conf = BI.A.superclass._defaultConfig.apply(this, arguments); |
|
|
|
export class A extends BI.Text { |
|
|
|
|
|
|
|
static xtype = "bi.a"; |
|
|
|
|
|
|
|
constructor() { |
|
|
|
|
|
|
|
super(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// TODO:这里如何修改有问题
|
|
|
|
|
|
|
|
_defaultConfig() { |
|
|
|
|
|
|
|
var conf = super._defaultConfig(arguments); |
|
|
|
return BI.extend(conf, { |
|
|
|
return BI.extend(conf, { |
|
|
|
baseCls: (conf.baseCls || "") + " bi-a display-block", |
|
|
|
baseCls: (conf.baseCls || "") + " bi-a display-block", |
|
|
|
href: "", |
|
|
|
href: "", |
|
|
@ -17,18 +23,19 @@ BI.A = BI.inherit(BI.Text, { |
|
|
|
el: null, |
|
|
|
el: null, |
|
|
|
tagName: "a", |
|
|
|
tagName: "a", |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render() { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
BI.A.superclass.render.apply(this, arguments); |
|
|
|
super.render(); |
|
|
|
this.element.attr({ href: o.href, target: o.target }); |
|
|
|
this.element.attr({ href: o.href, target: o.target }); |
|
|
|
if (o.el) { |
|
|
|
if (o.el) { |
|
|
|
BI.createWidget(o.el, { |
|
|
|
BI.createWidget(o.el, { |
|
|
|
element: this, |
|
|
|
element: this, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BI.shortcut("bi.a", BI.A); |
|
|
|
BI.extend(BI, { A }); |
|
|
|