feat(web): 重做轮播图编辑弹窗
This commit is contained in:
1 parent
5db565b15d
commit
f281dcf1b3
2 files changed
+420
-83
No files matched your search
@@ -19,31 +19,206 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.banner-field {
|
||||
.banner-editor-dialog {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
max-height: calc(100vh - 40px);
|
||||
overflow: hidden;
|
||||
flex-direction: column;
|
||||
border-radius: var(--app-radius-lg) !important;
|
||||
}
|
||||
.banner-field-actions {
|
||||
|
||||
.banner-editor-dialog .el-dialog__body {
|
||||
flex: 1 1 auto;
|
||||
padding: 8px 24px 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.banner-editor-dialog .el-dialog__footer {
|
||||
flex: 0 0 auto;
|
||||
padding: 14px 24px;
|
||||
background: var(--el-bg-color-overlay);
|
||||
border-top: 1px solid var(--el-border-color-lighter);
|
||||
}
|
||||
|
||||
.banner-editor-dialog .el-dialog__footer .el-button {
|
||||
min-width: 88px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.banner-editor-section {
|
||||
padding: 4px 0 18px;
|
||||
border-bottom: 1px solid var(--el-border-color-lighter);
|
||||
}
|
||||
|
||||
.banner-editor-section + .banner-editor-section {
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.banner-editor-section:last-child {
|
||||
padding-bottom: 4px;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.banner-editor-section-title {
|
||||
margin: 0 0 14px;
|
||||
color: var(--el-text-color-primary);
|
||||
font-size: 15px;
|
||||
font-weight: 650;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.banner-editor-grid {
|
||||
display: grid;
|
||||
gap: 0 16px;
|
||||
}
|
||||
|
||||
.banner-editor-grid--two {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.banner-editor-number {
|
||||
width: 180px !important;
|
||||
}
|
||||
|
||||
.banner-image-editor {
|
||||
display: flex;
|
||||
gap: 18px;
|
||||
width: 100%;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.banner-image-preview-card {
|
||||
position: relative;
|
||||
flex: 0 0 240px;
|
||||
width: 240px;
|
||||
aspect-ratio: 16 / 9;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--el-border-color);
|
||||
border-radius: 8px;
|
||||
background: var(--el-fill-color-lighter);
|
||||
}
|
||||
|
||||
.banner-image-preview-card > img {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.banner-image-empty {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: var(--el-text-color-placeholder);
|
||||
font-size: 12px;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
border: 1px dashed var(--el-border-color);
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.banner-image-upload-mask {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
background: color-mix(in srgb, var(--el-color-primary) 78%, transparent);
|
||||
}
|
||||
|
||||
.banner-image-upload-mask b {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.banner-image-meta {
|
||||
display: flex;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
/* 编辑弹窗里的轮播图预览:和上传控件并排,控制弹窗高度 */
|
||||
.form-banner-preview {
|
||||
display: block;
|
||||
width: 200px;
|
||||
height: 112px;
|
||||
flex: 0 0 200px;
|
||||
object-fit: contain;
|
||||
border: 1px solid var(--el-border-color-lighter);
|
||||
border-radius: var(--app-radius-md);
|
||||
background: #f0f2f4 !important;
|
||||
|
||||
.banner-image-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.banner-image-filename {
|
||||
overflow: hidden;
|
||||
color: var(--el-text-color-regular);
|
||||
font-size: 13px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.banner-image-hint {
|
||||
margin: 0;
|
||||
color: var(--el-text-color-secondary);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.banner-image-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.banner-image-actions .el-button {
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
.banner-original-link {
|
||||
color: var(--el-color-primary);
|
||||
font-size: 13px;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.banner-original-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.banner-editor-dialog {
|
||||
width: calc(100vw - 24px) !important;
|
||||
margin: 12px auto !important;
|
||||
}
|
||||
|
||||
.banner-editor-dialog .el-dialog__body {
|
||||
padding-right: 18px;
|
||||
padding-left: 18px;
|
||||
}
|
||||
|
||||
.banner-editor-grid--two {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.banner-image-editor {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.banner-image-preview-card {
|
||||
flex-basis: 135px;
|
||||
}
|
||||
|
||||
.banner-image-meta {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.dark .banner-thumb,
|
||||
.dark .banner-thumb-empty,
|
||||
.dark .form-banner-preview {
|
||||
.dark .banner-image-preview-card,
|
||||
.dark .banner-image-empty {
|
||||
background: #353b45 !important;
|
||||
color: #b9c1cb;
|
||||
}
|
||||
Reference in new issue
Block a user