convert RemoveBackground to single-screen layout without scrollbars
This commit is contained in:
parent
96436357eb
commit
d38fac4451
@ -546,10 +546,12 @@ const removeHistoryItem = (index: number) => {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.remove-background-page {
|
.remove-background-page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100vh;
|
height: 100vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #f8fafc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.global-drag-overlay {
|
.global-drag-overlay {
|
||||||
@ -657,24 +659,32 @@ const removeHistoryItem = (index: number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.remove-background-page > .page-content {
|
|
||||||
width: 100%;
|
|
||||||
max-width: 1000px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-header {
|
.page-header {
|
||||||
|
flex-shrink: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 16px 24px;
|
padding: 12px 16px;
|
||||||
|
border-bottom: 1px solid #e5e7eb;
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-content {
|
||||||
|
flex: 1;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 1400px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 12px 16px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-header h2 {
|
.page-header h2 {
|
||||||
font-size: 24px;
|
font-size: 20px;
|
||||||
font-weight: 700;
|
font-weight: 600;
|
||||||
color: #1f2937;
|
color: #1f2937;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@ -756,19 +766,31 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.page-content {
|
.page-content {
|
||||||
position: relative;
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tool-container {
|
.tool-container {
|
||||||
|
flex: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 上传区域 */
|
/* 上传区域 */
|
||||||
.upload-section {
|
.upload-section {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 0;
|
||||||
background: white;
|
background: white;
|
||||||
border-radius: 16px;
|
border-radius: 12px;
|
||||||
padding: 32px;
|
padding: 24px;
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #e5e7eb;
|
||||||
}
|
}
|
||||||
@ -783,13 +805,18 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.upload-area {
|
.upload-area {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
border: 2px dashed #cbd5e1;
|
border: 2px dashed #cbd5e1;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 64px 32px;
|
padding: 32px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
background: #fafbfc;
|
background: #fafbfc;
|
||||||
|
min-height: 0;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: #1fc76f;
|
border-color: #1fc76f;
|
||||||
@ -812,9 +839,9 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.upload-icon {
|
.upload-icon {
|
||||||
width: 80px;
|
width: 64px;
|
||||||
height: 80px;
|
height: 64px;
|
||||||
border-radius: 20px;
|
border-radius: 16px;
|
||||||
background: linear-gradient(135deg, #1fc76f 0%, #16a085 100%);
|
background: linear-gradient(135deg, #1fc76f 0%, #16a085 100%);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -823,20 +850,20 @@ h1 {
|
|||||||
box-shadow: 0 4px 12px rgba(31, 199, 111, 0.25);
|
box-shadow: 0 4px 12px rgba(31, 199, 111, 0.25);
|
||||||
|
|
||||||
i {
|
i {
|
||||||
font-size: 40px;
|
font-size: 32px;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-area h3 {
|
.upload-area h3 {
|
||||||
font-size: 20px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #0f172a;
|
color: #0f172a;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-area p {
|
.upload-area p {
|
||||||
font-size: 14px;
|
font-size: 13px;
|
||||||
color: #64748b;
|
color: #64748b;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@ -849,10 +876,15 @@ h1 {
|
|||||||
|
|
||||||
/* 预览区域 */
|
/* 预览区域 */
|
||||||
.preview-section {
|
.preview-section {
|
||||||
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 0;
|
||||||
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -886,6 +918,7 @@ h1 {
|
|||||||
/* 对比视图 */
|
/* 对比视图 */
|
||||||
.comparison-view {
|
.comparison-view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -893,10 +926,12 @@ h1 {
|
|||||||
|
|
||||||
.comparison-container {
|
.comparison-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: min(90vw, 1200px, calc(100vh - 200px));
|
width: 100%;
|
||||||
aspect-ratio: 1;
|
height: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 12px;
|
border-radius: 8px;
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #e5e7eb;
|
||||||
background:
|
background:
|
||||||
linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
|
linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
|
||||||
@ -980,6 +1015,7 @@ h1 {
|
|||||||
/* 单图视图 */
|
/* 单图视图 */
|
||||||
.single-image-view {
|
.single-image-view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -987,10 +1023,12 @@ h1 {
|
|||||||
|
|
||||||
.image-wrapper {
|
.image-wrapper {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: min(90vw, 1200px, calc(100vh - 200px));
|
width: 100%;
|
||||||
aspect-ratio: 1;
|
height: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: 12px;
|
border-radius: 8px;
|
||||||
border: 1px solid #e5e7eb;
|
border: 1px solid #e5e7eb;
|
||||||
background:
|
background:
|
||||||
linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
|
linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
|
||||||
@ -1067,11 +1105,11 @@ h1 {
|
|||||||
|
|
||||||
/* 底部历史记录栏 */
|
/* 底部历史记录栏 */
|
||||||
.history-bar {
|
.history-bar {
|
||||||
|
flex-shrink: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 16px 0 0;
|
padding: 12px 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border-top: none;
|
border-top: 1px solid #e5e7eb;
|
||||||
margin-top: 24px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
@ -1105,8 +1143,8 @@ h1 {
|
|||||||
|
|
||||||
.history-item {
|
.history-item {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
width: 64px;
|
width: 56px;
|
||||||
height: 64px;
|
height: 56px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
@ -1235,34 +1273,68 @@ h1 {
|
|||||||
|
|
||||||
/* 响应式设计 */
|
/* 响应式设计 */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.remove-background-page {
|
.page-header {
|
||||||
padding: 12px;
|
padding: 10px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header h2 {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-content {
|
||||||
|
padding: 8px 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-section {
|
.upload-section {
|
||||||
padding: 20px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-area {
|
.upload-area {
|
||||||
padding: 40px 20px;
|
padding: 24px 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
.upload-icon {
|
||||||
font-size: 24px;
|
width: 56px;
|
||||||
}
|
height: 56px;
|
||||||
|
|
||||||
.page-icon {
|
|
||||||
width: 48px;
|
|
||||||
height: 48px;
|
|
||||||
|
|
||||||
i {
|
i {
|
||||||
font-size: 24px;
|
font-size: 28px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.upload-area h3 {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-area p {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview-section {
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-bar {
|
||||||
|
padding: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item {
|
||||||
|
width: 48px;
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
.history-scroll-container {
|
.history-scroll-container {
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
padding: 0 8px;
|
padding: 0 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.toolbar-btn {
|
||||||
|
width: 32px;
|
||||||
|
height: 32px;
|
||||||
|
|
||||||
|
i {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user