docs: 注释优化

Former-commit-id: 5f97498165c21361a374e3d94d2f47439ff12ba1
This commit is contained in:
haoxr
2022-12-18 13:28:26 +08:00
parent f2c7ec3c74
commit 792a8c93b5

View File

@@ -1,8 +1,7 @@
<!-- <!--
多图上传组件 多图上传组件
@author: haoxr @author: youlaitech
@date 2022/11/20 @date 2022/11/20
@link https://element-plus.gitee.io/zh-CN/component/upload.html
--> -->
<template> <template>
@@ -63,7 +62,6 @@ const fileList = ref([] as UploadUserFile[]);
watch( watch(
() => props.modelValue, () => props.modelValue,
(newVal: string[]) => { (newVal: string[]) => {
console.log('newVal', newVal);
const filePaths = fileList.value.map(file => file.url); const filePaths = fileList.value.map(file => file.url);
// 监听modelValue文件集合值未变化时跳过赋值 // 监听modelValue文件集合值未变化时跳过赋值
if ( if (
@@ -88,6 +86,7 @@ watch(
* @param params * @param params
*/ */
async function handleUpload(options: UploadRequestOptions): Promise<any> { async function handleUpload(options: UploadRequestOptions): Promise<any> {
// 上传API调用
const { data: fileInfo } = await uploadFileApi(options.file); const { data: fileInfo } = await uploadFileApi(options.file);
// 上传成功需手动替换文件路径为远程URL否则图片地址为预览地址 blob:http:// // 上传成功需手动替换文件路径为远程URL否则图片地址为预览地址 blob:http://