fix: select组件size=lg时展示错误 (#5008)

* fix: select组件size=lg时展示错误 (#4599)
* fix: 修复dev环境 mobile scss加载失败
* chore: update snapshot
This commit is contained in:
meerkat 2022-07-28 21:24:18 +08:00 committed by GitHub
parent bf559f68f3
commit 61d6b4cb53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 57 additions and 49 deletions

View File

@ -1036,6 +1036,7 @@ leftOptions 动态加载,默认 source 接口是返回 options 部分,而 le
| overflowTagPopover | `TooltipObject` | `{"placement": "top", "trigger": "hover", "showArrow": false, "offset": [0, -10]}` | 收纳浮层的配置属性,详细配置参考[Tooltip](../tooltip#属性表) |
| optionClassName | `string` | | 选项 CSS 类名 |
| popOverContainerSelector | `string` | | 弹层挂载位置选择器,会通过`querySelector`获取 |
| clearable | `boolean` | 是否展示清空图标 |
## 事件表

View File

@ -16,26 +16,26 @@
href="@fortawesome/fontawesome-free/css/v4-shims.css"
/>
<!--DEPENDENCIES_INJECT_PLACEHOLDER-->
<link rel="stylesheet" title="ang" href="../scss/themes/ang.scss" />
<link rel="stylesheet" title="ang" href="amis-ui/scss/themes/ang.scss" />
<link
rel="stylesheet"
title="cxd"
disabled
href="../scss/themes/cxd.scss"
href="amis-ui/scss/themes/cxd.scss"
/>
<link
rel="stylesheet"
title="dark"
disabled
href="../scss/themes/dark.scss"
href="amis-ui/scss/themes/dark.scss"
/>
<link
rel="stylesheet"
title="antd"
disabled
href="../scss/themes/antd.scss"
href="amis-ui/scss/themes/antd.scss"
/>
<link rel="stylesheet" href="../scss/helper.scss" />
<link rel="stylesheet" href="amis-ui/scss/helper.scss" />
<style>
.app-wrapper {
position: relative;

View File

@ -67,12 +67,9 @@
display: flex;
align-items: center;
flex-shrink: 0;
padding-left: px2rem(5px);
> * {
&:first-child {
margin-left: px2rem(5px);
}
&:not(:last-child) {
margin-right: px2rem(5px);
}
@ -95,10 +92,11 @@
align-items: center;
transition: transform var(--animation-duration) ease;
transform: rotate(90deg);
> svg {
width: px2rem(10px);
height: px2rem(10px);
top: 0.125em;
top: 0;
color: var(--default-icon-color);
}
}
@ -155,6 +153,7 @@
cursor: pointer;
margin-left: px2rem(10px);
color: var(--ResultBox-icon-color);
&:hover {
color: var(--ResultBox-icon--onHover-color);
}
@ -162,6 +161,7 @@
> svg {
width: px2rem(10px);
height: px2rem(10px);
&.icon {
top: 0;
}

View File

@ -161,6 +161,13 @@
&.is-error > .#{$ns}Form-label {
color: var(--danger);
}
.#{$ns}Form-control--withSize {
> .#{$ns}ResultBox {
// 兼容 @media (min-width: 576px) .cxd-Form-control--sizeLg
display: flex;
}
}
}
.#{$ns}Form-placeholder {

View File

@ -105,7 +105,7 @@ export class TransferDropDown extends Transfer<TransferDropDownProps> {
className={cx(
'TransferDropDown',
className,
isOpened ? 'is-active' : ''
isOpened ? 'is-opened' : ''
)}
borderMode={borderMode}
allowInput={false}
@ -120,15 +120,8 @@ export class TransferDropDown extends Transfer<TransferDropDownProps> {
ref={ref}
itemRender={itemRender}
useMobileUI={useMobileUI}
>
{!mobileUI ? (
<span className={cx('TransferDropDown-icon')}>
<Icon icon="right-arrow-bold" className="icon" />
</span>
) : (
<></>
)}
</ResultBox>
hasDropDownArrow={!mobileUI}
/>
)}
</PopOverContainer>
);

View File

@ -76,8 +76,12 @@ exports[`Renderer: chained select 1`] = `
>
请选择
</span>
</div>
<div
class="cxd-ResultBox-actions"
>
<span
class="cxd-TransferDropDown-icon"
class="cxd-ResultBox-pc-arrow"
>
<icon-mock
classname="icon icon-right-arrow-bold"
@ -85,9 +89,6 @@ exports[`Renderer: chained select 1`] = `
/>
</span>
</div>
<div
class="cxd-ResultBox-actions"
/>
</div>
</div>
</div>
@ -232,8 +233,12 @@ exports[`Renderer:select associated 1`] = `
>
请选择
</span>
</div>
<div
class="cxd-ResultBox-actions"
>
<span
class="cxd-TransferDropDown-icon"
class="cxd-ResultBox-pc-arrow"
>
<icon-mock
classname="icon icon-right-arrow-bold"
@ -241,9 +246,6 @@ exports[`Renderer:select associated 1`] = `
/>
</span>
</div>
<div
class="cxd-ResultBox-actions"
/>
</div>
</div>
</div>
@ -388,8 +390,12 @@ exports[`Renderer:select chained 1`] = `
>
请选择
</span>
</div>
<div
class="cxd-ResultBox-actions"
>
<span
class="cxd-TransferDropDown-icon"
class="cxd-ResultBox-pc-arrow"
>
<icon-mock
classname="icon icon-right-arrow-bold"
@ -397,9 +403,6 @@ exports[`Renderer:select chained 1`] = `
/>
</span>
</div>
<div
class="cxd-ResultBox-actions"
/>
</div>
</div>
</div>
@ -544,8 +547,12 @@ exports[`Renderer:select group 1`] = `
>
请选择
</span>
</div>
<div
class="cxd-ResultBox-actions"
>
<span
class="cxd-TransferDropDown-icon"
class="cxd-ResultBox-pc-arrow"
>
<icon-mock
classname="icon icon-right-arrow-bold"
@ -553,9 +560,6 @@ exports[`Renderer:select group 1`] = `
/>
</span>
</div>
<div
class="cxd-ResultBox-actions"
/>
</div>
</div>
</div>
@ -857,8 +861,12 @@ exports[`Renderer:select table 1`] = `
>
请选择
</span>
</div>
<div
class="cxd-ResultBox-actions"
>
<span
class="cxd-TransferDropDown-icon"
class="cxd-ResultBox-pc-arrow"
>
<icon-mock
classname="icon icon-right-arrow-bold"
@ -866,9 +874,6 @@ exports[`Renderer:select table 1`] = `
/>
</span>
</div>
<div
class="cxd-ResultBox-actions"
/>
</div>
</div>
</div>
@ -990,7 +995,7 @@ exports[`Renderer:select table with labelField & valueField 1`] = `
class="cxd-SelectControl cxd-Form-control has-popover"
>
<div
class="cxd-ResultBox cxd-TransferDropDown cxd-Form-control is-active is-clickable is-group"
class="cxd-ResultBox cxd-TransferDropDown cxd-Form-control is-opened is-clickable is-group"
style="position: relative;"
tabindex="-1"
>
@ -1031,8 +1036,12 @@ exports[`Renderer:select table with labelField & valueField 1`] = `
/>
</a>
</div>
</div>
<div
class="cxd-ResultBox-actions"
>
<span
class="cxd-TransferDropDown-icon"
class="cxd-ResultBox-pc-arrow"
>
<icon-mock
classname="icon icon-right-arrow-bold"
@ -1040,9 +1049,6 @@ exports[`Renderer:select table with labelField & valueField 1`] = `
/>
</span>
</div>
<div
class="cxd-ResultBox-actions"
/>
<div
class="resize-sensor"
style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px; overflow: scroll; z-index: -1; visibility: hidden;"
@ -1493,8 +1499,12 @@ exports[`Renderer:select tree 1`] = `
>
请选择
</span>
</div>
<div
class="cxd-ResultBox-actions"
>
<span
class="cxd-TransferDropDown-icon"
class="cxd-ResultBox-pc-arrow"
>
<icon-mock
classname="icon icon-right-arrow-bold"
@ -1502,9 +1512,6 @@ exports[`Renderer:select tree 1`] = `
/>
</span>
</div>
<div
class="cxd-ResultBox-actions"
/>
</div>
</div>
</div>