sacle-box

大屏适配组件
473 2
Install
npm install sacle-box
Latest Version:1.0.11
License:ISC
Last Updated:Jan 11, 2023
Links: GitHub  ·  npm
Maintainer: jack-hai

sacle-box

属性 注释 默认属性 类型
height 高度 1080 number
width 宽度 1920 number

默认适配比例

1920:1080

使用方式

有问题提 issues

vue3

    // 局部引入
    import { SacleBox } from 'sacle-box'
    import 'sacle-box/style.css'
    // 全局引入
    import SacleBox from 'sacle-box'
    import 'sacle-box/style.css';
    app.use(SacleBox);


    <div>
        <SacleBox>
            <div class='container'></div>
         </SacleBox>
    </div>
    

    // 注:由于没有单独开发typeScript类型,全局注册组件后组件类型提示为any
    // 解决办法:在vue-shim.d.ts中添加
    declare module '@vue/runtime-core' {
        export interface GlobalComponents {
            SacleBox: typeof import('sacle-box')['SacleBox'],
        }
    }

Related Packages

pd-design

产品组件库

2,706
autofit.js

autofit.js 是迄今为止最易用的自适应工具

59,780 2,010
vue-resize-text

Vue Resize Text makes font auto resizing on responsive layout

30,606 69
vue3-resize-text

Vue 3 Resize Text makes font auto resizing on responsive layout

54,488 12
@ozjsey/v-fit-children

Vue directive that auto-hides children that don't fit within a container's width...

1,104 0

Version History

Version Released License
1.0.11 ISC
1.0.10 ISC
1.0.9 ISC
1.0.8 ISC
1.0.7 ISC