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

[Upload 上传] autoUpload 设置 false,无法触发自定义 requestMethod 参数 #1228

Closed
synctimes163 opened this issue Feb 1, 2024 · 3 comments
Labels
question Further information is requested

Comments

@synctimes163
Copy link

tdesign-mobile-vue 版本

^1.0.15

重现链接

No response

重现步骤

<script> export default { name: 'Upload', props: { // files: { // type: Array, // default: [] // }, gridConfig: { type: Number, default: 1 }, action: { type: String, default: "" }, autoUpload: { type: Boolean, default: false }, }, computed: { requestMethod(value) { console.log(":requestMethod", value) } }, data(){ return { files: [] } }, methods: { onFail(res) { console.log("onFail res=>", res) }, onProgress(res) { console.log("onProgress res=>", res) }, onChange(value, context) { console.log("onChange value=>", value) console.log("onChange context=>", context) // this.files = res // context.onSuccess(value, context) console.log("context.response", context.response) console.log("context.context", Object.keys(context) ) }, onPreview(res) { console.log("onPreview res=>", res) }, onSuccess(res) { console.log("onSuccess res=>", res) }, onRemove(res) { console.log("onRemove res=>", res) }, onSelectChange(res) { console.log("onSelectChange res=>", res) }, onClickUpload(res) { console.log("onClickUpload res=>", res) }, // requestMethod(res) { // console.log("requestMethod res=>", res) // return new Promise((resolve)=>{ // resolve({ // status:"success", // response: { // url:"https://tdesign.gtimg.com/site/avatar.jpg" // } // }) // }) // }, } } </script> <style scoped lang="scss"> h3 { margin: 40px 0 0; } ul { list-style-type: none; padding: 0; } li { display: inline-block; margin: 0 10px; } a { color: #42b983; } </style>

79a851a1ba60987261c87d04e942740

期望结果

requestMethod 触发生效,提供 自定义上传 DEMO 到文档种

实际结果

No response

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

No response

Copy link
Contributor

github-actions bot commented Feb 1, 2024

👋 @synctimes163,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@synctimes163
Copy link
Author

@fayching

@anlyyao anlyyao added question Further information is requested and removed question Further information is requested labels Mar 21, 2024
@anlyyao
Copy link
Collaborator

anlyyao commented Mar 21, 2024

@synctimes163 requestMethod这里是和PC对齐的,写法可以先参考一下PC。 https://tdesign.tencent.com/vue-next/components/upload?tab=demo

@anlyyao anlyyao closed this as completed Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants