fix(form): fix from valid tooltip background color (#1059)

This commit is contained in:
gimmyhehe 2023-12-07 20:23:18 +08:00 committed by GitHub
parent efeebbb6e2
commit 1b57fd5722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 2 deletions

View File

@ -118,9 +118,20 @@
}
&__valid {
.component-css-vars-form();
&.@{tooltip-prefix-cls}.@{tooltip-prefix-cls}__popper {
// 华为云规范 12px 16px; 所以它直接按tooltip的默认值即可
// padding: 7px 4px;
&.is-error {
background-color: var(--ti-form-valid-error-bg-color);
.popper__arrow {
border-right-color: var(--ti-form-valid-error-border-color);
&:after {
border-right-color: var(--ti-form-valid-error-border-color);
}
}
}
&.is-error[x-placement^='top'] .popper__arrow {
bottom: -4px;

View File

@ -1,4 +1,6 @@
export const tinyFormSmbTheme = {
'ti-form-valid-error-bg-color': '#fff',
'ti-form-valid-error-border-color': '#fff',
'ti-form-item-label-top-margin-bottom': '24px',
'ti-form-item-label-top-label-line-height': '1.5', // smb要求行高为1.5
'ti-form-item-label-top-label-height': 'calc(1.5em + 8px)' // border-box需要加上内边距

View File

@ -20,4 +20,8 @@
--ti-form-item-label-top-label-line-height: var(--ti-common-size-height-normal, 28px);
// 表单项垂直排列时的表单项标签高度(hide)
--ti-form-item-label-top-label-height: var(--ti-common-size-height-normal, 28px);
// 表单错误校验tooltip背景颜色
--ti-form-valid-error-bg-color: var(--ti-common-color-danger-normal);
// 表单错误校验边框颜色
--ti-form-valid-error-border-color: var(--ti-common-color-danger-normal);
}

View File

@ -39,6 +39,7 @@ export default {
'date-table': 'date-table',
'fall-menu': 'fall-menu',
'form-item': 'form-item',
'form-valid': 'form__valid',
'img-preview': 'img-preview',
'img-preview-item': 'img-preview-item',
'ip-address': 'ip-address',