fix: remove __fakeFileInput, clean up on destroy (#1025)
This commit is contained in:
parent
a63e85bf30
commit
44e3ea575e
|
@ -54,14 +54,10 @@
|
|||
|
||||
export default {
|
||||
oncreate () {
|
||||
// for testing
|
||||
window.__fakeFileInput = (file) => {
|
||||
this.onFileChange({
|
||||
target: {
|
||||
files: [file]
|
||||
}
|
||||
})
|
||||
}
|
||||
window.__composeToolbar = this // for testing
|
||||
},
|
||||
ondestroy () {
|
||||
window.__composeToolbar = null
|
||||
},
|
||||
components: {
|
||||
IconButton,
|
||||
|
|
|
@ -131,7 +131,9 @@ export const uploadKittenImage = i => (exec(() => {
|
|||
let image = images[`kitten${i}`]
|
||||
let blob = blobUtils.base64StringToBlob(image.data, 'image/png')
|
||||
blob.name = image.name
|
||||
window.__fakeFileInput(blob)
|
||||
window.__composeToolbar.onFileChange({
|
||||
target: { files: [blob] }
|
||||
})
|
||||
}, {
|
||||
dependencies: {
|
||||
images,
|
||||
|
|
Loading…
Reference in a new issue