You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
478 B

4 years ago
<template>
<view>
<web-view :src="url" @message="getMessage"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url: 'https://uniapp.dcloud.io/static/web-view.html'
}
},
onLoad(options) {
if (options && options.url) {
this.url = options.url;
}
},
methods: {
getMessage(event) {
uni.showModal({
content: JSON.stringify(event.detail),
showCancel: false
});
}
}
}
</script>
<style>
</style>