-
Notifications
You must be signed in to change notification settings - Fork 2.9k
style: Code Style Format #7351
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: Code Style Format #7351
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 |
|---|---|---|
|
|
@@ -44,7 +44,11 @@ | |
| <span v-if="!data.isExist">{{ $t('tool.supervisor.notSupport') }}</span> | ||
| <span v-else-if="!data.ctlExist">{{ $t('tool.supervisor.notSupportCrl') }}</span> | ||
| <span v-else-if="data.init">{{ $t('tool.supervisor.initHelper') }}</span> | ||
| <span @click="toDoc()" v-if="!data.isExist || !data.ctlExist" class="flex items-center justify-center gap-0.5"> | ||
| <span | ||
| @click="toDoc()" | ||
| v-if="!data.isExist || !data.ctlExist" | ||
| class="flex items-center justify-center gap-0.5" | ||
| > | ||
| <el-icon><Position /></el-icon> | ||
| {{ $t('firewall.quickJump') }} | ||
| </span> | ||
|
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 this diff chunk, there are several improvements to enhance readability and maintainability:
Here's the refactored code snippet: @@ -44,8 +44,11 @@
<span v-if="!data.isExist">{{ $t('tool.supervisor.notSupport') }}</span>
<span v-else-if="!data.ctlExist">{{ $t('tool.supervisor.notSupportCrl') }}</span>
<span v-else-if="data.init">{{ $t('tool.supervisor.initHelper') }}</span>
<span
@click="toDoc()"
- v-if="!data.isExist || !data.ctlExist"
+ v-if="!data.isExist || !data.ctlExist && data !== null"
- class="flex items-center justify-center gap-0.5"
class="flex items-center justify-center gap-0.5">
<el-icon><Position /></el-icon>{{ $t('firewall.quickJump') }}
</span>Additional Suggestions
These changes make the code cleaner and more robust while maintaining functionality. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -94,7 +94,7 @@ | |
| </div> | ||
| </template> | ||
| </el-table-column> | ||
| <el-table-column :label="$t('website.sitePath')" prop="sitePath"> | ||
| <el-table-column :label="$t('website.sitePath')" prop="sitePath" width="90px"> | ||
| <template #default="{ row }"> | ||
| <el-button type="primary" link @click="toFolder(row.sitePath + '/index')"> | ||
| <el-icon> | ||
|
|
@@ -134,7 +134,7 @@ | |
| :label="$t('website.expireDate')" | ||
| prop="expireDate" | ||
| :sortable="'custom'" | ||
| min-width="120px" | ||
| min-width="150px" | ||
| > | ||
| <template #default="{ row }"> | ||
| <div v-if="row.showdate"> | ||
|
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. The provided code snippet contains some changes that could potentially need attention:
In summary, these changes adjust column widths based on content analysis, which can improve usability depending on how much space each cell typically takes up. |
||
|
|
||
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 provided code snippet does not contain any irregularities or potential issues at the specified line numbers. The import statements for
ElMessageBox,i18n,MsgSuccess, andPositionare correctly placed within their respective sections of the file.There is also no need to make any optimizations to the code in this specific area since it appears to be part of a TypeScript setup involving imports for Element Plus components and utility functions. If there were further lines for adjustments or corrections, I would gladly provide those accordingly.