{"id":13692061,"url":"https://github.com/uni-helper/vite-plugin-uni-platform-modifier","last_synced_at":"2025-07-25T10:33:04.243Z","repository":{"id":204804645,"uuid":"711832202","full_name":"uni-helper/vite-plugin-uni-platform-modifier","owner":"uni-helper","description":"为属性、指令提供平台修饰符并按需编译","archived":false,"fork":false,"pushed_at":"2023-11-01T14:56:37.000Z","size":277,"stargazers_count":10,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-20T14:48:40.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uni-helper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["ModyQyW","KeJunMao","Neil Lee"],"custom":["https://afdian.net/a/kejun","https://github.com/ModyQyW/sponsors","https://afdian.net/a/zguolee"]}},"created_at":"2023-10-30T09:08:44.000Z","updated_at":"2024-10-10T02:16:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"4af014be-91e4-4a96-af93-db44403205e5","html_url":"https://github.com/uni-helper/vite-plugin-uni-platform-modifier","commit_stats":null,"previous_names":["uni-helper/vite-plugin-uni-platform-modifier"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uni-helper%2Fvite-plugin-uni-platform-modifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uni-helper%2Fvite-plugin-uni-platform-modifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uni-helper%2Fvite-plugin-uni-platform-modifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uni-helper%2Fvite-plugin-uni-platform-modifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uni-helper","download_url":"https://codeload.github.com/uni-helper/vite-plugin-uni-platform-modifier/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227497771,"owners_count":17781120,"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","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-02T17:00:53.179Z","updated_at":"2024-12-01T13:29:14.605Z","avatar_url":"https://github.com/uni-helper.png","language":"TypeScript","funding_links":["https://github.com/sponsors/ModyQyW","https://github.com/sponsors/KeJunMao","https://github.com/sponsors/Neil Lee","https://afdian.net/a/kejun","https://github.com/ModyQyW/sponsors","https://afdian.net/a/zguolee"],"categories":["打包器插件"],"sub_categories":[],"readme":"# vite-plugin-uni-platform-modifier\n\n为属性、指令提供平台修饰符并按需编译\n\n\n## 安装\n\n```bash\npnpm i -D @uni-helper/vite-plugin-uni-platform-modifier\n```\n\n## 使用\n\n### 配置\n\n```ts\n// vite.config.ts\nimport { defineConfig } from 'vite'\nimport Uni from '@dcloudio/vite-plugin-uni'\nimport UniPlatformModifier from '@uni-helper/vite-plugin-uni-platform-modifier'\n\nexport default defineConfig({\n  plugins: [Uni(), UniPlatformModifier()],\n})\n```\n\n### 编写代码\n\n```html\n\u003cbutton\n  v-text=\"'hello'\"\n  v-text.h5.mp-weixin=\"'h5\u0026mp-weixin'\"\n  class.h5=\"h5-class\"\n  class=\"default-class\"\n  @click.h5=\"handleH5Click\"\n  @click=\"handleDefaultClick\"\n/\u003e\n```\n\n\u003cdetails\u003e\n\n\u003csummary\u003e编译到H5\u003c/summary\u003e\n\n```html\n\u003cbutton\n  v-text=\"'h5\u0026mp-weixin'\"\n  class=\"h5-class\"\n  @click=\"handleH5Click\"\n/\u003e\n```\n\u003c/details\u003e\n\u003cdetails\u003e\n\n\u003csummary\u003e编译到微信小程序\u003c/summary\u003e\n\n```html\n\u003cbutton\n  v-text=\"'h5\u0026mp-weixin'\"\n  class=\"default-class\"\n  @click=\"handleDefaultClick\"\n/\u003e\n```\n\u003c/details\u003e\n\u003cdetails\u003e\n\n\u003csummary\u003e编译到其他平台\u003c/summary\u003e\n\n```html\n\u003cbutton\n  v-text=\"'hello'\"\n  class=\"default-class\"\n  @click=\"handleDefaultClick\"\n/\u003e\n```\n\u003c/details\u003e\n\n\n### 支持的修饰符\n\n\n```js\n['app', 'app-plus', 'h5', 'mp-360', 'mp-alipay', 'mp-baidu', 'mp-jd', 'mp-kuaishou', 'mp-lark', 'mp-qq', 'mp-toutiao', 'mp-weixin', 'quickapp-webview', 'quickapp-webview-huawei', 'quickapp-webview-union']\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funi-helper%2Fvite-plugin-uni-platform-modifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funi-helper%2Fvite-plugin-uni-platform-modifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funi-helper%2Fvite-plugin-uni-platform-modifier/lists"}