在mpvue框架中使用vant 上传文件组件<van-uploader>?
如题,
我在使用<van-uploader>组件时,准备调用组件自带的方法时,发现methods中事件不起作用!!!!
代码如下:
<van-uploader :file-list= "ldy_files" accept= "all" multiple= "true" upload-text= "点击上传" [@after-read](/user/after-read)= "afterRead()" [@click-preview](/user/click-preview)= "onUploadPreview" @ delete = "onUploadRemove" /> |
methods: { afterRead (event) { console.log( '1111111111111111' ) console.log(event) }, } |
其中@after-read=
"afterRead()"
这个事件的绑定方式用原来的bind:,控制台始终都打印如下字段:
VM48403:1 Component “pages/openAccountDetail/main” does not have a method “afterRead” to handle event “after-read”.
或者绑定方式换成@,控制台干脆就什么都不打印了 啥情况啊?
3 回复