-
Notifications
You must be signed in to change notification settings - Fork 3.2k
style: Adjust the global interval style #8408
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
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 |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ | |
|
|
||
| <el-alert | ||
| v-if="!isSafety && globalStore.showEntranceWarn" | ||
| style="margin-top: 20px" | ||
| class="card-interval" | ||
| type="warning" | ||
| @close="hideEntrance" | ||
| > | ||
|
|
@@ -40,7 +40,7 @@ | |
| </template> | ||
| </el-alert> | ||
|
|
||
| <el-row :gutter="20" style="margin-top: 20px"> | ||
| <el-row :gutter="7" class="card-interval"> | ||
| <el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16"> | ||
| <CardWithHeader :header="$t('menu.home')" height="166px"> | ||
| <template #body> | ||
|
|
@@ -82,12 +82,12 @@ | |
| </div> | ||
| </template> | ||
| </CardWithHeader> | ||
| <CardWithHeader :header="$t('commons.table.status')" style="margin-top: 20px"> | ||
| <CardWithHeader :header="$t('commons.table.status')" class="card-interval"> | ||
| <template #body> | ||
| <Status ref="statusRef" style="margin-bottom: 33px" /> | ||
| </template> | ||
| </CardWithHeader> | ||
| <CardWithHeader :header="$t('menu.monitor')" style="margin-top: 20px; margin-bottom: 20px"> | ||
| <CardWithHeader :header="$t('menu.monitor')" class="card-interval"> | ||
| <template #header-r> | ||
| <el-radio-group | ||
| style="float: right; margin-left: 5px" | ||
|
|
@@ -253,7 +253,7 @@ | |
| </template> | ||
| </CardWithHeader> | ||
|
|
||
| <AppLauncher ref="appRef" style="margin-top: 20px" /> | ||
| <AppLauncher ref="appRef" class="card-interval" /> | ||
| </el-col> | ||
| </el-row> | ||
|
|
||
|
Member
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. In the provided code snippet, there are a few potential issues and optimizations that could be considered:
Here’s an optimized version with suggested changes: -<el-row :gutter="20" style="margin-top: 20px">
+<el-row :gutter="[20, 7]"> <!-- Use array syntax for consistent gutter settings -->
<el-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
<CardWithHeader :header="$t('menu.home')" height="166px">
<template #body>
<div></div> <!-- Template content here -->
</template>
</CardWithHeader>
<CardWithHeader :header="$t('commons.table.status')" class="card-interval">
<template #body>
<Status ref="statusRef" />
</template>
</CardWithHeader>
<CardWithHeader :header="$t('menu.monitor')" class="card-interval">
<template r>
<el-radio-group
style="float: right; margin-left: 5px"
>
<!-- Radio group options go here -->
</el-radio-group>
</template>
</CardWithHeader>
<CardWithHeader header="$t('menu.app.launcher')" class="card-interval">
<template #body>
<AppLauncher ref="appRef"/>
</template>
</CardWithHeader>
</el-col>
</el-row>Key Changes:
These improvements make the code more maintainable and adhere to best practices. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,8 +2,8 @@ | |
| <div> | ||
| <el-tabs | ||
| type="card" | ||
| class="terminal-tabs" | ||
| style="background-color: var(--panel-terminal-tag-bg-color); margin-top: 20px" | ||
| class="terminal-tabs card-interval" | ||
| style="background-color: var(--panel-terminal-tag-bg-color)" | ||
| v-model="terminalValue" | ||
| :before-leave="beforeLeave" | ||
| @tab-change="quickCmd = ''" | ||
|
|
@@ -246,13 +246,13 @@ const cleanTimer = () => { | |
| }; | ||
|
|
||
| const loadHeight = () => { | ||
| return globalStore.openMenuTabs ? '269px' : '229px'; | ||
| return globalStore.openMenuTabs ? '230px' : '190px'; | ||
| }; | ||
| const loadEmptyHeight = () => { | ||
| return globalStore.openMenuTabs ? '240px' : '200px'; | ||
| return globalStore.openMenuTabs ? '201px' : '156px'; | ||
| }; | ||
| const loadFullScreenHeight = () => { | ||
| return globalStore.openMenuTabs ? '66px' : '90px'; | ||
| return globalStore.openMenuTabs ? '105px' : '60px'; | ||
| }; | ||
|
|
||
| const handleTabsRemove = (targetName: string, action: 'remove' | 'add') => { | ||
|
Member
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. There are several areas of optimization and potential issues you could address: Potential Issues:
Optimization Suggestions:
By applying these suggestions, you enhance not only the readability but also maintainability and performance of your application. Make sure to test thoroughly after making changes to ensure they behave as expected across various scenarios. |
||
|
|
||
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 only significant change between versions is that the
el-collapseclass has been modified from "mt-5" to "card-interval". This could potentially affect spacing and styling when applied elsewhere in the codebase. However, without more context or additional changes, it's not clear whether this is an intentional adjustment for layout improvements.