Giter VIP home page Giter VIP logo

vue2-scale-box's Introduction

vue2-scale-box

npm version npm downloads

vue2大屏适配缩放组件

vue3版本:https://www.npmjs.com/package/vue3-scale-box

安装

npm install vue2-scale-box
or
yarn add vue2-scale-box

使用

<template>
  <div id="app">
    <ScaleBox
      :width="1920"
      :height="1080"
      bgc="transparent"
      :delay="100"
      :isFlat="false"
    >
      <template>
        <h1>大屏内容</h1>
      </template>
    </ScaleBox>
  </div>
</template>
import ScaleBox from 'vue2-scale-box'

export default {
  components: {
    ScaleBox
  }
}

属性

  • width 宽度 默认 1920
  • height 高度 默认 1080
  • bgc 背景颜色 默认 "transparent"
  • delay自适应缩放防抖延迟时间(ms) 默认 100
  • isFlat是否启用拉伸模式 默认 false
  • @scaleChange 缩放值发生改变的方法 可动态获取 scale 改变后的值 注意:拉伸模式下scale值为: [x缩放值, y缩放值];非拉伸模式下scale值为:等比缩放值

vue2-scale-box's People

Contributors

rocyuan666 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.