tijiao
This commit is contained in:
@@ -1,32 +1,30 @@
|
||||
<template>
|
||||
<view>
|
||||
<web-view :src="url" @message="getMessage"></web-view>
|
||||
</view>
|
||||
<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
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
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>
|
||||
<style></style>
|
||||
|
||||
Reference in New Issue
Block a user