fix(components): [upload] Invalid CSS variable (#22366)

* fix: upload css var

* fix: inject the scss variables in the component level

* fix: Excess modifications

* fix: Keep the name consistent with the original

* fix: Keep the name consistent with the original
This commit is contained in:
一只前端汪
2025-10-11 20:00:01 +08:00
committed by GitHub
parent a038e00d48
commit 574bf98d43
2 changed files with 8 additions and 4 deletions

View File

@@ -1565,6 +1565,10 @@ $upload: map.merge(
(
'dragger-padding-horizontal': 40px,
'dragger-padding-vertical': 10px,
'list-picture-card-size': var(
#{getCssVarName('upload', 'picture-card-size')}
),
'picture-card-size': 148px,
),
$upload
);

View File

@@ -77,8 +77,6 @@
/* Picture Card for Wall */
@include m(picture-card) {
@include set-css-var-value(('upload', 'picture-card', 'size'), 148px);
background-color: getCssVar('fill-color', 'lighter');
border: 1px dashed getCssVar('border-color', 'darker');
border-radius: 6px;
@@ -167,6 +165,10 @@
}
}
@include b(upload-list) {
@include set-component-css-var('upload', $upload);
}
@include b(upload-list) {
margin: 10px 0 0;
padding: 0;
@@ -343,8 +345,6 @@
// upload-list
@include m(picture-card) {
@include set-css-var-value(('upload-list', 'picture-card', 'size'), 148px);
display: inline-flex;
flex-wrap: wrap;
margin: 0;