{"id":13604057,"url":"https://github.com/fjc0k/mounted","last_synced_at":"2025-03-16T07:32:18.405Z","repository":{"id":57303185,"uuid":"167725550","full_name":"fjc0k/mounted","owner":"fjc0k","description":"基于 Taro 的小程序组件库。","archived":false,"fork":false,"pushed_at":"2020-06-06T14:26:33.000Z","size":1269,"stargazers_count":67,"open_issues_count":5,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-27T05:50:55.944Z","etag":null,"topics":["taro","taro-components","weapp","weapp-components"],"latest_commit_sha":null,"homepage":"https://npm.im/mounted","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/fjc0k.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-26T18:46:58.000Z","updated_at":"2024-10-14T07:03:12.000Z","dependencies_parsed_at":"2022-09-02T08:10:57.173Z","dependency_job_id":null,"html_url":"https://github.com/fjc0k/mounted","commit_stats":null,"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjc0k%2Fmounted","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjc0k%2Fmounted/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjc0k%2Fmounted/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjc0k%2Fmounted/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fjc0k","download_url":"https://codeload.github.com/fjc0k/mounted/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806046,"owners_count":20350775,"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":["taro","taro-components","weapp","weapp-components"],"created_at":"2024-08-01T19:00:39.106Z","updated_at":"2025-03-16T07:32:17.996Z","avatar_url":"https://github.com/fjc0k.png","language":"TypeScript","funding_links":[],"categories":["第三方库和组件"],"sub_categories":["Taro1"],"readme":"\u003e v1 版本还不甚稳定，请勿用于生产环境！\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/fjc0k/mounted/master/assets/logo.png\" width=\"150\" /\u003e\n\u003c/p\u003e\n\n# Mounted\n\n一款基于 [Taro](https://github.com/NervJS/taro) 的小程序组件库。\n\n\u003cimg src=\"https://raw.githubusercontent.com/fjc0k/mounted/master/assets/weapp.jpg?v=1\" width=\"250\" /\u003e\n\n## ⚠ 注意\n\n- 目前仅支持 **微信小程序**。\n\n- 推荐和 **TypeScript** 一起使用。\n\n## 特性\n\n- 使用 **TypeScript** 编写。\n- 专注 **小程序**。\n- 只产出与业务低耦合的 **基础组件**。\n- 支持 **自定义主题**。\n\n## 使用\n\n首先，使用以下命令安装：\n\n```bash\n# yarn\nyarn add mounted\n\n# 或者，npm\nnpm i mounted --save\n```\n\n然后，在 `app.scss` 中引入组件样式：\n\n\u003e 若你未使用 `scss`，请在 `app.js` 同级目录新建 `app.scss`，并在 `app.js` 中引入：`import './app.scss'`。\n\n```scss\n@import '../node_modules/mounted/src/styles/components.scss';\n```\n\n最后，在页面中按需引入组件：\n\n```js\nimport Taro from '@tarojs/taro'\nimport { View, Text } from '@tarojs/components'\nimport { MSticky } from 'mounted'\n\nexport default class Demo extends Taro.Component {\n  render() {\n    return (\n      \u003cView\u003e\n        \u003cMSticky\u003e\n          \u003cView className='title'\u003e\n            \u003cText\u003e标题\u003c/Text\u003e\n          \u003c/View\u003e\n        \u003c/MSticky\u003e\n      \u003c/View\u003e\n    )\n  }\n}\n```\n\n## 自定义主题\n\n若需自定义主题，直接在 `app.scss` 中覆盖变量即可，如：\n\n```scss\n// 主色调\n$primaryColor: #1AAD19;\n\n@import '../node_modules/mounted/src/styles/components.scss';\n```\n\n\u003e 组件库所使用的样式变量都在 [src/styles/settings.scss](https://github.com/fjc0k/mounted/blob/master/src/styles/settings.scss) 文件内。\n\n## 设计稿尺寸\n\n组件库内部采用的是 `375` 尺寸，若你的项目也是基于 `375` 的，可跳过。\n\n若你的项目是基于其他尺寸，比如 `750` 的，请在 `app.scss` 中覆盖设计稿尺寸变量：\n\n```scss\n// 设计稿尺寸\n$designWidth: 750;\n\n@import '../node_modules/mounted/src/styles/components.scss';\n```\n\n## 许可\n\nMIT © Jay Fong\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjc0k%2Fmounted","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffjc0k%2Fmounted","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjc0k%2Fmounted/lists"}