refactor(components): 优化多个组件的样式和布局
- 调整了多个组件的输入框、按钮等元素的样式 - 优化了部分对话框的布局结构 - 统一了表单项的样式 - 调整了部分字体大小和颜色
This commit is contained in:
@ -1,29 +1,11 @@
|
||||
<template>
|
||||
<div class="upload-file">
|
||||
<el-upload
|
||||
ref="fileUploadRef"
|
||||
multiple
|
||||
:action="realUploadUrl"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:file-list="fileList"
|
||||
:limit="limit"
|
||||
:on-error="handleUploadError"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handleUploadSuccess"
|
||||
:show-file-list="showFileList"
|
||||
:on-preview="handlePreview"
|
||||
:headers="headers"
|
||||
class="upload-file-uploader"
|
||||
:list-type="isConstruction ? 'picture-card' : 'text'"
|
||||
:accept="accept"
|
||||
:drag="isDarg"
|
||||
:data="data"
|
||||
:auto-upload="autoUpload"
|
||||
:on-change="handleChange"
|
||||
:on-remove="handleRemove"
|
||||
:method="method"
|
||||
:http-request="customUpload"
|
||||
>
|
||||
<el-upload ref="fileUploadRef" multiple :action="realUploadUrl" :before-upload="handleBeforeUpload"
|
||||
:file-list="fileList" :limit="limit" :on-error="handleUploadError" :on-exceed="handleExceed"
|
||||
:on-success="handleUploadSuccess" :show-file-list="showFileList" :on-preview="handlePreview" :headers="headers"
|
||||
class="upload-file-uploader" :list-type="isConstruction ? 'picture-card' : 'text'" :accept="accept" :drag="isDarg"
|
||||
:data="data" :auto-upload="autoUpload" :on-change="handleChange" :on-remove="handleRemove" :method="method"
|
||||
:http-request="customUpload">
|
||||
<slot>
|
||||
<div>
|
||||
<!-- 上传按钮 -->
|
||||
@ -42,20 +24,10 @@
|
||||
的文件
|
||||
</div>
|
||||
<!-- 文件列表 -->
|
||||
<transition-group
|
||||
v-if="!isConstruction && !isImportInfo"
|
||||
class="upload-file-list el-upload-list el-upload-list--text"
|
||||
name="el-fade-in-linear"
|
||||
tag="ul"
|
||||
@click.stop
|
||||
>
|
||||
<li
|
||||
style="margin-top: 10px"
|
||||
v-for="(file, index) in fileList"
|
||||
:key="file.uid"
|
||||
class="el-upload-list__item ele-upload-list__item-content"
|
||||
v-if="autoUpload"
|
||||
>
|
||||
<transition-group v-if="!isConstruction && !isImportInfo"
|
||||
class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul" @click.stop>
|
||||
<li style="margin-top: 10px" v-for="(file, index) in fileList" :key="file.uid"
|
||||
class="el-upload-list__item ele-upload-list__item-content" v-if="autoUpload">
|
||||
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
||||
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
||||
</el-link>
|
||||
@ -305,8 +277,6 @@ const handleChange = (file: any, filelist: any) => {
|
||||
|
||||
// 删除文件
|
||||
const handleRemove = (file: any, fileList: any) => {
|
||||
console.log(11);
|
||||
|
||||
emit('handleRemove', file, fileList);
|
||||
};
|
||||
|
||||
@ -470,7 +440,7 @@ defineExpose({ submitUpload });
|
||||
}
|
||||
}
|
||||
|
||||
> span {
|
||||
>span {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user