这是template代码
<div id="box" @click="jsFormNavtive()"> <img :src="imagesUrl" /> </div>
在created调用 data是android那边传过来的
created(){
window.jsFormNavtive = this.jsFormNavtive;
}
methods:{
jsFormNavtive(data){
window.android.getCamera('00000'); this.imagesUrl = data;
alert(data) return;
}
}第一次弹出相册选择图片会出现 undefined
按确定,又调用了相册再选择的时候才接收到安卓传过来的值,再弹一个alert框,再按确定又调用了相机。。。不断重复
有只小跳蛙
相关分类