12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <template>
- <div>
- <van-button @click='roateX' type='primary'>横屏</van-button>
- <van-button @click='roateY' type='primary'>竖屏</van-button>
- </div>
- </template>
- <script>
- import Vue from 'vue'
- import { Button } from 'vant'
- Vue.use(Button)
- export default {
- name: 'AuxiliaryRoom',
- props: {},
- components: {},
- data() {
- return {}
- },
- beforeMount() {},
- mounted() {},
- methods: {
- roateX() {
- console.log('横屏')
- webkit.messageHandlers.cordova_iab.postMessage(
- JSON.stringify({
- method: 'roateX',
- })
- )
- },
- // 竖屏
- roateY() {
- console.log('竖屏')
- webkit.messageHandlers.cordova_iab.postMessage(
- JSON.stringify({
- method: 'roateY',
- })
- )
- },
- },
- }
- </script>
- <style lang='less' scoped>
- </style>
|