-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style: Optimize layout style #7359
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,36 +13,40 @@ | |
.d-name { | ||
height: 20%; | ||
.name { | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
max-width: 120px; | ||
font-weight: 500; | ||
font-size: 18px; | ||
color: var(--panel-text-color); | ||
} | ||
.status { | ||
margin-left: 10px; | ||
margin-left: 5px; | ||
} | ||
.h-button { | ||
float: right; | ||
margin-right: 10px; | ||
margin-right: 5px; | ||
} | ||
.msg { | ||
margin-left: 10px; | ||
margin-left: 5px; | ||
} | ||
.el-button + .el-button { | ||
margin-left: 6px; | ||
} | ||
} | ||
|
||
.d-description { | ||
margin-top: 10px; | ||
overflow: hidden; | ||
display: -webkit-box; | ||
-webkit-line-clamp: 2; | ||
-webkit-box-orient: vertical; | ||
.el-tag { | ||
margin-right: 5px; | ||
} | ||
.description { | ||
margin-top: 10px; | ||
font-size: 14px; | ||
color: var(--el-text-color-regular); | ||
} | ||
} | ||
.description { | ||
margin-top: 10px; | ||
font-size: 14px; | ||
color: var(--el-text-color-regular); | ||
} | ||
.d-button { | ||
margin-top: 10px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The modified CSS contains several changes and improvements to enhance readability and layout consistency. The key points include:
These changes should improve UI consistency and readability without introducing significant technical inconsistencies or bugs. If further optimizations are needed based on specific requirements or performance considerations, additional review would be required. |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -94,11 +94,11 @@ | |
:md="24" | ||
:lg="12" | ||
:xl="12" | ||
class="install-card-col-12" | ||
:class="mode === 'upgrade' ? 'upgrade-card-col-12' : 'install-card-col-12'" | ||
> | ||
<div class="install-card"> | ||
<el-card class="e-card"> | ||
<el-row :gutter="20"> | ||
<el-row :gutter="10"> | ||
<el-col :xs="3" :sm="3" :md="3" :lg="4" :xl="4"> | ||
<div class="icon" @click.stop="openDetail(installed.appKey)"> | ||
<el-avatar | ||
|
@@ -112,9 +112,10 @@ | |
<div class="a-detail"> | ||
<div class="d-name"> | ||
<el-button link type="info"> | ||
<span class="name">{{ installed.name }}</span> | ||
<el-tooltip effect="dark" :content="installed.name" placement="top"> | ||
<span class="name">{{ installed.name }}</span> | ||
</el-tooltip> | ||
</el-button> | ||
|
||
<span class="status"> | ||
<Status :key="installed.status" :status="installed.status"></Status> | ||
</span> | ||
|
@@ -210,7 +211,7 @@ | |
{{ $t('commons.button.upgrade') }} | ||
</el-button> | ||
</div> | ||
<div class="d-description"> | ||
<div class="d-description flex flex-wrap items-center justify-start gap-1.5"> | ||
<el-button class="tagMargin" plain size="small"> | ||
{{ $t('app.version') }}{{ $t('commons.colon') }}{{ installed.version }} | ||
</el-button> | ||
|
@@ -237,17 +238,16 @@ | |
{{ $t('app.busPort') }}{{ $t('commons.colon') | ||
}}{{ installed.httpsPort }} | ||
</el-button> | ||
|
||
<div class="description"> | ||
<span> | ||
{{ $t('app.alreadyRun') }}{{ $t('commons.colon') }} | ||
{{ getAge(installed.createdAt) }} | ||
</span> | ||
</div> | ||
</div> | ||
<div class="description"> | ||
<span> | ||
{{ $t('app.alreadyRun') }}{{ $t('commons.colon') }} | ||
{{ getAge(installed.createdAt) }} | ||
</span> | ||
</div> | ||
<div class="app-divider" /> | ||
<div | ||
class="d-button flex flex-wrap items-center justify-start gap-3" | ||
class="d-button flex flex-wrap items-center justify-start gap-1.5" | ||
v-if="mode === 'installed' && installed.status != 'Installing'" | ||
> | ||
<el-button | ||
|
@@ -386,7 +386,7 @@ const sync = () => { | |
try { | ||
await SyncInstalledApp(); | ||
MsgSuccess(i18n.global.t('app.syncSuccess')); | ||
search(); | ||
await search(); | ||
} finally { | ||
syncLoading.value = false; | ||
} | ||
|
@@ -631,10 +631,31 @@ onUnmounted(() => { | |
|
||
<style scoped lang="scss"> | ||
@import '../index.scss'; | ||
@media only screen and (max-width: 1300px) { | ||
@media only screen and (max-width: 1400px) { | ||
.install-card-col-12 { | ||
max-width: 100%; | ||
flex: 0 0 100%; | ||
.a-detail { | ||
.d-name { | ||
.name { | ||
max-width: 300px; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@media only screen and (max-width: 1499px) { | ||
.upgrade-card-col-12 { | ||
max-width: 100%; | ||
flex: 0 0 100%; | ||
.a-detail { | ||
.d-name { | ||
.name { | ||
max-width: 300px; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
@@ -647,4 +668,9 @@ onUnmounted(() => { | |
margin-left: 0; | ||
} | ||
} | ||
.d-description { | ||
.el-button + .el-button { | ||
margin-left: 0; | ||
} | ||
} | ||
</style> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code contains a few small improvements to enhance readability, maintainability, and performance:
Here's the revised CSS part: @import '../index.scss';
@media only screen and (max-width: 1400px) {
.install-card-col-12,
.upgrade-card-col-12 { /* Ensure both classes match */
max-width: 100%;
flex: 0 0 100%; /* Using min-width ensures content doesn't overflow */
.a-detail {
.d-name {
.name {
max-width: 300px;
}
}
}
}
}
.d-description {
.el-button + .el-button { /* Adjust spacing if needed*/
margin-left: 0; /* Ensures button spacing */
}
} Additionally, ensure that there are no syntax errors in your JavaScript functions such as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes provided do not appear to have any specific errors or significant issues. However, there are a few things that could be improved:
Consistency: It would be more consistent to use
value
when accessing reactive properties in templates.Error Handling: If you want to ensure that
docsUrl
has a valid value before using it, you can add some checks or error handling logic.These improvements make the code cleaner and more robust.