mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 10:59:42 +08:00
优化 combo 的 tabs 模式样式 (#1456)
* 优化 combo 的 tabs 模式样式 * empty 文案没翻译问题修复 * 换成 div
This commit is contained in:
parent
02250cd033
commit
856c5a82f2
@ -68,9 +68,13 @@
|
||||
&-tab-delBtn {
|
||||
color: var(--icon-color);
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
right: 4px;
|
||||
margin-left: var(--gap-sm);
|
||||
display: inline-block;
|
||||
|
||||
> svg {
|
||||
width: px2rem(11px);
|
||||
height: px2rem(11px);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--icon-onHover-color);
|
||||
@ -257,6 +261,9 @@
|
||||
|
||||
.#{$ns}ComboTabs-addLink {
|
||||
float: right;
|
||||
> a svg {
|
||||
margin-right: var(--gap-xs);
|
||||
}
|
||||
}
|
||||
|
||||
.#{$ns}Combo-dragableTip {
|
||||
|
@ -147,6 +147,7 @@ export class Tabs extends React.Component<TabsProps> {
|
||||
) : (
|
||||
title
|
||||
)}
|
||||
{React.isValidElement(toolbar) ? toolbar : null}
|
||||
</a>
|
||||
{/* svg 来自 https://github.com/adamschwartz/chrome-tabs */}
|
||||
{mode === 'chrome' ? (
|
||||
@ -184,7 +185,6 @@ export class Tabs extends React.Component<TabsProps> {
|
||||
</svg>
|
||||
</div>
|
||||
) : null}
|
||||
{React.isValidElement(toolbar) ? toolbar : null}
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ export default class ComboControl extends React.Component<ComboProps> {
|
||||
deleteIcon: '',
|
||||
tabsMode: false,
|
||||
tabsStyle: '',
|
||||
placeholder: 'empty'
|
||||
placeholder: 'placeholder.empty'
|
||||
};
|
||||
static propsList: Array<string> = [
|
||||
'minLength',
|
||||
@ -1004,7 +1004,7 @@ export default class ComboControl extends React.Component<ComboProps> {
|
||||
evalExpression(itemRemovableOn, value) !== false)
|
||||
) {
|
||||
toolbar = (
|
||||
<a
|
||||
<div
|
||||
onClick={this.removeItem.bind(this, index)}
|
||||
key="remove"
|
||||
className={cx(
|
||||
@ -1018,7 +1018,7 @@ export default class ComboControl extends React.Component<ComboProps> {
|
||||
) : (
|
||||
<Icon icon="close" className="icon" />
|
||||
)}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user