I wrote a method in methods in vue, which is exposed to Android in mounted, as follows:
methods: {
outGoodsResult(val){
alert("ceshi")
alert(val)
}
}
mounted () {
window.outGoodsResult = self.outGoodsResult
}
he said it was called, but my alert didn"t pop up the data, or did he not call it? Before, he said there was no change to the code, but I didn"t have it either. Is there any other way for Android to call the method in vue? I have also tried to write this way as follows:
window ["outGoodsResult"] = function (val) {
alert("ceshi")
alert(val)
}
I can"t write it like this. What"s the reason, please?