baidu / baidu/amis

input-file组件的文件列表的点击问题

Open
#5,852 1 comment 0 reactions 0 assignees View on GitHub
doc
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

#### 实现场景:
请看问题,我希望可以自定义点击文件的逻辑或者请教我如何屏蔽这个跳转

#### 存在的问题:
使用inputfile 配置了asBlob: true,
此时文件没有立马上传
点击文件会跳转到
![image](https://user-images.githubusercontent.com/37794833/204763829-f67dde9e-4106-4782-ba97-a66efc5b437d.png)

我尝试设置了documentLink : ''和或者downloadUrl : false但是似乎没有效果

#### 当前方案:

```
{
"type": "input-file",
"label": "新增",
"name": "taskFile",
drag: true,
asBlob: true,
multiple: true,
className: "p-0",
"accept": "*",
},
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the input-file component and trace file-list click handling when asBlob is true. Check how documentLink and downloadUrl are interpreted, then reproduce the behavior with the configuration shown in the issue. Done means the configured file click no longer performs the unwanted navigation or provides a supported way to customize it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.