{"_id":"umi-hd","_rev":"2828125","name":"umi-hd","description":"移动端高清1px方案","dist-tags":{"latest":"5.0.1"},"maintainers":[{"name":"npm:sorrycc","email":""},{"name":"sorrycc","email":""}],"time":{"modified":"2022-09-06T14:37:09.000Z","created":"2018-07-19T09:39:17.651Z","5.0.1":"2018-07-19T09:39:17.651Z"},"users":{},"author":{"name":"写轮","email":"kai.fangk@alibaba-inc.com"},"repository":{"type":"git","url":"git+https://github.com/umijs/umi-hd.git"},"versions":{"5.0.1":{"name":"umi-hd","version":"5.0.1","description":"移动端高清1px方案","homepage":"https://github.com/umijs/umi-hd","author":{"name":"写轮","email":"kai.fangk@alibaba-inc.com"},"repository":{"type":"git","url":"git+https://github.com/umijs/umi-hd.git"},"main":"./lib/vl","entry":{"flex":"./src/flex","vw":"./src/vw","vw-no-android-hd":"./src/vw-no-android-hd","vl":"./src/vl","vh":"./src/vh"},"scripts":{"prepublish":"tnpm run compile","compile":"rm -rf lib && babel -d lib src","build":"atool-build","lint":"eslint --ext .js src","test":"atool-test","doc":"atool-doc","doc-build":"atool-doc --build","gh-pages":"atool-doc --build && gh-pages -d __site"},"devDependencies":{"atool-build":"0.6.x","atool-doc":"^0.1.0","atool-test":"^0.4.5","babel-cli":"~6.6.4","babel-core":"~6.7.4","babel-plugin-add-module-exports":"~0.1.2","babel-preset-es2015":"~6.6.0","babel-preset-stage-0":"~6.5.0","dora":"0.3.x","gh-pages":"^0.11.0","pre-commit":"^1.1.2","eslint":"^2.5.3","eslint-config-airbnb":"^6.2.0"},"babel":{"presets":["es2015","stage-0"],"plugins":["add-module-exports"]},"pre-commit":["lint"],"license":"MIT","files":["lib/","package.json","README.md","HISTORY.md"],"gitHead":"209bd37271ec6015cfad13e43d9554a90dbdd9d5","_id":"umi-hd@5.0.1","_npmVersion":"6.1.0","_nodeVersion":"10.6.0","_npmUser":{"name":"sorrycc","email":"sorrycc@gmail.com"},"dist":{"shasum":"59061d3f4aad70491b7c853525aced91afbe1e21","size":4458,"noattachment":false,"key":"/umi-hd/-/umi-hd-5.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/umi-hd/download/umi-hd-5.0.1.tgz"},"maintainers":[{"name":"npm:sorrycc","email":""},{"name":"sorrycc","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/umi-hd_5.0.1_1531993157547_0.5303151685144132"},"_hasShrinkwrap":false,"publish_time":1531993157651,"_cnpm_publish_time":1531993157651,"_cnpmcore_publish_time":"2021-12-16T11:37:13.796Z"}},"readme":"# umi-hd\n\n> 迁移至内网，作者：@写轮\n\n## 重要决定\n\n安卓提供了 vw-no-android-hd 版, 由于安卓手机存在各种兼容问题, 放弃安卓的高清也是一种选择. 总比老是出线上故障好\n\n## 整体介绍\n* vw是最简单的, 全部自动拉伸, 做页面无视屏幕适配.\n  * `当下活动页开发的最佳选择.`\n* flex是需要写适配布局的, 高清兼容好. 安卓UC内核也兼容.\n  * `当下项目开发最佳的选择.`\n  * flex可以加任意参数等比放大, 不受屏幕大小限制;\n* vl是iOS上最完美的适配, 既能flex, 又能vw, 又能高清. `缺点是安卓完全不支持高清!`\n* vh是打酱油的, 纯粹迎合下vw;\n\n## Install\n\n```bash\n$ npm install umi-hd --save\n```\n\n## Usage\n\n```js\n// 默认的vl模式; 不带viewport缩放了, 用rem兼容了vw的单位, 用px做flex适配, 0.5px的单位做高清!\nimport vl from 'umi-hd';\nvl();\n// 等价于默认的;\nvl(100, 750);\n// 自定义文字大小\nvl(32, 750);\n// 设计稿是640的\nvl(100, 640);\n\n// 以前的flex模式, 通过compile之后进入到了lib文件夹下;\nimport flex from 'umi-hd/lib/flex';\nflex();\n// 等价于默认的;\nflex(100, 1);\n// 如果有的rem基准单位是16px, 可以这样修改\nflex(32);\n// 有的希望plus下字体放大一些比例, 可以这样使用;\nflex(100, 414/375);\n\n// vw推荐用法\nimport vw from 'umi-hd/lib/vw';\nimport vw from 'umi-hd/lib/vw-vw-no-android-hd';\nvw();\n// 等价于, iPhone 5s下就是1rem=100px, 原始比例1倍;\nvw(100, 750);\n// 如果有的设计稿是640px;\nvw(100, 640);\n// 有的希望字体是浏览器默认的16px;\nvw(32, 640);\n\n// vh推荐用法\nimport vh from 'umi-hd/lib/vh';\nvh();\n// 等价于默认的iPhone6设计稿, 1334-64;\nvh(100, 1270);\n// 640稿子是 568*2-64\nvh(100, 1072);\n// 有的希望字体是浏览器默认的16px;\nvh(32, 1072);\n\n```\n\n* cdn源码地址;\n  * https://as.alipayobjects.com/g/animajs/anima-hd/5.0.0/vl.js\n  * https://as.alipayobjects.com/g/animajs/anima-hd/5.0.0/flex.js\n  * https://as.alipayobjects.com/g/animajs/anima-hd/5.0.0/vw.js\n  * https://as.alipayobjects.com/g/animajs/anima-hd/5.0.0/vw-no-android-hd.js\n  * https://as.alipayobjects.com/g/animajs/anima-hd/5.0.0/vh.js\n\n* 某些js动态计算viewport `强烈建议内联到css之前加载, 否则安卓部分进行会闪`\n\n## License\n\nComponent is released under the MIT license.\n","_attachments":{},"homepage":"https://github.com/umijs/umi-hd","license":"MIT"}