初始化
This commit is contained in:
23
pages/webview/html.vue
Normal file
23
pages/webview/html.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<view class="content" v-html="src">
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
src: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.src = options.src;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.content{
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
</style>
|
||||
55
pages/webview/imge.vue
Normal file
55
pages/webview/imge.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<view class="box flex-colum">
|
||||
<image src="@/static/logo.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
imge: '',
|
||||
tyte: '',
|
||||
name: ''
|
||||
};
|
||||
},
|
||||
async onLoad(e) {
|
||||
this.name = e.name
|
||||
this.tyte = e.tyte
|
||||
this.imge = str;
|
||||
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
v-deep {
|
||||
p {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
image{
|
||||
margin-top:120rpx;
|
||||
}
|
||||
.view {
|
||||
position: fixed;
|
||||
width: 50%;
|
||||
padding: 10rpx;
|
||||
text-align: center;
|
||||
bottom: 20rpx;
|
||||
margin: 0 auto;
|
||||
background: #3089fd;
|
||||
border-radius: 50rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
16
pages/webview/webview.vue
Normal file
16
pages/webview/webview.vue
Normal file
@@ -0,0 +1,16 @@
|
||||
<template>
|
||||
<web-view :src="src"></web-view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
src: ''
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.src = options.url;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user