源码定义:ext-all-debug.js:58688。分类:基础组件与提示。
创建示例
var component = Ext.create("Ext.tip.Tip", {
xtype: "tip",
alwaysFramed: true,
autoRender: true,
baseCls: Ext.baseCSSPrefix + 'tip',
closeAction: 'hide',
renderTo: Ext.getBody()
});属性
| 属性 | 类型 | 默认值 | 说明 | 配置示例 |
|---|---|---|---|---|
alwaysFramed |
Boolean |
true |
控制是否启用 alwaysFramed 行为。 |
alwaysFramed: true |
autoRender |
Boolean |
true |
控制是否启用 autoRender 行为。 |
autoRender: true |
baseCls |
Mixed |
Ext.baseCSSPrefix + 'tip' |
配置 baseCls 对应的 CSS 类名。 |
baseCls: Ext.baseCSSPrefix + 'tip' |
closeAction |
String |
'hide' |
配置组件的 closeAction 选项。 |
closeAction: 'hide' |
constrainPosition |
Boolean |
true |
控制是否启用 constrainPosition 行为。 |
constrainPosition: true |
defaultAlign |
String |
"tl-bl?" |
配置组件的 defaultAlign 选项。 |
defaultAlign: "tl-bl?" |
floating |
Object |
{ |
配置组件的 floating 选项。 |
floating: { |
focusOnToFront |
Boolean |
false |
控制是否启用 focusOnToFront 行为。 |
focusOnToFront: false |
frameHeader |
Boolean |
false |
控制是否启用 frameHeader 行为。 |
frameHeader: false |
ghost |
Mixed |
undefined |
配置组件的 ghost 选项。 |
ghost: undefined |
hidden |
Boolean |
true |
控制组件初始是否隐藏。 | hidden: true |
maxWidth |
Number |
500 |
配置 maxWidth 限制值。 |
maxWidth: 500 |
minWidth |
Number |
40 |
配置 minWidth 限制值。 |
minWidth: 40 |
shadow |
String |
"sides" |
配置组件的 shadow 选项。 |
shadow: "sides" |
unghost |
Mixed |
undefined |
配置组件的 unghost 选项。 |
unghost: undefined |
方法
| 方法 | 参数 | 说明 | 调用示例 |
|---|---|---|---|
initComponent |
`` | 初始化组件及其子项。 执行时会保留父类默认行为、更新 floating、constrain 状态。源码涉及 callParent()。 |
component.initComponent() |
showAt |
xy |
显示 at。 执行时会保留父类默认行为。源码涉及 callParent()、isVisible()、setPagePosition()、doConstrain()。 |
component.showAt(...) |
initDraggable |
`` | 初始化 draggable。 执行时会更新 draggable 状态。源码涉及 getDragEl()。 |
component.initDraggable() |
事件
源码中未找到该组件自身注册的事件;可监听继承事件。