fix: 统一抽屉警告或提示信息样式 (#1453)

pull/1464/head
ssongliu 2023-06-27 16:44:03 +08:00 committed by GitHub
parent 3a8c3b5816
commit 11a58fde91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 43 additions and 46 deletions

View File

@ -11,9 +11,12 @@
</template> </template>
<el-row v-loading="loading"> <el-row v-loading="loading">
<el-col :span="22" :offset="1"> <el-col :span="22" :offset="1">
<el-alert type="error" :closable="false"> <el-alert
<p>{{ $t('app.appInstallWarn') }}</p> :title="$t('app.appInstallWarn')"
</el-alert> style="margin-bottom: 20px"
:closable="false"
type="error"
/>
<el-form <el-form
@submit.prevent @submit.prevent
ref="paramForm" ref="paramForm"

View File

@ -20,7 +20,12 @@
</el-row> </el-row>
<el-row v-else v-loading="loading"> <el-row v-else v-loading="loading">
<el-col :span="22" :offset="1"> <el-col :span="22" :offset="1">
<el-alert :title="$t('app.updateHelper')" type="warning" :closable="false" /> <el-alert
:title="$t('app.updateHelper')"
type="warning"
:closable="false"
style="margin-bottom: 20px"
/>
<el-form @submit.prevent ref="paramForm" :model="paramModel" label-position="top" :rules="rules"> <el-form @submit.prevent ref="paramForm" :model="paramModel" label-position="top" :rules="rules">
<div v-for="(p, index) in params" :key="index"> <div v-for="(p, index) in params" :key="index">
<el-form-item :prop="p.key" :label="getLabel(p)"> <el-form-item :prop="p.key" :label="getLabel(p)">

View File

@ -64,11 +64,7 @@
</span> </span>
</template> </template>
</el-alert> </el-alert>
<el-alert type="info" :closable="false" v-if="mode === 'upgrade'"> <el-alert type="info" :title="$t('app.upgradeHelper')" :closable="false" v-if="mode === 'upgrade'" />
<template #default>
<span>{{ $t('app.upgradeHelper') }}</span>
</template>
</el-alert>
<div class="update-prompt" v-if="data == null"> <div class="update-prompt" v-if="data == null">
<span>{{ mode === 'upgrade' ? $t('app.updatePrompt') : $t('app.installPrompt') }}</span> <span>{{ mode === 'upgrade' ? $t('app.updatePrompt') : $t('app.installPrompt') }}</span>
<div> <div>

View File

@ -3,16 +3,17 @@
<template #header> <template #header>
<DrawerHeader :header="$t('container.upgrade')" :resource="form.name" :back="handleClose" /> <DrawerHeader :header="$t('container.upgrade')" :resource="form.name" :back="handleClose" />
</template> </template>
<el-alert v-if="form.fromApp" style="margin-bottom: 20px" :closable="false" type="error">
<template #default> <el-row v-loading="loading">
<span> <el-col :span="22" :offset="1">
<span>{{ $t('container.appHelper') }}</span> <el-alert
</span> v-if="form.fromApp"
</template> :title="$t('container.appHelper')"
</el-alert> style="margin-bottom: 20px"
<el-form @submit.prevent ref="formRef" v-loading="loading" :model="form" label-position="top"> :closable="false"
<el-row type="flex" justify="center"> type="error"
<el-col :span="22"> />
<el-form @submit.prevent ref="formRef" v-loading="loading" :model="form" label-position="top">
<el-form-item :label="$t('container.oldImage')" prop="oldImage"> <el-form-item :label="$t('container.oldImage')" prop="oldImage">
<el-tag>{{ form.imageName }}:{{ form.oldTag }}</el-tag> <el-tag>{{ form.imageName }}:{{ form.oldTag }}</el-tag>
</el-form-item> </el-form-item>
@ -22,9 +23,9 @@
</el-input> </el-input>
<span class="input-help">{{ $t('container.upgradeHelper') }}</span> <span class="input-help">{{ $t('container.upgradeHelper') }}</span>
</el-form-item> </el-form-item>
</el-col> </el-form>
</el-row> </el-col>
</el-form> </el-row>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button :disabled="loading" @click="drawerVisiable = false"> <el-button :disabled="loading" @click="drawerVisiable = false">

View File

@ -45,7 +45,7 @@ const acceptParams = (props: InstallRrops) => {
}; };
const toApp = () => { const toApp = () => {
router.push({ name: 'App' }); router.push({ name: 'AppInstalled' });
}; };
defineExpose({ defineExpose({

View File

@ -5,6 +5,7 @@
</template> </template>
<el-row> <el-row>
<el-col :span="22" :offset="1"> <el-col :span="22" :offset="1">
<el-alert :title="$t('file.ownerHelper')" type="info" :closable="false" style="margin-bottom: 20px" />
<el-form <el-form
ref="fileForm" ref="fileForm"
label-position="top" label-position="top"
@ -22,9 +23,6 @@
<el-form-item v-if="isDir"> <el-form-item v-if="isDir">
<el-checkbox v-model="addForm.sub">{{ $t('file.containSub') }}</el-checkbox> <el-checkbox v-model="addForm.sub">{{ $t('file.containSub') }}</el-checkbox>
</el-form-item> </el-form-item>
<el-form-item>
<el-alert :title="$t('file.ownerHelper')" type="info" :closable="false" />
</el-form-item>
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>

View File

@ -2,13 +2,7 @@
<div> <div>
<LayoutContent v-loading="loading" :title="$t('ssh.loginLogs')"> <LayoutContent v-loading="loading" :title="$t('ssh.loginLogs')">
<template #prompt> <template #prompt>
<el-alert type="info" :closable="false"> <el-alert type="info" :title="$t('ssh.sshAlert')" :closable="false" />
<template #default>
<span>
{{ $t('ssh.sshAlert') }}
</span>
</template>
</el-alert>
</template> </template>
<template #toolbar> <template #toolbar>
<el-row> <el-row>

View File

@ -4,16 +4,16 @@
<template #header> <template #header>
<DrawerHeader :header="$t('setting.timeZone')" :back="handleClose" /> <DrawerHeader :header="$t('setting.timeZone')" :back="handleClose" />
</template> </template>
<el-alert v-if="canChangeZone()" style="margin-bottom: 20px" :closable="false" type="warning"> <el-row type="flex" justify="center">
<template #default> <el-col :span="22">
<span> <el-alert
<span>{{ $t('setting.timeZoneHelper') }}</span> v-if="canChangeZone()"
</span> :title="$t('setting.timeZoneHelper')"
</template> style="margin-bottom: 20px"
</el-alert> :closable="false"
<el-form ref="formRef" label-position="top" :model="form" @submit.prevent v-loading="loading"> type="warning"
<el-row type="flex" justify="center"> />
<el-col :span="22"> <el-form ref="formRef" label-position="top" :model="form" @submit.prevent v-loading="loading">
<el-form-item :label="$t('setting.timeZone')" prop="timeZone" :rules="Rules.requiredInput"> <el-form-item :label="$t('setting.timeZone')" prop="timeZone" :rules="Rules.requiredInput">
<el-select filterable :disabled="canChangeZone()" v-model="form.timeZone"> <el-select filterable :disabled="canChangeZone()" v-model="form.timeZone">
<el-option v-for="item in zones" :key="item" :label="item" :value="item" /> <el-option v-for="item in zones" :key="item" :label="item" :value="item" />
@ -46,9 +46,9 @@
{{ $t('setting.timeZoneNY') }} {{ $t('setting.timeZoneNY') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
</el-col> </el-form>
</el-row> </el-col>
</el-form> </el-row>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="drawerVisiable = false">{{ $t('commons.button.cancel') }}</el-button> <el-button @click="drawerVisiable = false">{{ $t('commons.button.cancel') }}</el-button>