. 安装
注:vue2使用v-scale-screen@1.0.0版本,vue3使用v-scale-screen@2.0.0版本
npm install v-scale-screen@1.0.0 --save
2. 在main.js中引用
import VScaleScreen from 'v-scale-screen'
Vue.use(VScaleScreen)
3. 在vue组件中使用
- <template>
- <v-scale-screen width="1920" height="1090" :fullScreen="false">
- <div>...</div>
- <div>...</div>
- <div>...</div>
- </v-scale-screen>
- </template>