Skip to content

X5WebView

第1步:package.json引入库

点击查看源码
js
"@extscreen/es-component": "3.0.1",

第2步:main-native.js中注册组件

点击查看源码
js
import {ESComponent} from "@extscreen/es-component";
Vue.use(ESComponent)

第4步:ESPage中使用

点击查看源码
vue

<template>
  <div class="es-sdk-root-css">
    <es-x5web-view
        ref="x5web_view"
        class="index_root_x5web_view_content_css"/>
    <title class="es-sdk-content-title-css" :text="this.$options.name"/>
    <div class="es-sdk-content-divider-css"/>
  </div>
</template>

<script>
import {ESPage} from "@extscreen/es-core";

export default {
  name: 'X5WebView',
  mixins: [ESPage],
  mounted() {
    this.$refs.x5web_view.loadUrl("http://extscreen.com");
  },
};
</script>

<style scoped>
.index_root_x5web_view_content_css {
  width: 1920px;
  height: 1080px;
  position: absolute;
}
</style>