UNPKG

need-miniprogram-ui

Version:

小程序UI组件库

59 lines (45 loc) 1.44 kB
# need-miniprogram-ui ## 🙋 介绍 由 [NeedCodeStudio.](https://needcodestudio.com) 开发的一套小程序组件库,让小程序开发者「更快」地搭建出自己的小程序。组件的交互和视觉参考多个手机OS,使其小程序贴近移动端使用体验。 ## 🔥 特性 1. 适配暗夜模式 2. 适配 Mac、Windows、Pad 3. 体积小,wxml/wxss 代码压缩 4. 详细类型定义文件,与 npm 包捆绑 5. 多平台小程序运行(待实现) ## 📱 扫码预览 [![](https://needcode.oss-cn-shenzhen.aliyuncs.com/common/gh_bf166cdeca6b_430.jpg)](https://needcodestudio.com) ## 🧑‍💻 使用 1. 下载安装 ```bash npm install need-miniprogram-ui --save ``` 2. 点击开发者工具中的菜单栏:工具 --> 构建 npm 3. 引入封装库 ```javascript import { Http } from 'need-miniprogram-ui' ``` 4. 引入组件 ```json { "usingComponents": { "nm-button": "need-miniprogram-ui/button/button" }, } ``` ### ### 暗黑模式 所有组件自动适配`暗黑模式`,如需取消,请找到自己项目 `miniprogram_npm` 文件夹,打开 `miniprogram_npm/need-miniprogram-ui/dark.wxss`,把里面的内容清空即可(需保留dark.wxss文件)。 ### 组件类型定义 ``` declare namespace NeedMiniprogramUI.xxxx { type Data = {} type Props = {} type Instance = {} ... } ``` ## 📝 TODO * [ ] pad后台组件 * [ ] 组件使用文档 * [ ] 宽屏模式