el-alert换成tooltip

This commit is contained in:
灌糖包子 2026-04-03 11:02:11 +08:00
parent 55877c5e92
commit c144830fd7
Signed by: sookie
GPG Key ID: 67E8D0AE905C79B0
3 changed files with 8 additions and 12 deletions

2
components.d.ts vendored
View File

@ -7,7 +7,6 @@ export {}
declare module '@vue/runtime-core' { declare module '@vue/runtime-core' {
export interface GlobalComponents { export interface GlobalComponents {
ElAlert: typeof import('element-plus/es')['ElAlert']
ElAside: typeof import('element-plus/es')['ElAside'] ElAside: typeof import('element-plus/es')['ElAside']
ElButton: typeof import('element-plus/es')['ElButton'] ElButton: typeof import('element-plus/es')['ElButton']
ElCol: typeof import('element-plus/es')['ElCol'] ElCol: typeof import('element-plus/es')['ElCol']
@ -40,6 +39,7 @@ declare module '@vue/runtime-core' {
ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs'] ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag'] ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
ElTransfer: typeof import('element-plus/es')['ElTransfer'] ElTransfer: typeof import('element-plus/es')['ElTransfer']
ElTree: typeof import('element-plus/es')['ElTree'] ElTree: typeof import('element-plus/es')['ElTree']
ElUpload: typeof import('element-plus/es')['ElUpload'] ElUpload: typeof import('element-plus/es')['ElUpload']

View File

@ -1,9 +1,5 @@
<template> <template>
<div class="page-wrapper"> <div class="page-wrapper">
<el-alert type="info" show-icon :closable="false" style="margin-bottom: 10px" >
<template #title>上传要求</template>
图片格式为{{allowUploadExt.join('、')}}文件大小不超过10MB
</el-alert>
<el-form inline :model="search"> <el-form inline :model="search">
<el-form-item label="文件名"> <el-form-item label="文件名">
<el-input v-model="search.name" /> <el-input v-model="search.name" />
@ -41,7 +37,9 @@
auto-upload auto-upload
:show-file-list="false" :show-file-list="false"
style="display: inline-block;margin-right: 10px;"> style="display: inline-block;margin-right: 10px;">
<el-button type="primary" icon="Upload" :loading="isUploading" v-permission="'photoWall:save'" plain>上传图片</el-button> <el-tooltip :content="`图片格式为${allowUploadExt.join('、')}文件大小不超过10MB。`">
<el-button type="primary" icon="Upload" :loading="isUploading" v-permission="'photoWall:save'" plain>上传图片</el-button>
</el-tooltip>
</el-upload> </el-upload>
<el-button type="danger" @click="deleteAll" style="vertical-align: bottom" v-permission="'photoWall:delete'" plain>批量删除</el-button> <el-button type="danger" @click="deleteAll" style="vertical-align: bottom" v-permission="'photoWall:delete'" plain>批量删除</el-button>
<div class="search-btn"> <div class="search-btn">

View File

@ -1,10 +1,6 @@
<template> <template>
<div class="page-wrapper"> <div class="page-wrapper">
<el-alert type="info" show-icon :closable="false" > <div class="btn-container">
<template #title>上传要求</template>
图片格式为{{allowUploadExt.join('、')}}文件大小不超过10MB
</el-alert>
<div class="btn-container" style="margin-top:10px;">
<el-upload <el-upload
:action="`${apiBase}/source-image/upload`" :action="`${apiBase}/source-image/upload`"
accept="image/jpeg,image/png,image/svg+xml,image/x-icon" accept="image/jpeg,image/png,image/svg+xml,image/x-icon"
@ -16,7 +12,9 @@
auto-upload auto-upload
:show-file-list="false" :show-file-list="false"
style="display: inline-block;margin-right: 10px;"> style="display: inline-block;margin-right: 10px;">
<el-button type="primary" icon="Upload" :loading="isUploading" v-permission="'sourceImage:save'" plain>上传图片</el-button> <el-tooltip :content="`图片格式为${allowUploadExt.join('、')}文件大小不超过10MB。`">
<el-button type="primary" icon="Upload" :loading="isUploading" v-permission="'sourceImage:save'" plain>上传图片</el-button>
</el-tooltip>
</el-upload> </el-upload>
<el-button type="danger" @click="deleteAll" style="vertical-align: bottom" v-permission="'sourceImage:delete'" plain>批量删除</el-button> <el-button type="danger" @click="deleteAll" style="vertical-align: bottom" v-permission="'sourceImage:delete'" plain>批量删除</el-button>
</div> </div>