這是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;
}
}第一次彈出相冊選擇圖片會出現(xiàn) undefined按確定,又調用了相冊再選擇的時候才接收到安卓傳過來的值,再彈一個alert框,再按確定又調用了相機。。。不斷重復
vue內嵌android,調相機出現(xiàn)問題
蕪湖不蕪
2018-08-17 19:50:48