Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ma-form组件formType为upload时,上传后再进行删除,上传按钮不显示 #88

Open
wangzhuoli opened this issue Nov 20, 2023 · 9 comments

Comments

@wangzhuoli
Copy link

image 初始化时,images2字段为空字符串,上传一张图片后,上传按钮被隐藏,此时是正常的,当我再把上传的图片删除后,此时上传按钮没有显示出来,还是隐藏状态
@kanyxmo
Copy link
Member

kanyxmo commented Dec 28, 2023

待测试后答复

@zds-s
Copy link
Member

zds-s commented Jan 19, 2024

未复现出来

@one-god
Copy link

one-god commented Apr 17, 2024

我也碰到这个问题

@one-god
Copy link

one-god commented Apr 17, 2024

貌似设置了limit就会出现这个问题

@one-god
Copy link

one-god commented Apr 17, 2024

是的,刚刚去测试了一下,设置limit就会出现这个bug,不设置就不会

@kanyxmo
Copy link
Member

kanyxmo commented Apr 17, 2024

单选模式下,不用设置limit,limit给多选用的

@one-god
Copy link

one-god commented Apr 18, 2024

多图上传limit不起作用可以无限上传,上传按钮也不会消失,
{
title: "链接分享图",
dataIndex: "img_url_share",
formType: "upload",
multiple: true,
limit: 2,
accept: ".jpg,jpeg,.png",
tip: "支持jpeg,jpg,png,最大1M,最多上传2个",
type: "image",
returnType: "url",
}

@one-god
Copy link

one-god commented Apr 29, 2024

看了一下封装的代码,缺少fileList属性,加上就OK了
`

    <template #upload-button>
      <slot name="customer">
        <div
            :class="'upload-skin ' + (config.rounded ? 'rounded-full' : 'rounded-sm')"
            v-if="!props.modelValue || config.multiple"
        >
          <div class="icon text-3xl">
            <component :is="config.icon"/>
          </div>
          <div class="title">
            {{ config.title === 'buttonText' ? $t('upload.buttonText') : config.title }}
          </div>
        </div>
      </slot>
    </template>
  </a-upload>

`

@kanyxmo
Copy link
Member

kanyxmo commented Apr 30, 2024

提个pr吧~~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants