{"id":13671508,"url":"https://github.com/umijs/umi-hd","last_synced_at":"2025-10-07T05:15:54.007Z","repository":{"id":57385600,"uuid":"141557463","full_name":"umijs/umi-hd","owner":"umijs","description":"移动端高清 1px 方案。","archived":false,"fork":false,"pushed_at":"2018-07-19T09:39:39.000Z","size":16,"stargazers_count":151,"open_issues_count":0,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-05T00:18:45.590Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umijs.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-19T09:35:59.000Z","updated_at":"2025-03-06T09:47:55.000Z","dependencies_parsed_at":"2022-09-11T11:10:31.676Z","dependency_job_id":null,"html_url":"https://github.com/umijs/umi-hd","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/umijs/umi-hd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umijs%2Fumi-hd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umijs%2Fumi-hd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umijs%2Fumi-hd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umijs%2Fumi-hd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umijs","download_url":"https://codeload.github.com/umijs/umi-hd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umijs%2Fumi-hd/sbom","scorecard":{"id":908564,"data":{"date":"2025-08-11","repo":{"name":"github.com/umijs/umi-hd","commit":"209bd37271ec6015cfad13e43d9554a90dbdd9d5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/1 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-24T18:18:10.997Z","repository_id":57385600,"created_at":"2025-08-24T18:18:10.997Z","updated_at":"2025-08-24T18:18:10.997Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722757,"owners_count":26034463,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T09:01:11.443Z","updated_at":"2025-10-07T05:15:53.987Z","avatar_url":"https://github.com/umijs.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# umi-hd\n\n\u003e 迁移至内网，作者：@写轮\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumijs%2Fumi-hd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumijs%2Fumi-hd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumijs%2Fumi-hd/lists"}