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

[ Bug Report ] The abort method of upload is missing #1872

Closed
MQYForverT opened this issue Apr 20, 2021 · 2 comments · Fixed by #1877
Closed

[ Bug Report ] The abort method of upload is missing #1872

MQYForverT opened this issue Apr 20, 2021 · 2 comments · Fixed by #1877

Comments

@MQYForverT
Copy link

Element Plus version

1.0.2-beta.40

OS/Browsers version

win10

Vue version

3.0.11

Reproduction Link

https://jsfiddle.net/9pgqcde6/3/

Steps to reproduce

1.页面上使用upload组件

2.在js中调用组件方法abort
setup(props, { emit }){
const refs: any = reactive({
upload: null
})

onBeforeUnmount(() => {
console.log(refs.upload)
refs.upload.abort(null)
})

return {
...toRefs(refs)
}

}

What is Expected?

1.在onBeforeUnmount方法中打印可以看到abort方法
2.可以调用到abort方法

What is actually happening?

报错:
Uncaught (in promise) TypeError:refs.upload.abort is not a function

@element-bot element-bot changed the title [Bug Report] upload的abort方法缺失 [ Bug Report ] The abort method of upload is missing Apr 20, 2021
@element-bot
Copy link
Member

Translation of this issue:

Element Plus version

1.0.2-beta.40

OS/Browsers version

win10

Vue version

3.0.11

Reproduction Link

https://jsfiddle.net/9pgqcde6/3/

Steps to reproduce

  1. Use the upload component on the page

<el-upload ref="upload">
2. invoke component method abort in JS

setup(props, { emit }){
const refs: any = reactive({

upload: null
})

onBeforeUnmount(() => {
console.log ( refs.upload )

refs.upload.abort (null)
})

return {
...toRefs(refs)

}
}

What is Expected?

  1. Print in the onbeforeunmount method to see the abort method

  2. You can call the abort method

What is actually happening?

report errors:
Uncaught (in promise) TypeError: refs.upload.abort is not a function

@jw-foss
Copy link
Member

jw-foss commented Apr 21, 2021

Fixed and will be released on Friday this week.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants