1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <template>
- <!-- #ifdef APP -->
- <scroll-view style="flex:1">
- <!-- #endif -->
- <view v-if="params.url" class="uni-row view-height " >
- <web-view :fullscreen="true" :webview-styles="webviewStyles" :src="`${params.url}`"></web-view>
- </view>
- <!-- #ifdef APP -->
- </scroll-view>
- <!-- #endif -->
- </template>
- <script lang="uts">
- export default {
- data() {
- return {
- params: {},
- webviewStyles: {
- progress: {
- color: "#FF3333"
-
- }
- }
- }
- },
- props: {
- src: {
- type: [String],
- default: null
- }
- },
- onLoad(event:OnLoadOptions) {
- this.params = event
- if (event.title) {
- uni.setNavigationBarTitle({
- title: event.title
- })
- }
- }
- }
- </script>
- <style lang="scss">
- .view-height{
- height: 100%;
- }
- </style>
|