957 Star 5.1K Fork 1.6K

GVPsmallwei / Avue

 / 详情

upload 组件 没显示预览图

已完成
创建于  
2024-05-08 18:14

输入图片说明
输入图片说明

    {
            label: '图标',
            prop: 'pic',
            type: 'upload',
            listType: 'picture-card',
            accept: 'image/png, image/jpeg',
            limit: 1,
            fileSize: 1024 * 10,
            span: 24,
            propsHttp: {
              res: 'data',
              url: 'link'
            },
            tip: '只能上传jpg/png图标,且不超过10M',
            action: '/mro-resource/oss/endpoint/put-file'
          },
]

没显示预览图

评论 (13)

996 创建了任务

图片地址是啥

[图片上传中…(image-yWLhvEHMbeQCROtshlZR)]

你看dom元素 img标签显示的啥啊

smallwei 任务状态待办的 修改为已完成


图片上传成功后就变成了一个小点

版本号

"@smallwei/avue": "^3.4.1",
"element-plus": "^2.3.7",

更新到3.4.2+试下

3.4.2版本就可以

3.4.x版本对upload重构了导致有bug 3.4.2已经修复

收到 :+1:

<template>
  <el-row>
         <el-col :span="15">
                 <basic-container>
                             <avue-form ref="form" :option="regionOption" v-model="regionForm" @submit="handleSubmit">
                              </avue-form>
         </el-col>
      </el-row>
</template>

regionOption: {
        labelWidth: 100,
        column: [

          {
            label: '图标',
            prop: 'pic',
            type: 'upload',
            listType: 'picture-img',
            accept: 'image/png, image/jpeg',
            limit: 1,
            fileSize: 1024 * 10,
            span: 24,
            propsHttp: {
              res: 'data',
              url: 'link',
              home: 'domain'
            },
            tip: '只能上传jpg/png图标,且不超过10M',
            action: '/mro-resource/oss/endpoint/put-file'
          }]}

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(2)
632261 smallweigit 1588214431 5556829 big potato zhou 1578988442
JavaScript
1
https://gitee.com/smallweigit/avue.git
git@gitee.com:smallweigit/avue.git
smallweigit
avue
Avue

搜索帮助