12345678910111213141516171819202122232425262728293031323334353637 |
- <template>
- <view class="webview-container">
- <web-view class="webview" :src="url" @bindmessage="message"></web-view>
- </view>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- url: ''
- }
- },
- onLoad(options) {
- this.url = decodeURIComponent(options.url)
- console.log(options.url)
- },
- methods: {
- message(e,h,z) {
- console.log(e,h,z)
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .webview-container {
- display: flex;
- flex-direction: column;
- }
- .webview {
- flex: 1;
- }
- </style>
|