Skip to content

Commit

Permalink
upload disabled style (#1639)
Browse files Browse the repository at this point in the history
* feat(Upload): 文件列表支持显示上传失败的原因

* fix: lint error

* feat: upload disabled style

* fix: lint error

* fix: lint error

---------

Co-authored-by: sheepluo <[email protected]>
  • Loading branch information
chaishi and sheepluo authored Nov 7, 2023
1 parent 09982eb commit e82c00e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 20 additions & 2 deletions style/web/components/upload/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,23 @@
border-radius: @upload-card-img-wrap-border-radius;
.hover-transition(border);

&:hover {
&:hover:not(.@{prefix}-is-disabled) {
border-color: @upload-card-item-bg-border-color-hover;
.hover-transition(border-color);
}

> .t-icon {
color: @upload-icon-color;
}

> .t-icon,
.@{prefix}-loading {
font-size: @upload-icon-size-large;
margin-bottom: @upload-card-container-icon-add-margin-bottom;
}

> p {
> p,
.@{prefix}-upload__add-text {
color: @text-color-placeholder;
margin: 0;
}
Expand Down Expand Up @@ -683,3 +689,15 @@
display: flex;
align-items: center;
}

.@{prefix}-upload__card-container.@{prefix}-is-disabled {
cursor: not-allowed;

.@{prefix}-upload__add-text {
color: @upload-text-disabled-color;
}

.t-icon {
color: @upload-icon-disabled-color;
}
}
2 changes: 2 additions & 0 deletions style/web/components/upload/_var.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@upload-z-index: 2;

// 颜色
@upload-text-disabled-color: @text-color-disabled;
@upload-icon-check-circle-filled-color: @success-color;
@upload-icon-error-circle-filled-color: @error-color;
@upload-icon-loading-color: @brand-color;
Expand All @@ -25,6 +26,7 @@
@upload-small-color: @text-color-placeholder;
@upload-placeholder-color: @text-color-placeholder;
@upload-icon-color: @text-color-placeholder;
@upload-icon-disabled-color: @text-color-disabled;
@upload-icon-color-hover: @text-color-secondary;
@upload-list-file-icon-color: @brand-color;
@upload-list-item-error-color: @error-color;
Expand Down

0 comments on commit e82c00e

Please sign in to comment.