2019-05-06 12:04:39 +08:00
|
|
|
@import '../../style/themes/index';
|
2018-12-07 20:02:01 +08:00
|
|
|
@import '../../style/mixins/index';
|
2016-04-27 20:44:36 +08:00
|
|
|
|
2018-12-07 20:02:01 +08:00
|
|
|
@upload-prefix-cls: ~'@{ant-prefix}-upload';
|
|
|
|
@upload-item: ~'@{ant-prefix}-upload-list-item';
|
2018-12-26 15:19:24 +08:00
|
|
|
@upload-picture-card-size: 104px;
|
2018-12-26 12:06:54 +08:00
|
|
|
@upload-picture-card-border-style: @border-style-base;
|
2015-08-08 23:37:35 +08:00
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{upload-prefix-cls} {
|
2020-12-22 11:08:12 +08:00
|
|
|
.reset-component();
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2016-10-10 22:38:11 +08:00
|
|
|
outline: 0;
|
2015-08-21 14:46:12 +08:00
|
|
|
|
2017-09-27 22:32:49 +08:00
|
|
|
p {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
2016-08-16 17:54:59 +08:00
|
|
|
&-btn {
|
2015-08-21 14:46:12 +08:00
|
|
|
display: block;
|
|
|
|
width: 100%;
|
2016-01-15 16:44:07 +08:00
|
|
|
outline: none;
|
2015-08-21 14:46:12 +08:00
|
|
|
}
|
|
|
|
|
2018-12-07 20:02:01 +08:00
|
|
|
input[type='file'] {
|
2015-08-21 14:46:12 +08:00
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
2015-12-12 15:25:54 +08:00
|
|
|
&&-select {
|
2015-08-21 14:46:12 +08:00
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
2019-05-26 13:12:28 +08:00
|
|
|
&&-disabled {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
|
2016-01-16 16:39:52 +08:00
|
|
|
&&-select-picture-card {
|
2018-12-26 15:19:24 +08:00
|
|
|
width: @upload-picture-card-size;
|
|
|
|
height: @upload-picture-card-size;
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-right: 8px;
|
|
|
|
margin-bottom: 8px;
|
2016-01-16 16:39:52 +08:00
|
|
|
text-align: center;
|
2019-02-15 10:48:07 +08:00
|
|
|
vertical-align: top;
|
|
|
|
background-color: @background-color-light;
|
|
|
|
border: @border-width-base dashed @border-color-base;
|
|
|
|
border-radius: @border-radius-base;
|
2016-01-16 16:39:52 +08:00
|
|
|
cursor: pointer;
|
2020-08-24 16:33:24 +08:00
|
|
|
transition: border-color 0.3s;
|
2016-01-16 16:39:52 +08:00
|
|
|
|
2016-10-10 22:38:11 +08:00
|
|
|
> .@{upload-prefix-cls} {
|
2020-08-24 16:33:24 +08:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2016-10-10 22:38:11 +08:00
|
|
|
height: 100%;
|
2017-10-17 14:43:52 +08:00
|
|
|
text-align: center;
|
2016-10-10 22:38:11 +08:00
|
|
|
}
|
|
|
|
|
2016-01-16 16:39:52 +08:00
|
|
|
&:hover {
|
|
|
|
border-color: @primary-color;
|
2020-04-23 15:58:17 +08:00
|
|
|
.@{upload-prefix-cls}-disabled& {
|
|
|
|
border-color: @border-color-base;
|
|
|
|
}
|
2016-01-16 16:39:52 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-12 15:25:54 +08:00
|
|
|
&&-drag {
|
2019-02-15 10:48:07 +08:00
|
|
|
position: relative;
|
2015-08-09 18:00:20 +08:00
|
|
|
width: 100%;
|
2015-11-13 16:09:39 +08:00
|
|
|
height: 100%;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-align: center;
|
2017-10-17 20:56:29 +08:00
|
|
|
background: @background-color-light;
|
2019-02-15 10:48:07 +08:00
|
|
|
border: @border-width-base dashed @border-color-base;
|
|
|
|
border-radius: @border-radius-base;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: border-color 0.3s;
|
2015-08-09 18:00:20 +08:00
|
|
|
|
2018-08-24 20:44:43 +08:00
|
|
|
.@{upload-prefix-cls} {
|
2020-03-29 10:39:46 +08:00
|
|
|
padding: @padding-md 0;
|
2018-08-24 20:44:43 +08:00
|
|
|
}
|
|
|
|
|
2016-08-14 15:20:00 +08:00
|
|
|
&.@{upload-prefix-cls}-drag-hover:not(.@{upload-prefix-cls}-disabled) {
|
2019-03-25 19:15:48 +08:00
|
|
|
border-color: @primary-7;
|
2015-11-11 00:28:05 +08:00
|
|
|
}
|
|
|
|
|
2016-08-14 15:20:00 +08:00
|
|
|
&.@{upload-prefix-cls}-disabled {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
|
2016-08-16 17:54:59 +08:00
|
|
|
.@{upload-prefix-cls}-btn {
|
2015-08-21 14:46:12 +08:00
|
|
|
display: table;
|
2015-10-31 13:27:58 +08:00
|
|
|
height: 100%;
|
2015-08-21 14:46:12 +08:00
|
|
|
}
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{upload-prefix-cls}-drag-container {
|
2015-08-21 14:46:12 +08:00
|
|
|
display: table-cell;
|
|
|
|
vertical-align: middle;
|
2015-08-09 18:00:20 +08:00
|
|
|
}
|
2015-08-21 14:46:12 +08:00
|
|
|
|
2016-08-14 15:20:00 +08:00
|
|
|
&:not(.@{upload-prefix-cls}-disabled):hover {
|
2017-01-01 22:20:06 +08:00
|
|
|
border-color: @primary-5;
|
2015-10-31 13:27:58 +08:00
|
|
|
}
|
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
p.@{upload-prefix-cls}-drag-icon {
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
2017-01-01 22:20:06 +08:00
|
|
|
color: @primary-5;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-size: 48px;
|
2015-08-08 23:37:35 +08:00
|
|
|
}
|
2019-04-15 10:52:00 +08:00
|
|
|
|
2017-10-17 14:43:52 +08:00
|
|
|
margin-bottom: 20px;
|
2015-08-08 23:37:35 +08:00
|
|
|
}
|
2015-08-20 16:55:42 +08:00
|
|
|
p.@{upload-prefix-cls}-text {
|
2017-09-27 22:32:49 +08:00
|
|
|
margin: 0 0 4px;
|
|
|
|
color: @heading-color;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-size: @font-size-lg;
|
2015-08-08 23:37:35 +08:00
|
|
|
}
|
2015-08-20 16:55:42 +08:00
|
|
|
p.@{upload-prefix-cls}-hint {
|
2016-11-08 20:45:56 +08:00
|
|
|
color: @text-color-secondary;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-size: @font-size-base;
|
2015-08-08 23:37:35 +08:00
|
|
|
}
|
2020-06-01 13:29:22 +08:00
|
|
|
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{iconfont-css-prefix}-plus {
|
2019-02-15 10:48:07 +08:00
|
|
|
color: @disabled-color;
|
2015-08-08 23:37:35 +08:00
|
|
|
font-size: 30px;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: all 0.3s;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2015-08-09 18:00:20 +08:00
|
|
|
&:hover {
|
2016-11-08 20:45:56 +08:00
|
|
|
color: @text-color-secondary;
|
2015-08-09 18:00:20 +08:00
|
|
|
}
|
2015-08-08 23:37:35 +08:00
|
|
|
}
|
2016-09-14 16:18:33 +08:00
|
|
|
&:hover .@{iconfont-css-prefix}-plus {
|
2016-11-08 20:45:56 +08:00
|
|
|
color: @text-color-secondary;
|
2015-08-08 23:37:35 +08:00
|
|
|
}
|
|
|
|
}
|
2019-07-22 19:18:47 +08:00
|
|
|
|
|
|
|
&-picture-card-wrapper {
|
2020-12-22 11:08:12 +08:00
|
|
|
.clearfix();
|
2019-07-25 23:53:54 +08:00
|
|
|
|
|
|
|
display: inline-block;
|
2019-08-22 20:49:42 +08:00
|
|
|
width: 100%;
|
2019-07-22 19:18:47 +08:00
|
|
|
}
|
2015-08-09 18:00:20 +08:00
|
|
|
}
|
2015-08-08 23:37:35 +08:00
|
|
|
|
2015-08-20 16:55:42 +08:00
|
|
|
.@{upload-prefix-cls}-list {
|
2020-12-22 11:08:12 +08:00
|
|
|
.reset-component();
|
|
|
|
.clearfix();
|
2020-04-28 11:16:01 +08:00
|
|
|
line-height: @line-height-base;
|
2020-11-21 19:00:11 +08:00
|
|
|
|
|
|
|
// ============================ Item ============================
|
2015-12-12 15:25:54 +08:00
|
|
|
&-item {
|
2017-03-08 12:11:31 +08:00
|
|
|
position: relative;
|
2020-04-28 11:16:01 +08:00
|
|
|
height: @line-height-base * @font-size-base;
|
2020-03-29 10:39:46 +08:00
|
|
|
margin-top: @margin-xs;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-size: @font-size-base;
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2017-03-08 12:11:31 +08:00
|
|
|
&-name {
|
2019-02-15 10:48:07 +08:00
|
|
|
display: inline-block;
|
|
|
|
width: 100%;
|
|
|
|
padding-left: @font-size-base + 8px;
|
2017-03-08 12:11:31 +08:00
|
|
|
overflow: hidden;
|
2020-04-28 11:16:01 +08:00
|
|
|
line-height: @line-height-base;
|
2017-03-08 12:11:31 +08:00
|
|
|
white-space: nowrap;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-overflow: ellipsis;
|
2017-03-08 12:11:31 +08:00
|
|
|
}
|
2015-11-04 12:00:49 +08:00
|
|
|
|
2019-09-11 21:46:56 +08:00
|
|
|
&-card-actions {
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
2020-01-02 19:10:16 +08:00
|
|
|
|
2020-06-01 13:29:22 +08:00
|
|
|
&-btn {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
2022-04-15 16:54:30 +08:00
|
|
|
|
2020-06-01 13:29:22 +08:00
|
|
|
&-btn.@{ant-prefix}-btn-sm {
|
2022-04-15 16:54:30 +08:00
|
|
|
height: @line-height-base * @font-size-base;
|
2019-09-11 21:46:56 +08:00
|
|
|
line-height: 1;
|
2022-04-15 16:54:30 +08:00
|
|
|
vertical-align: top;
|
2020-06-01 13:29:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&.picture {
|
|
|
|
top: 22px;
|
|
|
|
line-height: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-btn:focus,
|
|
|
|
&.picture &-btn {
|
2019-09-11 21:46:56 +08:00
|
|
|
opacity: 1;
|
|
|
|
}
|
2020-06-01 13:29:22 +08:00
|
|
|
|
2020-01-03 17:48:10 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
2019-11-27 12:39:30 +08:00
|
|
|
color: @upload-actions-color;
|
2022-04-15 16:54:30 +08:00
|
|
|
transition: all 0.3s;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover .@{iconfont-css-prefix} {
|
|
|
|
color: @text-color;
|
2019-09-11 21:46:56 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-12 15:25:54 +08:00
|
|
|
&-info {
|
2017-10-17 14:43:52 +08:00
|
|
|
height: 100%;
|
2020-11-21 19:00:11 +08:00
|
|
|
padding: 0 4px;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: background-color 0.3s;
|
2015-11-04 12:00:49 +08:00
|
|
|
|
2017-09-27 22:32:49 +08:00
|
|
|
> span {
|
|
|
|
display: block;
|
2019-09-25 11:33:35 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2017-09-27 22:32:49 +08:00
|
|
|
}
|
|
|
|
|
2017-03-16 13:30:09 +08:00
|
|
|
.@{iconfont-css-prefix}-loading,
|
2020-01-03 17:48:10 +08:00
|
|
|
.@{upload-prefix-cls}-text-icon {
|
|
|
|
.@{iconfont-css-prefix} {
|
|
|
|
position: absolute;
|
2020-12-25 14:31:44 +08:00
|
|
|
top: (@font-size-base / 2) - 2px;
|
2020-01-03 17:48:10 +08:00
|
|
|
color: @text-color-secondary;
|
|
|
|
font-size: @font-size-base;
|
|
|
|
}
|
2015-10-31 13:27:58 +08:00
|
|
|
}
|
2017-03-08 18:02:15 +08:00
|
|
|
}
|
2017-03-08 12:11:31 +08:00
|
|
|
|
2015-12-12 15:25:54 +08:00
|
|
|
&:hover &-info {
|
2017-05-03 22:57:14 +08:00
|
|
|
background-color: @item-hover-bg;
|
2015-12-12 15:25:54 +08:00
|
|
|
}
|
|
|
|
|
2020-06-01 13:29:22 +08:00
|
|
|
&:hover &-card-actions-btn {
|
2019-09-11 21:46:56 +08:00
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
2015-12-14 11:56:00 +08:00
|
|
|
&-error,
|
2020-01-03 17:48:10 +08:00
|
|
|
&-error .@{upload-prefix-cls}-text-icon > .@{iconfont-css-prefix},
|
2017-02-27 14:18:00 +08:00
|
|
|
&-error &-name {
|
2015-12-14 11:56:00 +08:00
|
|
|
color: @error-color;
|
|
|
|
}
|
|
|
|
|
2020-05-31 11:50:26 +08:00
|
|
|
&-error &-card-actions {
|
|
|
|
.@{iconfont-css-prefix} {
|
|
|
|
color: @error-color;
|
|
|
|
}
|
2021-10-13 15:38:59 +08:00
|
|
|
|
2020-06-01 13:29:22 +08:00
|
|
|
&-btn {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2015-12-14 11:56:00 +08:00
|
|
|
}
|
|
|
|
|
2015-12-12 15:25:54 +08:00
|
|
|
&-progress {
|
2017-03-20 16:44:29 +08:00
|
|
|
position: absolute;
|
2017-10-17 14:43:52 +08:00
|
|
|
bottom: -12px;
|
2019-02-15 10:48:07 +08:00
|
|
|
width: 100%;
|
2017-10-17 14:43:52 +08:00
|
|
|
padding-left: @font-size-base + 12px;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-size: @font-size-base;
|
|
|
|
line-height: 0;
|
2015-10-31 13:27:58 +08:00
|
|
|
}
|
2015-12-12 15:25:54 +08:00
|
|
|
}
|
|
|
|
|
2020-11-21 19:00:11 +08:00
|
|
|
// =================== Picture & Picture Card ===================
|
2016-01-15 15:56:06 +08:00
|
|
|
&-picture,
|
|
|
|
&-picture-card {
|
|
|
|
.@{upload-item} {
|
2019-02-15 10:48:07 +08:00
|
|
|
position: relative;
|
|
|
|
height: 66px;
|
2020-03-29 10:39:46 +08:00
|
|
|
padding: @padding-xs;
|
2018-12-26 12:06:54 +08:00
|
|
|
border: @border-width-base @upload-picture-card-border-style @border-color-base;
|
2019-02-15 10:48:07 +08:00
|
|
|
border-radius: @border-radius-base;
|
2020-06-01 13:29:22 +08:00
|
|
|
|
2016-01-15 15:56:06 +08:00
|
|
|
&:hover {
|
|
|
|
background: transparent;
|
|
|
|
}
|
2020-06-01 13:29:22 +08:00
|
|
|
|
2017-02-15 20:58:40 +08:00
|
|
|
&-error {
|
|
|
|
border-color: @error-color;
|
|
|
|
}
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-item}-info {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-item}:hover .@{upload-item}-info {
|
2015-12-12 15:25:54 +08:00
|
|
|
background: transparent;
|
|
|
|
}
|
2015-10-31 13:27:58 +08:00
|
|
|
|
2016-01-15 15:56:06 +08:00
|
|
|
.@{upload-item}-uploading {
|
|
|
|
border-style: dashed;
|
|
|
|
}
|
2015-12-12 15:25:54 +08:00
|
|
|
|
2016-01-15 15:56:06 +08:00
|
|
|
.@{upload-item}-thumbnail {
|
2019-02-15 10:48:07 +08:00
|
|
|
width: 48px;
|
|
|
|
height: 48px;
|
2021-10-27 18:32:40 +08:00
|
|
|
line-height: 60px;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-align: center;
|
2018-12-07 20:02:01 +08:00
|
|
|
opacity: 0.8;
|
2020-01-02 19:10:16 +08:00
|
|
|
|
2020-01-03 17:48:10 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
|
|
|
font-size: 26px;
|
|
|
|
}
|
2018-04-04 17:17:01 +08:00
|
|
|
}
|
|
|
|
|
2020-05-18 10:31:23 +08:00
|
|
|
// Adjust the color of the error icon : https://github.com/ant-design/ant-design/pull/24160
|
|
|
|
.@{upload-item}-error .@{upload-item}-thumbnail {
|
|
|
|
.@{iconfont-css-prefix} {
|
|
|
|
svg path {
|
|
|
|
&[fill='#e6f7ff'] {
|
2021-09-07 09:50:27 +08:00
|
|
|
fill: @error-color-deprecated-bg;
|
2020-05-18 10:31:23 +08:00
|
|
|
}
|
2020-06-01 13:29:22 +08:00
|
|
|
|
2020-05-18 10:31:23 +08:00
|
|
|
&[fill='#1890ff'] {
|
|
|
|
fill: @error-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-04 17:17:01 +08:00
|
|
|
.@{upload-item}-icon {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
2019-02-15 10:48:07 +08:00
|
|
|
font-size: 26px;
|
2018-11-28 20:33:32 +08:00
|
|
|
transform: translate(-50%, -50%);
|
2020-01-02 19:10:16 +08:00
|
|
|
|
2020-01-03 17:48:10 +08:00
|
|
|
.@{iconfont-css-prefix} {
|
|
|
|
font-size: 26px;
|
|
|
|
}
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
|
|
|
|
2019-07-22 19:18:47 +08:00
|
|
|
.@{upload-item}-image {
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
|
|
|
|
2016-01-15 15:56:06 +08:00
|
|
|
.@{upload-item}-thumbnail img {
|
2019-02-15 10:48:07 +08:00
|
|
|
display: block;
|
2016-01-15 15:56:06 +08:00
|
|
|
width: 48px;
|
|
|
|
height: 48px;
|
2016-11-22 14:21:42 +08:00
|
|
|
overflow: hidden;
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
2015-12-12 15:25:54 +08:00
|
|
|
|
2016-01-15 15:56:06 +08:00
|
|
|
.@{upload-item}-name {
|
2019-02-15 10:48:07 +08:00
|
|
|
display: inline-block;
|
|
|
|
box-sizing: border-box;
|
|
|
|
max-width: 100%;
|
2016-01-15 15:56:06 +08:00
|
|
|
margin: 0 0 0 8px;
|
2019-02-15 10:48:07 +08:00
|
|
|
padding-right: 8px;
|
|
|
|
padding-left: 48px;
|
|
|
|
overflow: hidden;
|
2016-11-22 14:21:42 +08:00
|
|
|
line-height: 44px;
|
2019-02-15 10:48:07 +08:00
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: all 0.3s;
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-item}-uploading .@{upload-item}-name {
|
2021-10-27 18:32:40 +08:00
|
|
|
margin-bottom: 12px;
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-item}-progress {
|
2017-10-17 14:43:52 +08:00
|
|
|
bottom: 14px;
|
2018-12-07 20:02:01 +08:00
|
|
|
width: ~'calc(100% - 24px)';
|
2019-02-15 10:48:07 +08:00
|
|
|
margin-top: 0;
|
|
|
|
padding-left: 56px;
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
2015-12-12 15:25:54 +08:00
|
|
|
}
|
|
|
|
|
2020-11-21 19:00:11 +08:00
|
|
|
// ======================== Picture Card ========================
|
2016-01-15 15:56:06 +08:00
|
|
|
&-picture-card {
|
2019-11-18 18:20:04 +08:00
|
|
|
&-container {
|
2020-08-24 16:33:24 +08:00
|
|
|
display: inline-block;
|
2019-11-18 18:20:04 +08:00
|
|
|
width: @upload-picture-card-size;
|
|
|
|
height: @upload-picture-card-size;
|
2020-03-29 10:39:46 +08:00
|
|
|
margin: 0 @margin-xs @margin-xs 0;
|
2020-08-24 16:33:24 +08:00
|
|
|
vertical-align: top;
|
2019-11-18 18:20:04 +08:00
|
|
|
}
|
2020-06-01 13:29:22 +08:00
|
|
|
|
2016-01-15 15:56:06 +08:00
|
|
|
.@{upload-item} {
|
2020-08-24 16:33:24 +08:00
|
|
|
height: 100%;
|
|
|
|
margin: 0;
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
2015-12-12 15:25:54 +08:00
|
|
|
|
2016-01-15 15:56:06 +08:00
|
|
|
.@{upload-item}-info {
|
2016-01-16 16:39:52 +08:00
|
|
|
position: relative;
|
2019-02-15 10:48:07 +08:00
|
|
|
height: 100%;
|
2017-10-10 16:23:25 +08:00
|
|
|
overflow: hidden;
|
2015-12-12 15:25:54 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&::before {
|
2016-01-15 15:56:06 +08:00
|
|
|
position: absolute;
|
2016-01-15 16:11:31 +08:00
|
|
|
z-index: 1;
|
2016-01-16 16:39:52 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2019-02-15 10:48:07 +08:00
|
|
|
background-color: fade(@black, 50%);
|
2017-03-13 11:16:22 +08:00
|
|
|
opacity: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
transition: all 0.3s;
|
|
|
|
content: ' ';
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
2017-03-13 11:16:22 +08:00
|
|
|
}
|
2015-12-12 15:25:54 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
.@{upload-item}:hover .@{upload-item}-info::before {
|
2017-03-13 11:16:22 +08:00
|
|
|
opacity: 1;
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
2015-11-04 12:00:49 +08:00
|
|
|
|
2017-01-10 20:15:02 +08:00
|
|
|
.@{upload-item}-actions {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
2019-02-15 10:48:07 +08:00
|
|
|
left: 50%;
|
2017-01-10 20:15:02 +08:00
|
|
|
z-index: 10;
|
|
|
|
white-space: nowrap;
|
2019-02-15 10:48:07 +08:00
|
|
|
transform: translate(-50%, -50%);
|
2017-03-08 18:02:15 +08:00
|
|
|
opacity: 0;
|
2018-12-07 20:02:01 +08:00
|
|
|
transition: all 0.3s;
|
2017-03-08 18:02:15 +08:00
|
|
|
|
2020-01-03 17:48:10 +08:00
|
|
|
.@{iconfont-css-prefix}-eye,
|
2019-09-11 21:46:56 +08:00
|
|
|
.@{iconfont-css-prefix}-download,
|
2017-03-08 18:02:15 +08:00
|
|
|
.@{iconfont-css-prefix}-delete {
|
|
|
|
z-index: 10;
|
|
|
|
width: 16px;
|
|
|
|
margin: 0 4px;
|
2019-02-15 10:48:07 +08:00
|
|
|
color: @text-color-dark;
|
|
|
|
font-size: 16px;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: all 0.3s;
|
2020-06-01 13:29:22 +08:00
|
|
|
|
2017-03-08 18:02:15 +08:00
|
|
|
&:hover {
|
2018-12-04 13:11:31 +08:00
|
|
|
color: @text-color-inverse;
|
2017-03-08 18:02:15 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-item}-info:hover + .@{upload-item}-actions,
|
|
|
|
.@{upload-item}-actions:hover {
|
|
|
|
opacity: 1;
|
2017-01-10 20:15:02 +08:00
|
|
|
}
|
|
|
|
|
2016-01-16 16:39:52 +08:00
|
|
|
.@{upload-item}-thumbnail,
|
2016-01-15 15:56:06 +08:00
|
|
|
.@{upload-item}-thumbnail img {
|
2019-02-15 10:48:07 +08:00
|
|
|
position: static;
|
2016-01-16 16:39:52 +08:00
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2020-10-23 11:18:57 +08:00
|
|
|
object-fit: contain;
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-item}-name {
|
2019-02-15 10:48:07 +08:00
|
|
|
display: none;
|
2018-02-11 16:11:13 +08:00
|
|
|
margin: 8px 0 0;
|
|
|
|
padding: 0;
|
|
|
|
line-height: @line-height-base;
|
2019-02-15 10:48:07 +08:00
|
|
|
text-align: center;
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
|
|
|
|
2020-01-03 17:48:10 +08:00
|
|
|
.@{upload-item}-file + .@{upload-item}-name {
|
2019-11-29 23:34:12 +08:00
|
|
|
position: absolute;
|
|
|
|
bottom: 10px;
|
2018-02-11 16:11:13 +08:00
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2016-01-15 15:56:06 +08:00
|
|
|
.@{upload-item}-uploading {
|
|
|
|
&.@{upload-item} {
|
2017-10-17 14:43:52 +08:00
|
|
|
background-color: @background-color-light;
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-item}-info {
|
2016-08-02 14:51:48 +08:00
|
|
|
height: auto;
|
2020-06-01 13:29:22 +08:00
|
|
|
|
2019-02-15 10:48:07 +08:00
|
|
|
&::before,
|
2020-01-03 17:48:10 +08:00
|
|
|
.@{iconfont-css-prefix}-eye,
|
2016-09-14 16:18:33 +08:00
|
|
|
.@{iconfont-css-prefix}-delete {
|
2016-01-15 15:56:06 +08:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-item}-progress {
|
2017-10-10 16:23:25 +08:00
|
|
|
bottom: 32px;
|
2020-08-24 16:33:24 +08:00
|
|
|
width: calc(100% - 14px);
|
2019-02-15 10:48:07 +08:00
|
|
|
padding-left: 0;
|
2016-01-15 15:56:06 +08:00
|
|
|
}
|
2015-08-28 16:12:19 +08:00
|
|
|
}
|
2015-11-04 12:00:49 +08:00
|
|
|
|
2020-11-21 19:00:11 +08:00
|
|
|
// ======================= Picture & Text =======================
|
|
|
|
&-text,
|
|
|
|
&-picture {
|
|
|
|
&-container {
|
|
|
|
transition: opacity @animation-duration-slow, height @animation-duration-slow;
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
display: table;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
content: '';
|
|
|
|
}
|
|
|
|
|
|
|
|
// Don't know why span here, just stretch it
|
|
|
|
.@{upload-prefix-cls}-span {
|
|
|
|
display: block;
|
|
|
|
flex: auto;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// text & picture no need this additional element.
|
|
|
|
// But it used for picture-card, let's keep it.
|
|
|
|
.@{upload-prefix-cls}-span {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
> * {
|
|
|
|
flex: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-item}-name {
|
|
|
|
flex: auto;
|
2021-10-27 18:32:40 +08:00
|
|
|
margin: 0;
|
2020-11-21 19:00:11 +08:00
|
|
|
padding: 0 @padding-xs;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-item}-card-actions {
|
|
|
|
position: static;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ============================ Text ============================
|
|
|
|
&-text {
|
|
|
|
.@{upload-prefix-cls}-text-icon {
|
|
|
|
.@{iconfont-css-prefix} {
|
|
|
|
position: static;
|
|
|
|
}
|
|
|
|
}
|
2015-08-09 18:00:20 +08:00
|
|
|
}
|
2015-08-21 17:12:42 +08:00
|
|
|
|
2020-11-21 19:00:11 +08:00
|
|
|
// =========================== Motion ===========================
|
|
|
|
.@{upload-prefix-cls}-animate-inline-appear,
|
2017-03-08 18:02:15 +08:00
|
|
|
.@{upload-prefix-cls}-animate-inline-enter,
|
|
|
|
.@{upload-prefix-cls}-animate-inline-leave {
|
2020-11-21 19:00:11 +08:00
|
|
|
animation-duration: @animation-duration-slow;
|
2017-03-08 18:02:15 +08:00
|
|
|
animation-fill-mode: @ease-in-out-circ;
|
2015-08-21 17:37:54 +08:00
|
|
|
}
|
|
|
|
|
2020-11-21 19:00:11 +08:00
|
|
|
.@{upload-prefix-cls}-animate-inline-appear,
|
2017-03-08 18:02:15 +08:00
|
|
|
.@{upload-prefix-cls}-animate-inline-enter {
|
|
|
|
animation-name: uploadAnimateInlineIn;
|
|
|
|
}
|
|
|
|
|
|
|
|
.@{upload-prefix-cls}-animate-inline-leave {
|
|
|
|
animation-name: uploadAnimateInlineOut;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes uploadAnimateInlineIn {
|
2015-11-26 19:32:55 +08:00
|
|
|
from {
|
2017-03-08 18:02:15 +08:00
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2019-02-15 10:48:07 +08:00
|
|
|
opacity: 0;
|
2015-08-21 17:37:54 +08:00
|
|
|
}
|
2015-11-26 19:32:55 +08:00
|
|
|
}
|
2015-08-21 17:37:54 +08:00
|
|
|
|
2017-03-08 18:02:15 +08:00
|
|
|
@keyframes uploadAnimateInlineOut {
|
2015-11-26 19:32:55 +08:00
|
|
|
to {
|
2017-03-08 18:02:15 +08:00
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2015-11-26 19:32:55 +08:00
|
|
|
opacity: 0;
|
2015-08-21 17:12:42 +08:00
|
|
|
}
|
|
|
|
}
|
2020-03-19 12:13:24 +08:00
|
|
|
|
|
|
|
@import './rtl';
|