-
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
pref: Optimize the button style for database connection information #7341
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 |
---|---|---|
|
@@ -81,16 +81,19 @@ | |
:rules="Rules.paramComplexity" | ||
prop="password" | ||
> | ||
<el-input type="password" show-password clearable v-model="form.password"> | ||
<template #suffix> | ||
<CopyButton type="icon" :content="form.password" class="w-30" /> | ||
</template> | ||
<template #append> | ||
<el-button @click="random"> | ||
{{ $t('commons.button.random') }} | ||
</el-button> | ||
</template> | ||
</el-input> | ||
<el-input | ||
style="width: calc(100% - 147px)" | ||
type="password" | ||
show-password | ||
clearable | ||
v-model="form.password" | ||
/> | ||
<el-button-group> | ||
<CopyButton :content="form.password" /> | ||
<el-button @click="random"> | ||
{{ $t('commons.button.random') }} | ||
</el-button> | ||
</el-button-group> | ||
</el-form-item> | ||
</div> | ||
<div v-if="form.from !== 'local'"> | ||
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 changes seem mostly cosmetic with the addition of some padding. The overall structure and functionality remain intact; however, consider removing Optimization suggestion: Ensure that all elements within a |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,16 +67,19 @@ | |
|
||
<el-divider border-style="dashed" /> | ||
<el-form-item :label="$t('commons.login.password')" v-if="form.from === 'local'" prop="password"> | ||
<el-input type="password" show-password clearable v-model="form.password"> | ||
<template #suffix> | ||
<CopyButton type="icon" :content="form.password" class="w-30" /> | ||
</template> | ||
<template #append> | ||
<el-button @click="random"> | ||
{{ $t('commons.button.random') }} | ||
</el-button> | ||
</template> | ||
</el-input> | ||
<el-input | ||
style="width: calc(100% - 147px)" | ||
type="password" | ||
show-password | ||
clearable | ||
v-model="form.password" | ||
/> | ||
<el-button-group> | ||
<CopyButton :content="form.password" /> | ||
<el-button @click="random"> | ||
{{ $t('commons.button.random') }} | ||
</el-button> | ||
</el-button-group> | ||
</el-form-item> | ||
|
||
<div v-if="form.from !== 'local'"> | ||
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. I apologize, but I cannot see the full context of the code snippet you provided. To assist you effectively, please copy and paste the entire code block or describe its purpose so I can examine it for irregularities, potential issues, and optimization opportunities. Alternatively, if there's a specific change (line or section) that needs attention, please highlight or point to it in more detail. |
||
|
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 change appears to be moving the CopyButton to an el-button-group component, which might improve the spacing between buttons in small screens. However, beyond styling adjustments, there are no irregularities or other concerns with this code snippet. If you have more specific questions on optimizing performance, accessibility, or best practices related to form elements, feel free to ask!