@sumintong/smt-ui
v0.0.2
Published
高颜值、轻量化的 UniApp Vue3 组件库
Downloads
24
Readme
SMT-UI (SMT Design)
基于 Vue 3 + TypeScript 开发的 UniApp UI 组件库,提供丰富的组件和工具库,致力于提供轻量、高颜值的移动端开发体验。
✨ 特性
- 🚀 60+ 高质量组件:覆盖移动端主流场景
- 📐 TypeScript:完备的类型定义
- 🎨 主题定制:基于 CSS 变量,支持实时切换与暗黑模式
- 🛠 内置工具库:深拷贝、防抖节流、格式化、规则校验等
- 📱 多端发布:完美支持 H5、微信小程序、App
📦 安装
# 使用 pnpm (推荐)
pnpm add @sumintong/smt-ui
# 使用 npm
npm install @sumintong/smt-ui🔨 快速上手
1. 配置 easycom (推荐)
修改项目根目录下的 pages.json,配置后无需 import 即可直接使用组件。
{
"easycom": {
"autoscan": true,
"custom": {
"^mt-(.*)": "@sumintong/smt-ui/src/components/$1/$1.vue"
}
},
"pages": [
// ...
]
}2. 引入样式
在项目的 App.vue 或 uni.scss 中引入全局样式:
/* 在 App.vue 的 style 中引入 */
@import '@sumintong/smt-ui/src/index.scss';3. 使用组件
<template>
<view>
<mt-button type="primary">主要按钮</mt-button>
</view>
</template>🧩 组件库概览
目前已支持基础布局、表单输入、反馈提示、展示导航等完整移动端交互组件。详情请参考 官方文档 (开发中)。
🛠 JS 工具库
import { formatDate, debounce, request } from '@sumintong/smt-ui'
// 格式化日期
formatDate(new Date(), 'yyyy-MM-dd')
// 接口请求 (Promise 封装)
request({ url: '/api/user', method: 'GET' })Copyright (c) 2026 SMT Team. Released under the MIT License.
