0.0.2 • Published 2 years ago

r-scale-screen v0.0.2

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

r-scale-screen

If you are using Vue, move to v-scale-screen

English | 简体中文

Large-screen adaptive container component, which can be used for large-screen project development, realizes screen adaptation, and can be adaptive according to width, height, and width and height ratios, and full-screen adaptation

Demo

图例

Install

npm install r-scale-screen
# or
yarn add r-scale-screen

Usage

import RScaleScreen from 'r-scale-screen'

function App() {
  return (
    <>
      <RScaleScreen height={1080} width={1920}>
          <ReactECharts>....</ReactECharts>
          <ReactECharts>....</ReactECharts>
          <ReactECharts>....</ReactECharts>
          <ReactECharts>....</ReactECharts>
          <ReactECharts>....</ReactECharts>
      </RScaleScreen>
    </>
  )
}

API

PropertyDescriptionTypeDefault
widthLarge screen widthNumber or String1920
heightLarge screen heightNumber or String1080
autoScaleAdaptive configuration, when configured as a boolean type, it is to enable or disable the adaptive configuration. When configured as an object, if x is true, the x-axis generates a margin; when y is true, the y-axis generates a margin. This configuration is enabled when the full screen is enabled failBoolean or {x:boolean,y:boolean}true
delayWindow resize delay timeNumber500
fullScreenFull-screen self-adaptive, there will be a stretching effect when this configuration item is enabled, and auto Scale will be invalid. It is not recommended to enable it if it is not necessaryBooleanfalse
boxStyleModify the container style, such as the side background color when displaying in the center, conforming to the Vue two-way binding style standard formatObjectnull
wrapperStyleModify the adaptive area style to conform to the Vue two-way binding style standard formatObjectnull
bodyOverflowHiddenAfter enabling, the body style will be automatically set to overflow: hiddenBooleantrue