Skip to content

Commit ab7a7c0

Browse files
committed
fix ctx
1 parent 0d18084 commit ab7a7c0

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

example/main.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { createApp } from 'vue'
2-
import uploader from '../dist/vue-simple-uploader.es'
3-
import '../dist/style.css'
2+
// import uploader from '../dist/vue-simple-uploader.es'
3+
// import '../dist/style.css'
4+
import uploader from '../src'
45
import App from './App.vue'
56

67
const app = createApp(App)

src/components/file.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ export default {
193193
processResponse(args[2])
194194
return
195195
}
196-
instance.setupState[`_${event}`](args)
196+
instance.ctx[`${event}`](args)
197197
}
198198
}
199199
const fileProgress = () => {

src/components/uploader.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@
102102
if (handler === true) {
103103
return
104104
}
105-
instance[handler].apply(instance[handler], args.slice(1))
105+
instance.ctx[handler].apply(instance.ctx[handler], args.slice(1))
106106
}
107107
args[0] = kebabCase(name)
108-
emit.apply(instance, args)
108+
emit.apply(instance.ctx, args)
109109
}
110110
111111
props.options.initialPaused = !props.autoStart

0 commit comments

Comments
 (0)