fix 代码生成添加键值对字段

This commit is contained in:
yxh 2023-08-25 11:45:31 +08:00
parent 8d7488f809
commit 9618c53244
2 changed files with 6 additions and 0 deletions

View File

@ -13,6 +13,7 @@
:on-change="handleChange" :on-change="handleChange"
:on-success="handleSuccess" :on-success="handleSuccess"
:data="dataParam" :data="dataParam"
:on-preview="handlePreview"
> >
<el-icon class="el-icon--upload"><ele-UploadFilled /></el-icon> <el-icon class="el-icon--upload"><ele-UploadFilled /></el-icon>
<div class="el-upload__text"> <div class="el-upload__text">
@ -126,6 +127,9 @@ export default defineComponent({
const setDataFileList = () => { const setDataFileList = () => {
dataFileList.value = uploadedFile dataFileList.value = uploadedFile
}; };
const handlePreview = (file:UploadUserFile)=>{
window.open(file.url)
}
return { return {
dataFileList, dataFileList,
handleSuccess, handleSuccess,
@ -134,6 +138,7 @@ export default defineComponent({
beforeUpload, beforeUpload,
handleChange, handleChange,
handleExceed, handleExceed,
handlePreview,
dataParam dataParam
}; };
}, },

View File

@ -126,6 +126,7 @@
<el-option label="多图上传" value="images" /> <el-option label="多图上传" value="images" />
<el-option label="单文件上传" value="file" /> <el-option label="单文件上传" value="file" />
<el-option label="多文件上传" value="files" /> <el-option label="多文件上传" value="files" />
<el-option label="键值对" value="keyValue" />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>