{"id":13458499,"url":"https://github.com/weilanwl/coloruicss","last_synced_at":"2026-06-20T15:01:26.862Z","repository":{"id":37686623,"uuid":"137867242","full_name":"weilanwl/coloruicss","owner":"weilanwl","description":"鲜亮的高饱和色彩，专注视觉的小程序组件库","archived":false,"fork":false,"pushed_at":"2024-04-08T14:08:03.000Z","size":7118,"stargazers_count":12424,"open_issues_count":8,"forks_count":2217,"subscribers_count":250,"default_branch":"master","last_synced_at":"2025-10-29T15:04:44.827Z","etag":null,"topics":["css","mp-weixin","scss","uniapp","vue","vue2"],"latest_commit_sha":null,"homepage":"https://www.color-ui.com/","language":"Vue","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/weilanwl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://cos.color-ui.com/web/yehv3.jpg"]}},"created_at":"2018-06-19T09:07:27.000Z","updated_at":"2025-10-29T13:31:22.000Z","dependencies_parsed_at":"2024-06-06T14:31:27.238Z","dependency_job_id":"c40a98f6-ecae-4580-99cd-29d19fdc03f0","html_url":"https://github.com/weilanwl/coloruicss","commit_stats":null,"previous_names":["weilanwl/colorui"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/weilanwl/coloruicss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilanwl%2Fcoloruicss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilanwl%2Fcoloruicss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilanwl%2Fcoloruicss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilanwl%2Fcoloruicss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weilanwl","download_url":"https://codeload.github.com/weilanwl/coloruicss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weilanwl%2Fcoloruicss/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34574332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"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":["css","mp-weixin","scss","uniapp","vue","vue2"],"created_at":"2024-07-31T09:00:53.154Z","updated_at":"2026-06-20T15:01:26.826Z","avatar_url":"https://github.com/weilanwl.png","language":"Vue","funding_links":["https://cos.color-ui.com/web/yehv3.jpg"],"categories":["Vue","前端开发框架及项目"],"sub_categories":["其他_文本生成、文本对话"],"readme":"\n\n\u003cp align=\"center\"\u003eV3 测试版：https://github.com/weilanwl/coloruiBeta\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://cos.color-ui.com/web/zva3m.png\" alt=\"ColorUI简介\" width=\"75%\"\u003e\u003c/img\u003e\u003c/p\u003e\n\n## 素材\nColorUI在语雀有个群友共同在维护的知识库，里面有一些群友改的模板和UI素材供开发使用哦！\n[语雀-ColorUI群资源](https://www.yuque.com/colorui)\n\n## 前言\nColorUI是一个css库！！！在你引入样式后可以根据class来调用组件，一些含有交互的操作我也有简单写，可以为你开发提供一些思路。\n\n## 交流\n微信群：加入微信群请先添加开发者微信，备注UniApp插件市场。QQ群：240787041 或扫描二维码。\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://cos.color-ui.com/web/km4js.png\" alt=\"\" style=\"max-width:100%;\" width=\"748\"\u003e\u003c/p\u003e\t\t\t\t  \n\n\n## 使用UniApp开发\n### 开始\n下载源码解压获得`/Colorui-UniApp`文件夹，复制目录下的 `/colorui` 文件夹到你的项目根目录\n\n`App.vue` 引入关键Css `main.css` `icon.css`\n```css\n\u003cstyle\u003e\n@import \"colorui/main.css\";\n@import \"colorui/icon.css\";\n@import \"app.css\"; /* 你的项目css */\n....\n\u003c/style\u003e\n```\n\n### 使用自定义导航栏\n导航栏作为常用组件有做简单封装，当然你也可以直接复制代码结构自己修改，达到个性化目的。\n\n`App.vue` 获得系统信息\n```js\nonLaunch: function() {\n  uni.getSystemInfo({\n    success: function(e) {\n      // #ifndef MP\n      Vue.prototype.StatusBar = e.statusBarHeight;\n      if (e.platform == 'android') {\n        Vue.prototype.CustomBar = e.statusBarHeight + 50;\n      } else {\n        Vue.prototype.CustomBar = e.statusBarHeight + 45;\n      };\n      // #endif\n      // #ifdef MP-WEIXIN\n      Vue.prototype.StatusBar = e.statusBarHeight;\n      let custom = wx.getMenuButtonBoundingClientRect();\n      Vue.prototype.Custom = custom;\n      Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;\n      // #endif\t\t\n      // #ifdef MP-ALIPAY\n      Vue.prototype.StatusBar = e.statusBarHeight;\n      Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;\n      // #endif\n    }\n  })\n},\n```\n\n`pages.json` 配置取消系统导航栏\n```json\n\"globalStyle\": {\n  \"navigationStyle\": \"custom\"\n},\n```\n复制代码结构可以直接使用，注意全局变量的获取。\n\n使用封装,在`main.js` 引入 `cu-custom` 组件。\n```\nimport cuCustom from './colorui/components/cu-custom.vue'\nVue.component('cu-custom',cuCustom)\n```\n\n`page.vue` 页面可以直接调用了\n```html\n\u003ccu-custom bgColor=\"bg-gradual-blue\" :isBack=\"true\"\u003e\n  \u003cblock slot=\"backText\"\u003e返回\u003c/block\u003e\n  \u003cblock slot=\"content\"\u003e导航栏\u003c/block\u003e\n\u003c/cu-custom\u003e\n```\n| 参数       | 作用   |类型    |  默认值 |\n| --------   | :----:  |:----:  | :----:  |\n| bgColor    | 背景颜色类名 |String  |   ''    |\n| isBack     | 是否开启返回 | Boolean |   false |\n| bgImage    | 背景图片路径 | String  |  ''     |\n\n| slot块       | 作用   |\n| --------   | :----:  |\n| backText    | 返回时的文字 | \n| content     | 中间区域 | \n| right    | 右侧区域(小程序端可使用范围很窄！)  | \n\n## 使用原生小程序开发\n### 从现有项目开始 \n下载源码解压获得`/demo`，复制目录下的 `/colorui` 文件夹到你的项目根目录\n\n`App.wxss` 引入关键Css `main.wxss` `icon.wxss`\n```css\n@import \"colorui/main.wxss\";\n@import \"colorui/icon.wxss\";\n@import \"app.css\"; /* 你的项目css */\n....\n```\n\n### 从新项目开始\n下载源码解压获得`/template`，复制`/template`并重命名为你的项目，导入到小程序开发工具既可以开始你的新项目了\n\n### 使用自定义导航栏\n导航栏作为常用组件有做简单封装，当然你也可以直接复制代码结构自己修改，达到个性化目的。\n\n`App.js` 获得系统信息\n```js\nonLaunch: function() {\n  wx.getSystemInfo({\n    success: e =\u003e {\n      this.globalData.StatusBar = e.statusBarHeight;\n      let custom = wx.getMenuButtonBoundingClientRect();\n      this.globalData.Custom = custom;  \n      this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;\n    }\n  })\n},\n```\n\n`App.json` 配置取消系统导航栏,并全局引入组件\n```json\n\"window\": {\n  \"navigationStyle\": \"custom\"\n},\n\"usingComponents\": {\n  \"cu-custom\":\"/colorui/components/cu-custom\"\n}\n```\n\n`page.wxml` 页面可以直接调用了\n```html\n\u003ccu-custom bgColor=\"bg-gradual-pink\" isBack=\"{{true}}\"\u003e\n  \u003cview slot=\"backText\"\u003e返回\u003c/view\u003e\n  \u003cview slot=\"content\"\u003e导航栏\u003c/view\u003e\n\u003c/cu-custom\u003e\n\n```\n| 参数       | 作用   |类型    |  默认值 |\n| --------   |:----:  |:----:  | :----:  |\n| bgColor    | 背景颜色类名 |String  |   ''    |\n| isBack     | 是否开启返回 | Boolean |   false |\n| isCustom   | 是否开启左侧胶囊 | Boolean |   false |\n| bgImage    | 背景图片路径 | String  |  ''     |\n\n| slot块       | 作用   |\n| --------   | :----:  |\n| backText    | 返回时的文字 | \n| content     | 中间区域 | \n| right    | 右侧区域(小程序端可使用范围很窄！)  | \n\n## 赞赏\n\u003cp align=\"center\"\u003e\u003cimg src=\"https://cos.color-ui.com/web/yehv3.jpg\" alt=\"\" style=\"max-width:100%;\" width=\"600\"\u003e\u003c/p\u003e\n\n\n## License\n\n[MIT](https://opensource.org/licenses/MIT)\n\nCopyright (c) 2020-present, XiaoGang Wen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweilanwl%2Fcoloruicss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweilanwl%2Fcoloruicss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweilanwl%2Fcoloruicss/lists"}