Vue 大屏自适应组件
如果您使用的是 React,请转到 r-scale-screen English | 简体中文 大屏适应容器组件,可用于大屏项目开发,实现屏幕适配,可根据宽度、高度和宽高比来进行适配,以及全屏适配
在 2.2.0+ 版本中,我们支持 vue >= v3 或 >= 2.7,如果您的项目是 2.6 版本以下,则使用 1.x 版本
npm install v-scale-screen
# or
yarn add v-scale-screen在 vue2 中,我们使用插件导出,因此需要使用 Vue.use() 进行注册
// main.js
import Vue from 'vue'
import VScaleScreen from 'v-scale-screen'
Vue.use(VScaleScreen)
注意: 使用时,请将
body样式设置为overflow: hidden;
| 属性 | 描述 | 类型 | 默认值 |
|---|---|---|---|
| width | 大屏幕宽度 | Number 或 String |
1920 |
| height | 大屏幕高度 |
暂无开放 Issues,或尚未同步最近议题。