forked from fanruan/fineui
Browse Source
* commit '13bd30b321df8e81a82932d8c42bd22c8485b518': (232 commits) Update src/less/lib/constant.less chore: 去掉ie6-8字体支持 REPORT-73699 fix: 允许编辑时外部传递进来的text可能是一个方法 无JIRA 修改配置 auto upgrade version to 2.0.20220617213406 无JIRA 同步 无JIRA任务 simple auto upgrade version to 2.0.20220617172333 无JIRA 同步 auto upgrade version to 2.0.20220617145310 无JIRA 同步 无JIRA任务 暗色系popover头背景 auto upgrade version to 2.0.20220617120359 auto upgrade version to 2.0.20220617115451 auto upgrade version to 2.0.20220617114413 DESIGN-3918 feat: 拓展box-shadow,允许配置常量一样自定义个阴影效果 无JIRA 同步 无JIRA任务 同步lessconfig auto upgrade version to 2.0.20220616223849 无JIRA任务 simple ...research/test
superman
2 years ago
157 changed files with 2544 additions and 1432 deletions
Binary file not shown.
Before Width: | Height: | Size: 632 KiB After Width: | Height: | Size: 673 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,169 +1,212 @@
|
||||
/** |
||||
* 文字类型的按钮 |
||||
* @class BI.Button |
||||
* @extends BI.BasicButton |
||||
* |
||||
* @cfg {JSON} options 配置属性 |
||||
* @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 |
||||
*/ |
||||
BI.Button = BI.inherit(BI.BasicButton, { |
||||
(function () { |
||||
function isVertical(position) { |
||||
return position === "top" || position === "bottom"; |
||||
} |
||||
|
||||
/** |
||||
* 文字类型的按钮 |
||||
* @class BI.Button |
||||
* @extends BI.BasicButton |
||||
* |
||||
* @cfg {JSON} options 配置属性 |
||||
* @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 |
||||
*/ |
||||
BI.Button = BI.inherit(BI.BasicButton, { |
||||
|
||||
_const: { |
||||
iconWidth: 18 |
||||
}, |
||||
_const: { |
||||
iconWidth: 16 |
||||
}, |
||||
|
||||
_defaultConfig: function (props) { |
||||
var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); |
||||
return BI.extend(conf, { |
||||
baseCls: (conf.baseCls || "") + " bi-button" + ((BI.isIE() && BI.isIE9Below()) ? " hack" : ""), |
||||
attributes: { |
||||
tabIndex: 1 |
||||
}, |
||||
minWidth: (props.block === true || props.clear === true) ? 0 : 80, |
||||
height: 24, |
||||
shadow: props.clear !== true, |
||||
isShadowShowingOnSelected: true, |
||||
readonly: true, |
||||
iconCls: "", |
||||
level: "common", |
||||
block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制
|
||||
clear: false, // 是否去掉边框和背景
|
||||
ghost: false, // 是否幽灵显示, 即正常状态无背景
|
||||
textAlign: "center", |
||||
whiteSpace: "nowrap", |
||||
textWidth: null, |
||||
textHeight: null, |
||||
hgap: props.clear ? 0 : 10, |
||||
vgap: 0, |
||||
tgap: 0, |
||||
bgap: 0, |
||||
lgap: 0, |
||||
rgap: 0 |
||||
}); |
||||
}, |
||||
_defaultConfig: function (props) { |
||||
var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); |
||||
|
||||
render: function () { |
||||
var o = this.options, self = this; |
||||
return BI.extend(conf, { |
||||
baseCls: (conf.baseCls || "") + " bi-button" + ((BI.isIE() && BI.isIE9Below()) ? " hack" : ""), |
||||
attributes: { |
||||
tabIndex: 1 |
||||
}, |
||||
minWidth: (props.block === true || props.clear === true) ? 0 : 80, |
||||
// 44 = 垂直间距 6 + 边框 2 + 图标 16 + 图标和文字间隔 8 + 文字 12
|
||||
height: isVertical(props.iconPosition) ? 44 + ((props.iconGap || 8) - 8) : 24, |
||||
shadow: props.clear !== true, |
||||
isShadowShowingOnSelected: true, |
||||
readonly: true, |
||||
iconCls: "", |
||||
level: "common", |
||||
block: false, // 是否块状显示,即不显示边框,没有最小宽度的限制
|
||||
clear: false, // 是否去掉边框和背景
|
||||
ghost: false, // 是否幽灵显示, 即正常状态无背景
|
||||
loading: false, // 是否处于加载中
|
||||
light: false, // 是否使用浅色
|
||||
textAlign: "center", |
||||
whiteSpace: "nowrap", |
||||
textWidth: null, |
||||
textHeight: null, |
||||
hgap: props.clear ? 0 : 10, |
||||
vgap: 0, |
||||
tgap: 0, |
||||
bgap: 0, |
||||
lgap: 0, |
||||
rgap: 0, |
||||
iconGap: 8, |
||||
iconPosition: "left" |
||||
}); |
||||
}, |
||||
|
||||
// 由于button默认情况下有个边框,所以要主动算行高
|
||||
var lineHeight, textHeight = o.textHeight; |
||||
if (BI.isNumber(o.height)) { |
||||
if (o.clear || o.block) { |
||||
lineHeight = o.height; |
||||
render: function () { |
||||
var o = this.options; |
||||
|
||||
// 由于button默认情况下有个边框,所以要主动算行高
|
||||
var lineHeight, textHeight = o.textHeight; |
||||
if (BI.isNumber(o.height)) { |
||||
if (!isVertical(o.iconPosition)) { |
||||
if (o.clear || o.block || o.light) { |
||||
lineHeight = o.height; |
||||
} else { |
||||
lineHeight = o.height - 2; |
||||
} |
||||
} else { |
||||
lineHeight = textHeight; |
||||
} |
||||
} |
||||
if (!textHeight) { |
||||
if (o.whiteSpace === "nowrap") { |
||||
textHeight = lineHeight; |
||||
} |
||||
} |
||||
if (BI.isKey(o.iconCls)) { |
||||
this.icon = BI.createWidget({ |
||||
type: "bi.icon_label", |
||||
cls: o.iconCls, |
||||
width: this._const.iconWidth, |
||||
height: lineHeight, |
||||
lineHeight: lineHeight |
||||
}); |
||||
this.text = BI.createWidget({ |
||||
type: "bi.label", |
||||
text: o.text, |
||||
textWidth: BI.isNotNull(o.textWidth) ? o.textWidth - this._const.iconWidth : null, |
||||
textHeight: textHeight, |
||||
height: lineHeight, |
||||
value: o.value |
||||
}); |
||||
var layoutType = "bi.horizontal"; |
||||
var gapContainer = { |
||||
lgap: o.iconPosition === "left" && o.text ? o.iconGap : 0, |
||||
rgap: o.iconPosition === "right" ? o.iconGap : 0, |
||||
tgap: o.iconPosition === "top" ? o.iconGap : 0, |
||||
bgap: o.iconPosition === "bottom" ? o.iconGap : 0 |
||||
}; |
||||
var items = [this.icon, BI.extend({el: this.text}, gapContainer)]; |
||||
if (isVertical(o.iconPosition)) { |
||||
layoutType = "bi.vertical"; |
||||
} |
||||
if (o.iconPosition === "right" || o.iconPosition === "bottom") { |
||||
items = [BI.extend({el: this.text}, gapContainer), this.icon]; |
||||
} |
||||
BI.createWidget({ |
||||
type: "bi.center_adapt", |
||||
element: this, |
||||
hgap: o.hgap, |
||||
vgap: o.vgap, |
||||
items: [{ |
||||
type: layoutType, |
||||
horizontalAlign: "center", |
||||
verticalAlign: "middle", |
||||
items: items |
||||
}] |
||||
}); |
||||
} else { |
||||
lineHeight = o.height - 2; |
||||
this.text = BI.createWidget({ |
||||
type: "bi.label", |
||||
height: o.height, |
||||
textAlign: o.textAlign, |
||||
whiteSpace: o.whiteSpace, |
||||
textWidth: o.textWidth, |
||||
textHeight: textHeight, |
||||
hgap: o.hgap, |
||||
vgap: o.vgap, |
||||
tgap: o.tgap, |
||||
bgap: o.bgap, |
||||
lgap: o.lgap, |
||||
rgap: o.rgap, |
||||
element: this, |
||||
text: o.text, |
||||
value: o.value |
||||
}); |
||||
} |
||||
} |
||||
if (!textHeight) { |
||||
if (o.whiteSpace === "nowrap") { |
||||
textHeight = lineHeight; |
||||
if (o.block === true) { |
||||
this.element.addClass("block"); |
||||
} |
||||
} |
||||
if (BI.isKey(o.iconCls)) { |
||||
this.icon = BI.createWidget({ |
||||
type: "bi.icon_label", |
||||
cls: o.iconCls, |
||||
width: this._const.iconWidth, |
||||
height: lineHeight, |
||||
lineHeight: lineHeight, |
||||
iconWidth: o.iconWidth, |
||||
iconHeight: o.iconHeight |
||||
}); |
||||
this.text = BI.createWidget({ |
||||
type: "bi.label", |
||||
text: o.text, |
||||
textWidth: BI.isNotNull(o.textWidth) ? o.textWidth - this._const.iconWidth : null, |
||||
textHeight: textHeight, |
||||
height: lineHeight, |
||||
value: o.value |
||||
}); |
||||
BI.createWidget({ |
||||
type: "bi.center_adapt", |
||||
element: this, |
||||
hgap: o.hgap, |
||||
vgap: o.vgap, |
||||
items: [{ |
||||
type: "bi.horizontal", |
||||
columnSize: ["", "fill"], |
||||
items: [this.icon, this.text] |
||||
}] |
||||
}); |
||||
} else { |
||||
this.text = BI.createWidget({ |
||||
type: "bi.label", |
||||
height: o.height, |
||||
textAlign: o.textAlign, |
||||
whiteSpace: o.whiteSpace, |
||||
textWidth: o.textWidth, |
||||
textHeight: textHeight, |
||||
hgap: o.hgap, |
||||
vgap: o.vgap, |
||||
tgap: o.tgap, |
||||
bgap: o.bgap, |
||||
lgap: o.lgap, |
||||
rgap: o.rgap, |
||||
element: this, |
||||
text: o.text, |
||||
value: o.value |
||||
}); |
||||
} |
||||
if (o.block === true) { |
||||
this.element.addClass("block"); |
||||
} |
||||
if (o.clear === true) { |
||||
this.element.addClass("clear"); |
||||
} |
||||
if (o.ghost === true) { |
||||
this.element.addClass("ghost"); |
||||
} |
||||
if (o.minWidth > 0) { |
||||
this.element.css({"min-width": o.minWidth / BI.pixRatio + BI.pixUnit}); |
||||
} |
||||
}, |
||||
if (o.clear === true) { |
||||
this.element.addClass("clear"); |
||||
} |
||||
if (o.ghost === true) { |
||||
this.element.addClass("ghost"); |
||||
} |
||||
if (o.loading === true) { |
||||
this.element.addClass("loading"); |
||||
} |
||||
if (o.light === true) { |
||||
this.element.addClass("light"); |
||||
} |
||||
if (o.minWidth > 0) { |
||||
this.element.css({"min-width": o.minWidth / BI.pixRatio + BI.pixUnit}); |
||||
} |
||||
}, |
||||
|
||||
doClick: function () { |
||||
BI.Button.superclass.doClick.apply(this, arguments); |
||||
if (this.isValid()) { |
||||
this.fireEvent(BI.Button.EVENT_CHANGE, this); |
||||
} |
||||
}, |
||||
doClick: function () { |
||||
BI.Button.superclass.doClick.apply(this, arguments); |
||||
if (this.isValid()) { |
||||
this.fireEvent(BI.Button.EVENT_CHANGE, this); |
||||
} |
||||
}, |
||||
|
||||
_setEnable: function (enable) { |
||||
BI.Button.superclass._setEnable.apply(this, arguments); |
||||
if (enable === true) { |
||||
this.element.attr("tabIndex", 1); |
||||
} else if (enable === false) { |
||||
this.element.removeAttr("tabIndex"); |
||||
} |
||||
}, |
||||
_setEnable: function (enable) { |
||||
BI.Button.superclass._setEnable.apply(this, arguments); |
||||
if (enable === true) { |
||||
this.element.attr("tabIndex", 1); |
||||
} else if (enable === false) { |
||||
this.element.removeAttr("tabIndex"); |
||||
} |
||||
}, |
||||
|
||||
setText: function (text) { |
||||
BI.Button.superclass.setText.apply(this, arguments); |
||||
this.text.setText(text); |
||||
}, |
||||
setLoading: function (loading) { |
||||
if (loading) { |
||||
this.element.addClass("loading"); |
||||
} else { |
||||
this.element.removeClass("loading"); |
||||
} |
||||
}, |
||||
|
||||
setValue: function (text) { |
||||
BI.Button.superclass.setValue.apply(this, arguments); |
||||
if (!this.isReadOnly()) { |
||||
this.text.setValue(text); |
||||
} |
||||
}, |
||||
setText: function (text) { |
||||
BI.Button.superclass.setText.apply(this, arguments); |
||||
this.text.setText(text); |
||||
}, |
||||
|
||||
doRedMark: function () { |
||||
this.text.doRedMark.apply(this.text, arguments); |
||||
}, |
||||
setValue: function (text) { |
||||
BI.Button.superclass.setValue.apply(this, arguments); |
||||
if (!this.isReadOnly()) { |
||||
this.text.setValue(text); |
||||
} |
||||
}, |
||||
|
||||
unRedMark: function () { |
||||
this.text.unRedMark.apply(this.text, arguments); |
||||
}, |
||||
doRedMark: function () { |
||||
this.text.doRedMark.apply(this.text, arguments); |
||||
}, |
||||
|
||||
doHighLight: function () { |
||||
this.text.doHighLight.apply(this.text, arguments); |
||||
}, |
||||
unRedMark: function () { |
||||
this.text.unRedMark.apply(this.text, arguments); |
||||
}, |
||||
|
||||
unHighLight: function () { |
||||
this.text.unHighLight.apply(this.text, arguments); |
||||
} |
||||
}); |
||||
BI.shortcut("bi.button", BI.Button); |
||||
BI.Button.EVENT_CHANGE = "EVENT_CHANGE"; |
||||
doHighLight: function () { |
||||
this.text.doHighLight.apply(this.text, arguments); |
||||
}, |
||||
|
||||
unHighLight: function () { |
||||
this.text.unHighLight.apply(this.text, arguments); |
||||
} |
||||
}); |
||||
BI.shortcut("bi.button", BI.Button); |
||||
BI.Button.EVENT_CHANGE = "EVENT_CHANGE"; |
||||
}()); |
||||
|
@ -0,0 +1,282 @@
|
||||
/** |
||||
* dailer |
||||
* 有默认提示文字的输入框 |
||||
* @class BI.DefaultTextEditor |
||||
* @extends BI.Widget |
||||
*/ |
||||
BI.DefaultTextEditor = BI.inherit(BI.Widget, { |
||||
props: function () { |
||||
return { |
||||
baseCls: "bi-default-text-editor", |
||||
hgap: 4, |
||||
vgap: 2, |
||||
lgap: 0, |
||||
rgap: 0, |
||||
tgap: 0, |
||||
bgap: 0, |
||||
validationChecker: BI.emptyFn, |
||||
quitChecker: BI.emptyFn, |
||||
allowBlank: true, |
||||
watermark: "", |
||||
errorText: "", |
||||
height: 24, |
||||
defaultText: "", // 默认显示值,默认显示值与显示值的区别是默认显示值标记灰色
|
||||
text: "", // 显示值
|
||||
el: {} |
||||
}; |
||||
}, |
||||
|
||||
render: function () { |
||||
var self = this, o = this.options; |
||||
this.editor = BI.createWidget(o.el, { |
||||
type: "bi.editor", |
||||
simple: o.simple, |
||||
height: o.height, |
||||
hgap: o.hgap, |
||||
vgap: o.vgap, |
||||
lgap: o.lgap, |
||||
rgap: o.rgap, |
||||
tgap: o.tgap, |
||||
bgap: o.bgap, |
||||
value: o.value, |
||||
validationChecker: o.validationChecker, |
||||
quitChecker: o.quitChecker, |
||||
allowBlank: o.allowBlank, |
||||
watermark: o.watermark, |
||||
errorText: o.errorText, |
||||
invisible: true, |
||||
}); |
||||
this.text = BI.createWidget({ |
||||
type: "bi.text_button", |
||||
cls: BI.isKey(o.text) ? "tip-text-style" : "bi-water-mark tip-text-style", |
||||
textAlign: "left", |
||||
height: o.height, |
||||
text: BI.isKey(o.text) ? o.text : o.defaultText, |
||||
hgap: o.hgap + 2, |
||||
handler: function () { |
||||
self._showInput(); |
||||
self.editor.focus(); |
||||
self.editor.setValue(""); |
||||
}, |
||||
title: o.title, |
||||
warningTitle: o.warningTitle, |
||||
tipType: o.tipType |
||||
}); |
||||
this.text.on(BI.TextButton.EVENT_CHANGE, function () { |
||||
BI.nextTick(function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_CLICK_LABEL); |
||||
}); |
||||
}); |
||||
|
||||
this.editor.on(BI.Controller.EVENT_CHANGE, function () { |
||||
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_FOCUS, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_FOCUS, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_BLUR, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_BLUR, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_CLICK, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_CLICK, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_CHANGE, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_CHANGE, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_KEY_DOWN, function (v) { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_KEY_DOWN, arguments); |
||||
}); |
||||
|
||||
this.editor.on(BI.Editor.EVENT_VALID, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_VALID, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_CONFIRM, function () { |
||||
self._showHint(); |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_CONFIRM, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_CHANGE_CONFIRM, function () { |
||||
self._showHint(); |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_CHANGE_CONFIRM, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_START, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_START, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_PAUSE, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_PAUSE, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_STOP, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_STOP, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_SPACE, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_SPACE, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_ERROR, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_ERROR, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_ENTER, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_ENTER, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_RESTRICT, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_RESTRICT, arguments); |
||||
}); |
||||
this.editor.on(BI.Editor.EVENT_EMPTY, function () { |
||||
self.fireEvent(BI.DefaultTextEditor.EVENT_EMPTY, arguments); |
||||
}); |
||||
|
||||
return { |
||||
type: "bi.absolute", |
||||
items: [ |
||||
{ |
||||
el: this.editor, |
||||
left: 0, |
||||
right: 0, |
||||
top: 0, |
||||
bottom: 0 |
||||
}, { |
||||
el: this.text, |
||||
left: 0, |
||||
right: 0, |
||||
top: 0, |
||||
bottom: 0 |
||||
} |
||||
] |
||||
}; |
||||
}, |
||||
|
||||
setWaterMark: function (v) { |
||||
this.options.watermark = v; |
||||
this.editor.setWaterMark(v); |
||||
}, |
||||
|
||||
setTitle: function (title) { |
||||
this.text.setTitle(title); |
||||
}, |
||||
|
||||
setWarningTitle: function (title) { |
||||
this.text.setWarningTitle(title); |
||||
}, |
||||
|
||||
doRedMark: function () { |
||||
if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { |
||||
return; |
||||
} |
||||
this.text.doRedMark.apply(this.text, arguments); |
||||
}, |
||||
|
||||
unRedMark: function () { |
||||
this.text.unRedMark.apply(this.text, arguments); |
||||
}, |
||||
|
||||
doHighLight: function () { |
||||
if (this.editor.getValue() === "" && BI.isKey(this.options.watermark)) { |
||||
return; |
||||
} |
||||
this.text.doHighLight.apply(this.text, arguments); |
||||
}, |
||||
|
||||
unHighLight: function () { |
||||
this.text.unHighLight.apply(this.text, arguments); |
||||
}, |
||||
|
||||
focus: function () { |
||||
if (this.options.disabled === false) { |
||||
this._showInput(); |
||||
this.editor.focus(); |
||||
} |
||||
}, |
||||
|
||||
blur: function () { |
||||
this.editor.blur(); |
||||
this._showHint(); |
||||
}, |
||||
|
||||
_showInput: function () { |
||||
this.editor.visible(); |
||||
this.text.invisible(); |
||||
}, |
||||
|
||||
_showHint: function () { |
||||
this.editor.invisible(); |
||||
this.text.visible(); |
||||
}, |
||||
|
||||
_setText: function (v) { |
||||
this.text.setText(v); |
||||
this.text.setTitle(v); |
||||
}, |
||||
|
||||
isValid: function () { |
||||
return this.editor.isValid(); |
||||
}, |
||||
|
||||
setErrorText: function (text) { |
||||
this.editor.setErrorText(text); |
||||
}, |
||||
|
||||
getErrorText: function () { |
||||
return this.editor.getErrorText(); |
||||
}, |
||||
|
||||
isEditing: function () { |
||||
return this.editor.isEditing(); |
||||
}, |
||||
|
||||
getLastValidValue: function () { |
||||
return this.editor.getLastValidValue(); |
||||
}, |
||||
|
||||
getLastChangedValue: function () { |
||||
return this.editor.getLastChangedValue(); |
||||
}, |
||||
|
||||
setValue: function (k) { |
||||
this.editor.setValue(k); |
||||
}, |
||||
|
||||
getValue: function () { |
||||
return this.editor.getValue(); |
||||
}, |
||||
|
||||
getState: function () { |
||||
return this.text.getValue(); |
||||
}, |
||||
|
||||
setState: function (v) { |
||||
var o = this.options; |
||||
if (BI.isKey(v)) { |
||||
this.text.setText(v); |
||||
this.text.element.removeClass("bi-water-mark"); |
||||
return; |
||||
} |
||||
this.text.setText(o.defaultText); |
||||
this.text.element.addClass("bi-water-mark"); |
||||
}, |
||||
|
||||
setTipType: function (v) { |
||||
this.text.options.tipType = v; |
||||
}, |
||||
|
||||
getText: function () { |
||||
return this.text.getText(); |
||||
} |
||||
}); |
||||
BI.DefaultTextEditor.EVENT_CHANGE = "EVENT_CHANGE"; |
||||
BI.DefaultTextEditor.EVENT_FOCUS = "EVENT_FOCUS"; |
||||
BI.DefaultTextEditor.EVENT_BLUR = "EVENT_BLUR"; |
||||
BI.DefaultTextEditor.EVENT_CLICK = "EVENT_CLICK"; |
||||
BI.DefaultTextEditor.EVENT_KEY_DOWN = "EVENT_KEY_DOWN"; |
||||
BI.DefaultTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL"; |
||||
|
||||
BI.DefaultTextEditor.EVENT_START = "EVENT_START"; |
||||
BI.DefaultTextEditor.EVENT_PAUSE = "EVENT_PAUSE"; |
||||
BI.DefaultTextEditor.EVENT_STOP = "EVENT_STOP"; |
||||
BI.DefaultTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM"; |
||||
BI.DefaultTextEditor.EVENT_CHANGE_CONFIRM = "EVENT_CHANGE_CONFIRM"; |
||||
BI.DefaultTextEditor.EVENT_VALID = "EVENT_VALID"; |
||||
BI.DefaultTextEditor.EVENT_ERROR = "EVENT_ERROR"; |
||||
BI.DefaultTextEditor.EVENT_ENTER = "EVENT_ENTER"; |
||||
BI.DefaultTextEditor.EVENT_RESTRICT = "EVENT_RESTRICT"; |
||||
BI.DefaultTextEditor.EVENT_SPACE = "EVENT_SPACE"; |
||||
BI.DefaultTextEditor.EVENT_EMPTY = "EVENT_EMPTY"; |
||||
|
||||
BI.shortcut("bi.default_text_editor", BI.DefaultTextEditor); |
@ -1,33 +1,19 @@
|
||||
@import "../../index.less"; |
||||
@val: transform .3s ease; |
||||
.bi-search-text-value-combo{ |
||||
& .trigger-icon-button{ |
||||
|
||||
.bi-search-text-value-combo { |
||||
& .trigger-icon-button { |
||||
font-size: 16px; |
||||
} |
||||
& .search-text-value-trigger{ |
||||
.border-radius(2px); |
||||
} |
||||
|
||||
&.combo-error { |
||||
& .bi-search-text-value-trigger{ |
||||
& .bi-search-text-value-trigger { |
||||
& .bi-text-button { |
||||
color: @color-bi-text-error-hover-search-text-value-combo; |
||||
} |
||||
} |
||||
&>.bi-border, &>.bi-border-bottom { |
||||
|
||||
&.bi-border, &.bi-border-bottom { |
||||
border-color: @border-color-negative; |
||||
} |
||||
} |
||||
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下 |
||||
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button { |
||||
& .x-icon { |
||||
.rotate(180deg); |
||||
.transition(@val); |
||||
} |
||||
} |
||||
& .bi-combo + .bi-trigger-icon-button { |
||||
& .x-icon { |
||||
.rotate(0deg); |
||||
.transition(@val); |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,14 +0,0 @@
|
||||
@import "../../index.less"; |
||||
|
||||
.bi-text-value-combo { |
||||
&.combo-error { |
||||
& .bi-select-text-trigger { |
||||
& .select-text-label { |
||||
color: @color-bi-text-error-hover-text-value-combo; |
||||
} |
||||
} |
||||
&.bi-border, &.bi-border-bottom { |
||||
border-color: @border-color-negative; |
||||
} |
||||
} |
||||
} |
@ -1,22 +1,28 @@
|
||||
@import "../../../index.less"; |
||||
|
||||
.bi-toast{ |
||||
.bi-toast { |
||||
color: @color-bi-color-toast-text; |
||||
line-height: @font-size-16; |
||||
.border-radius(2px); |
||||
&.toast-success{ |
||||
.box-shadow(@box-shadow-toast) ; |
||||
|
||||
&.toast-success { |
||||
background: @color-bi-background-toast-success; |
||||
} |
||||
&.toast-warning{ |
||||
|
||||
&.toast-warning { |
||||
background: @color-bi-background-toast-warning; |
||||
} |
||||
&.toast-error{ |
||||
|
||||
&.toast-error { |
||||
background: @color-bi-background-toast-error; |
||||
} |
||||
&.toast-normal, &.toast-common{ |
||||
|
||||
&.toast-normal, &.toast-common, &.toast-loading { |
||||
background: @color-bi-background-toast-normal; |
||||
} |
||||
& .toast-icon{ |
||||
|
||||
& .toast-icon { |
||||
font-size: @font-size-16; |
||||
} |
||||
} |
||||
|
@ -1,28 +1,36 @@
|
||||
@import "../../index.less"; |
||||
@import "../../image.less"; |
||||
@import "../../lib/icon.less"; |
||||
.bi-tree-expander-popup.line:before { |
||||
position: absolute; |
||||
content: ""; |
||||
height: 100%; |
||||
width: 24px; |
||||
.imagePath(@icon-tree-vertical-line-1, 0, 0, repeat-y); |
||||
} |
||||
|
||||
.bi-tree-expander-popup.line.solid:before { |
||||
.imagePath(@icon-tree-solid-vertical-line-1, 0, 0, repeat-y); |
||||
width: 24px; |
||||
left: 8px; |
||||
.bi-tree-expander-popup.line { |
||||
|
||||
&:after { |
||||
border-left: 1px dashed @border-color-dark-gray-line; |
||||
position: absolute; |
||||
content: ""; |
||||
height: 100%; |
||||
left: -1px; |
||||
top: 0; |
||||
} |
||||
|
||||
&.solid:after { |
||||
border-left: 1px solid @border-color-dark-gray-line; |
||||
} |
||||
} |
||||
|
||||
.bi-theme-dark { |
||||
.bi-tree-expander-popup.line:before { |
||||
width: 24px; |
||||
.imagePath(@icon-tree-vertical-line-1-theme-dark, 0, 0, repeat-y); |
||||
} |
||||
.bi-tree-expander-popup.line.solid:before { |
||||
.imagePath(@icon-tree-solid-vertical-line-1-theme-dark, 0, 0, repeat-y); |
||||
width: 24px; |
||||
left: 8px; |
||||
.bi-tree-expander-popup.line { |
||||
|
||||
&:after { |
||||
border-left: 1px dashed @border-color-dark-gray-line-theme-dark; |
||||
position: absolute; |
||||
content: ""; |
||||
height: 100%; |
||||
left: -1px; |
||||
top: 0; |
||||
} |
||||
|
||||
&.solid:after { |
||||
border-left: 1px solid @border-color-dark-gray-line-theme-dark; |
||||
} |
||||
} |
||||
} |
||||
|
@ -0,0 +1,15 @@
|
||||
@import "../../index.less"; |
||||
|
||||
.bi-search-text-value-trigger { |
||||
&.error .select-text-label { |
||||
color: @color-bi-text-error-text-trigger; |
||||
} |
||||
|
||||
.clear-button { |
||||
display: none; |
||||
} |
||||
|
||||
&:hover .clear-button { |
||||
display: block; |
||||
} |
||||
} |
@ -0,0 +1,15 @@
|
||||
@import "../../index.less"; |
||||
|
||||
.bi-text-trigger { |
||||
&.error .select-text-label { |
||||
color: @color-bi-text-error-text-trigger; |
||||
} |
||||
|
||||
.clear-button { |
||||
display: none; |
||||
} |
||||
|
||||
&:hover .clear-button { |
||||
display: block; |
||||
} |
||||
} |
@ -1,20 +1,24 @@
|
||||
@import "../../index.less"; |
||||
@val: transform .3s ease; |
||||
|
||||
.bi-multilayer-select-tree-combo { |
||||
& .trigger-icon-button{ |
||||
font-size: @font-size-16; |
||||
} |
||||
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下 |
||||
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button { |
||||
& .x-icon { |
||||
.rotate(180deg); |
||||
.transition(@val); |
||||
|
||||
&.status-error { |
||||
&.bi-border, &.bi-border-bottom { |
||||
border-color: @border-color-negative; |
||||
} |
||||
|
||||
.bi-trigger .select-text-label, .tip-text-style { |
||||
color: @color-bi-text-error-text-trigger; |
||||
} |
||||
} |
||||
& .bi-combo + .bi-trigger-icon-button { |
||||
& .x-icon { |
||||
.rotate(0deg); |
||||
.transition(@val); |
||||
|
||||
&.status-warning { |
||||
&.bi-border, &.bi-border-bottom { |
||||
border-color: @border-color-warning; |
||||
} |
||||
|
||||
.bi-trigger .select-text-label { |
||||
color: @font-color-warning; |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,20 +1,23 @@
|
||||
@import "../../index.less"; |
||||
@val: transform .3s ease; |
||||
|
||||
.bi-multilayer-single-tree-combo { |
||||
& .trigger-icon-button{ |
||||
font-size: @font-size-16; |
||||
} |
||||
// 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下 |
||||
& .bi-combo.bi-combo-popup + .bi-trigger-icon-button { |
||||
& .x-icon { |
||||
.rotate(180deg); |
||||
.transition(@val); |
||||
&.status-error { |
||||
&.bi-border, &.bi-border-bottom { |
||||
border-color: @border-color-negative; |
||||
} |
||||
|
||||
.bi-trigger .select-text-label, .tip-text-style { |
||||
color: @color-bi-text-error-text-trigger; |
||||
} |
||||
} |
||||
& .bi-combo + .bi-trigger-icon-button { |
||||
& .x-icon { |
||||
.rotate(0deg); |
||||
.transition(@val); |
||||
|
||||
&.status-warning { |
||||
&.bi-border, &.bi-border-bottom { |
||||
border-color: @border-color-warning; |
||||
} |
||||
|
||||
.bi-trigger .select-text-label { |
||||
color: @font-color-warning; |
||||
} |
||||
} |
||||
} |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue