-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: typos #4182
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
fix: typos #4182
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 |
|---|---|---|
|
|
@@ -17,7 +17,7 @@ | |
| > | ||
| <el-option :label="$t('common.creator')" value="create_user" /> | ||
| <el-option :label="$t('common.name')" value="name" /> | ||
| <el-option :label="$t('views.system.resource_management.type')" value="type"/> | ||
| <el-option :label="$t('views.system.resource_management.type')" value="type" /> | ||
| </el-select> | ||
| <el-input | ||
| v-if="search_type === 'name'" | ||
|
|
@@ -45,7 +45,7 @@ | |
| filterable | ||
| style="width: 220px" | ||
| > | ||
| <el-option v-for="u in type_options" :value="u.value" :label="u.label"/> | ||
| <el-option v-for="u in type_options" :value="u.value" :label="u.label" /> | ||
| </el-select> | ||
| </div> | ||
| </div> | ||
|
|
@@ -306,7 +306,7 @@ const ManagePermission = () => { | |
| permissionPrecise.value.hit_test() | ||
| ) | ||
| } | ||
| // sync generete edit export delete | ||
|
|
||
| const MoreFilledPermission = () => { | ||
| return ( | ||
| permissionPrecise.value.sync() || | ||
|
Contributor
Author
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 is syntactically correct. It appears to be managing a dropdown menu with options for different search types (creator, name) and handling filtering based on those selections. Here are some general suggestions:
Here's an optimized version of the const MoreFilledPermission = () => {
return (
permissionPrecise.value.sync() || // Sync permissions data
permissionPrecise.value.fetchResources() // Fetch resources based on current filters
);
}By making these slight improvements, you enhance both readability and maintainability of the codebase. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -296,7 +296,6 @@ const paginationConfig = reactive({ | |
| total: 0, | ||
| }) | ||
|
|
||
| // sync generete edit export delete | ||
| const MoreFilledPermission = () => { | ||
| return permissionPrecise.value.delete() || permissionPrecise.value.modify() | ||
| } | ||
|
Contributor
Author
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 is no immediate issue with this code snippet that requires adjustment. However, if you want to optimize it slightly and improve clarity: const paginationConfig = reactive({
total: 0,
})
// Suggest renaming generateExportDeletePermissions to make the function name more descriptive
const generateExportDeletePermissions = () => {
return [
permissionPrecise.value.delete(),
permissionPrecise.value.modify(), // Assuming both are booleans or can be truthy/falsy
].some(Boolean) || false; // Using Array.prototype.some for a cleaner approach
}This version uses Additionally, consider handling edge cases where neither operation ( |
||
|
|
||
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 is generally well-structured, but there are a few small issues and enhancements that could be made:
Issues/Improvements:
Typo in
containerAttribute:<el-anchor>component, the attribute used for the container should be.paragraph-scollbar, not.paragragh-scollar. Ensure consistency with HTML tags.Redundant Class Naming:
el-scrollbar), which might contribute to confusion or redundancy. Consider renaming one of these classes if they serve different purposes.Consistent Styling and Layout:
Here's the revised version with these improvements applied:
Remember to make necessary adjustments based on the specific context and requirements of your application.