Skip to content

Latest commit

 

History

History
84 lines (70 loc) · 1.36 KB

README.md

File metadata and controls

84 lines (70 loc) · 1.36 KB

vue-one-size

NPM version NPM downloads

One size fits on all screens.

Demo

Install

yarn add vue-one-size

Usage

Register as a global component:

import OneSize from 'vue-one-size'
Vue.use(OneSize)
<template>
  <OneSizeContainer>
    ...
  </OneSizeContainer>
</template>

Or use it locally:

<template>
  <OneSizeContainer>
    ...
  </OneSizeContainer>
</template>

<script>
import OneSize from 'vue-one-size'

export default {
  ...
  components: {
    OneSizeContainer: OneSize.container
  }
}
</script>

Props

Name Default Description
width 375 Width of the page.
height 603 Height of the page.
maxRatio 1 The maximal ratio to scale up.
resize true Whether to resize when window resized.