|
@@ -136,7 +136,14 @@
|
|
|
const handleEditorChange = () => {
|
|
const handleEditorChange = () => {
|
|
|
// 编辑器内容变化时的处理
|
|
// 编辑器内容变化时的处理
|
|
|
};
|
|
};
|
|
|
- const handleImageUploadSuccess = (response: any, file: any, fileList: any[]) => {};
|
|
|
|
|
|
|
+ const handleImageUploadSuccess = (response: any, file: any, fileList: any[]) => {
|
|
|
|
|
+ console.log('图片上传成功:', response, file, fileList);
|
|
|
|
|
+ form.courseImg = fileList;
|
|
|
|
|
+ };
|
|
|
|
|
+const handleImageRemove = (file: any, fileList: any[]) => {
|
|
|
|
|
+ console.log('图片被移除:', file, fileList);
|
|
|
|
|
+ form.courseImg = fileList;
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
const handleFileChange = (file, fileList) => {
|
|
const handleFileChange = (file, fileList) => {
|
|
|
// 1. 验证文件类型和大小
|
|
// 1. 验证文件类型和大小
|
|
@@ -172,7 +179,7 @@ const handleFileChange = (file, fileList) => {
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const handleUploadSignsUploadSuccess = async (item, fileList) => {
|
|
|
|
|
|
|
+ const handleUploadSignsUploadSuccess = async (item:any, fileList) => {
|
|
|
// const attachment = await formatAttachmentList(fileList);
|
|
// const attachment = await formatAttachmentList(fileList);
|
|
|
// item.attachment = attachment;
|
|
// item.attachment = attachment;
|
|
|
|
|
|
|
@@ -319,7 +326,7 @@ const handleFileChange = (file, fileList) => {
|
|
|
/>
|
|
/>
|
|
|
<!-- <el-upload
|
|
<!-- <el-upload
|
|
|
class="image-uploader"
|
|
class="image-uploader"
|
|
|
- action="safety_api/api/admin/minio/uploadFile"
|
|
|
|
|
|
|
+ action="#"
|
|
|
:file-list="form.courseContent"
|
|
:file-list="form.courseContent"
|
|
|
:disabled="isViewMode"
|
|
:disabled="isViewMode"
|
|
|
:limit="1"
|
|
:limit="1"
|
|
@@ -336,6 +343,8 @@ const handleFileChange = (file, fileList) => {
|
|
|
<div class="el-upload__tip"> 支持格式:.jpg .png .jpeg,单个文件不能超过300k,设置一个默认图片。 </div>
|
|
<div class="el-upload__tip"> 支持格式:.jpg .png .jpeg,单个文件不能超过300k,设置一个默认图片。 </div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-upload> -->
|
|
</el-upload> -->
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|