Skip to content

Escaping one layer outside the a-upload component. The component uses slot output. Click a-upload, and there are two file selection pop-up windows? #6381

@w3cui

Description

@w3cui
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.7.7

Environment

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36

Reproduction link

https://dy.buydance.com/daren/zhaoshang/jiepinshenhe

Steps to reproduce

一.Authority组件 代码
`


<script> import { mapGetters } from "vuex"; export default { name: "authority", data() { return { isServerEnv: process.env.NODE_ENV == "development", items: {}, }; }, components:{ "authority-modal": () => import("./modal.vue"), }, computed: { ...mapGetters(["authority"]), }, props: { isSlot:{ type:Boolean, default:false, }, className: { type: String, default: "", }, style: { type: String, default: "", }, id: { type: Number | String, default: "-1", }, }, }; </script>

`
二.调用例子

<a-upload
accept=".jpeg,.jpg,.png,.gif,.svg,.webp,.pptx,.ppt,.xlsx"
:before-upload="(event) => handleUploadAction(event)"
list-type="picture"

导入商品

问题:当我点击导入商品时 浏览器会拉起两次 选择文件窗口,并且第一次不会执行before-upload回调,第二次窗口选择文件后才会回调方法。

What is expected?

点击一次弹一次选择文件窗口,回调一次数据

What is actually happening?

点击一次弹一次选择文件窗口,回调一次数据


测试地址:https://dy.buydance.com/daren/zhaoshang/jiepinshenhe
账号:18510135432
密码:12345678

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions