1
0
mirror of https://github.com/1Panel-dev/1Panel.git synced 2025-01-19 00:09:16 +08:00

pref: Optimize the button style for database connection information (#7341)

This commit is contained in:
ssongliu 2024-12-12 10:37:49 +08:00 committed by GitHub
parent 013cf21863
commit 0542b39373
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 40 additions and 31 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<el-button v-if="type == 'icon'" link @click="copyText(content)" icon="DocumentCopy" class="ml-1.5"></el-button> <el-button v-if="type == 'icon'" link @click="copyText(content)" icon="DocumentCopy" class="ml-1.5"></el-button>
<el-button type="primary" @click="copyText(content)" v-else>{{ $t('commons.button.copy') }}</el-button> <el-button @click="copyText(content)" v-else>{{ $t('commons.button.copy') }}</el-button>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>

View File

@ -80,16 +80,19 @@
:rules="Rules.paramComplexity" :rules="Rules.paramComplexity"
prop="password" prop="password"
> >
<el-input type="password" show-password clearable v-model="form.password"> <el-input
<template #suffix> style="width: calc(100% - 147px)"
<CopyButton type="icon" :content="form.password" class="w-30" /> type="password"
</template> show-password
<template #append> clearable
<el-button @click="random"> v-model="form.password"
{{ $t('commons.button.random') }} />
</el-button> <el-button-group>
</template> <CopyButton :content="form.password" />
</el-input> <el-button @click="random">
{{ $t('commons.button.random') }}
</el-button>
</el-button-group>
</el-form-item> </el-form-item>
</div> </div>

View File

@ -81,16 +81,19 @@
:rules="Rules.paramComplexity" :rules="Rules.paramComplexity"
prop="password" prop="password"
> >
<el-input type="password" show-password clearable v-model="form.password"> <el-input
<template #suffix> style="width: calc(100% - 147px)"
<CopyButton type="icon" :content="form.password" class="w-30" /> type="password"
</template> show-password
<template #append> clearable
<el-button @click="random"> v-model="form.password"
{{ $t('commons.button.random') }} />
</el-button> <el-button-group>
</template> <CopyButton :content="form.password" />
</el-input> <el-button @click="random">
{{ $t('commons.button.random') }}
</el-button>
</el-button-group>
</el-form-item> </el-form-item>
</div> </div>
<div v-if="form.from !== 'local'"> <div v-if="form.from !== 'local'">

View File

@ -67,16 +67,19 @@
<el-divider border-style="dashed" /> <el-divider border-style="dashed" />
<el-form-item :label="$t('commons.login.password')" v-if="form.from === 'local'" prop="password"> <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"> <el-input
<template #suffix> style="width: calc(100% - 147px)"
<CopyButton type="icon" :content="form.password" class="w-30" /> type="password"
</template> show-password
<template #append> clearable
<el-button @click="random"> v-model="form.password"
{{ $t('commons.button.random') }} />
</el-button> <el-button-group>
</template> <CopyButton :content="form.password" />
</el-input> <el-button @click="random">
{{ $t('commons.button.random') }}
</el-button>
</el-button-group>
</el-form-item> </el-form-item>
<div v-if="form.from !== 'local'"> <div v-if="form.from !== 'local'">