@uni/unit-tool
v1.0.7
Published
[![npm](https://img.shields.io/npm/v/@uni/unit-tool.svg)](https://www.npmjs.com/package/@uni/unit-tool)
Downloads
2
Readme
unitTool
Unit tool
Supported
Install
$ npm install @uni/unit-tool --save
Usage
import { px2rpx, rpx2px } from '@uni/unit-tool';
You can also import from the big package:
import {unitTool} from '@uni/apis';
const { px2rpx, rpx2px } = unitTool;
APIS
px2rpx(val)
px to rpx method
rpx2px(val)
rpx to px method
Arguments
| Property | Type | Describes | Default | Supports |
| -------- | -------- | --------- | :-----: | :------: |
| val | number
| px value | - | |