Add File
This commit is contained in:
34
pages/common/webview/index.vue
Normal file
34
pages/common/webview/index.vue
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<view v-if="params.url">
|
||||||
|
<web-view :webview-styles="webviewStyles" :src="`${params.url}`"></web-view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
params: {},
|
||||||
|
webviewStyles: {
|
||||||
|
progress: {
|
||||||
|
color: "#FF3333"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
src: {
|
||||||
|
type: [String],
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(event) {
|
||||||
|
this.params = event
|
||||||
|
if (event.title) {
|
||||||
|
uni.setNavigationBarTitle({
|
||||||
|
title: event.title
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user