@mingto/mt-ui 1.1.35 → 1.1.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +165 -19
- package/dist/index.es.js +28 -0
- package/dist/index.umd.js +28 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,19 +1,165 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
# @mingto/mt-ui
|
|
2
|
+
|
|
3
|
+
基于 Vue 3 的企业级 UI 组件库,提供丰富的业务组件,帮助快速构建现代化应用界面。
|
|
4
|
+
|
|
5
|
+
## 特性
|
|
6
|
+
|
|
7
|
+
- 🎨 **设计优雅**:简洁现代的视觉风格
|
|
8
|
+
- 📦 **开箱即用**:无需复杂配置,直接引入使用
|
|
9
|
+
- 🔧 **按需加载**:支持组件按需引入,优化打包体积
|
|
10
|
+
- 🎯 **类型安全**:完整的 TypeScript 类型定义
|
|
11
|
+
- 🌏 **国际化**:内置多语言支持
|
|
12
|
+
|
|
13
|
+
## 安装
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add @mingto/mt-ui
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 快速开始
|
|
20
|
+
|
|
21
|
+
### 全量引入
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { createApp } from 'vue'
|
|
25
|
+
import App from './App.vue'
|
|
26
|
+
import MtUi from '@mingto/mt-ui'
|
|
27
|
+
import '@mingto/mt-ui/dist/style.css'
|
|
28
|
+
|
|
29
|
+
const app = createApp(App)
|
|
30
|
+
app.use(MtUi)
|
|
31
|
+
app.mount('#app')
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 按需引入
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
import { createApp } from 'vue'
|
|
38
|
+
import App from './App.vue'
|
|
39
|
+
import { MtButton, MtDialog, MtMessage } from '@mingto/mt-ui'
|
|
40
|
+
import '@mingto/mt-ui/dist/style.css'
|
|
41
|
+
|
|
42
|
+
const app = createApp(App)
|
|
43
|
+
app.use(MtButton)
|
|
44
|
+
app.use(MtDialog)
|
|
45
|
+
app.use(MtMessage)
|
|
46
|
+
app.mount('#app')
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 基础组件
|
|
50
|
+
|
|
51
|
+
| 组件 | 说明 |
|
|
52
|
+
|------|------|
|
|
53
|
+
| MtButton | 按钮 |
|
|
54
|
+
| MtIcon | 图标 |
|
|
55
|
+
| MtImage | 图片 |
|
|
56
|
+
| MtLoading | 加载 |
|
|
57
|
+
| MtBadge | 徽标 |
|
|
58
|
+
| MtBacktop | 回到顶部 |
|
|
59
|
+
|
|
60
|
+
## 表单组件
|
|
61
|
+
|
|
62
|
+
| 组件 | 说明 |
|
|
63
|
+
|------|------|
|
|
64
|
+
| MtUpload | 文件上传 |
|
|
65
|
+
| MtProgress | 进度条 |
|
|
66
|
+
|
|
67
|
+
## 展示组件
|
|
68
|
+
|
|
69
|
+
| 组件 | 说明 |
|
|
70
|
+
|------|------|
|
|
71
|
+
| MtAvatarImage | 图片头像 |
|
|
72
|
+
| MtAvatarText | 文字头像 |
|
|
73
|
+
| MtEmpty | 空状态 |
|
|
74
|
+
| MtTag | 标签 |
|
|
75
|
+
| MtQrcode | 二维码 |
|
|
76
|
+
| MtTable | 表格 |
|
|
77
|
+
| MtTableColumn | 表格列 |
|
|
78
|
+
| MtPopover | 气泡卡片 |
|
|
79
|
+
| MtTooltip | 文字提示 |
|
|
80
|
+
| MtFilePreview | 文件预览 |
|
|
81
|
+
|
|
82
|
+
## 导航组件
|
|
83
|
+
|
|
84
|
+
| 组件 | 说明 |
|
|
85
|
+
|------|------|
|
|
86
|
+
| MtTabs | 标签页 |
|
|
87
|
+
| MtTab | 标签 |
|
|
88
|
+
| MtInfiniteScroll | 无限滚动 |
|
|
89
|
+
|
|
90
|
+
## 反馈组件
|
|
91
|
+
|
|
92
|
+
| 组件 | 说明 |
|
|
93
|
+
|------|------|
|
|
94
|
+
| MtDialog | 对话框 |
|
|
95
|
+
| MtMessage | 消息提示 |
|
|
96
|
+
| MtOverlay | 遮罩层 |
|
|
97
|
+
| MtPoster | 海报 |
|
|
98
|
+
|
|
99
|
+
## 布局组件
|
|
100
|
+
|
|
101
|
+
| 组件 | 说明 |
|
|
102
|
+
|------|------|
|
|
103
|
+
| MtCell | 单元格 |
|
|
104
|
+
| MtCellGroup | 单元格组 |
|
|
105
|
+
| MtButtonGroup | 按钮组 |
|
|
106
|
+
| MtCollapseTransition | 折叠过渡 |
|
|
107
|
+
| MtFadeTransition | 淡入淡出过渡 |
|
|
108
|
+
| MtTeleport | 传送门 |
|
|
109
|
+
| MtConfigProvider | 全局配置 |
|
|
110
|
+
|
|
111
|
+
## 使用示例
|
|
112
|
+
|
|
113
|
+
### 按钮
|
|
114
|
+
|
|
115
|
+
```vue
|
|
116
|
+
<mt-button type="primary">主要按钮</mt-button>
|
|
117
|
+
<mt-button type="success">成功按钮</mt-button>
|
|
118
|
+
<mt-button type="danger">危险按钮</mt-button>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### 对话框
|
|
122
|
+
|
|
123
|
+
```vue
|
|
124
|
+
<mt-dialog v-model="visible" title="标题">
|
|
125
|
+
<p>对话框内容</p>
|
|
126
|
+
<template #footer>
|
|
127
|
+
<mt-button @click="visible = false">取消</mt-button>
|
|
128
|
+
<mt-button type="primary" @click="visible = false">确定</mt-button>
|
|
129
|
+
</template>
|
|
130
|
+
</mt-dialog>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 消息提示
|
|
134
|
+
|
|
135
|
+
```typescript
|
|
136
|
+
import { MtMessage } from '@mingto/mt-ui'
|
|
137
|
+
|
|
138
|
+
MtMessage.success('操作成功')
|
|
139
|
+
MtMessage.error('操作失败')
|
|
140
|
+
MtMessage.warning('警告提示')
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### 文件上传
|
|
144
|
+
|
|
145
|
+
```vue
|
|
146
|
+
<mt-upload v-model="fileList" :limit="9">
|
|
147
|
+
<mt-button type="primary">点击上传</mt-button>
|
|
148
|
+
</mt-upload>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## 全局配置
|
|
152
|
+
|
|
153
|
+
```vue
|
|
154
|
+
<mt-config-provider :locale="{ lang: 'en' }">
|
|
155
|
+
<app />
|
|
156
|
+
</mt-config-provider>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## 完整文档
|
|
160
|
+
|
|
161
|
+
更多组件和详细用法请参考 [官方文档](https://mingto.github.io/mt-utils/ui/)
|
|
162
|
+
|
|
163
|
+
## 许可证
|
|
164
|
+
|
|
165
|
+
MIT
|
package/dist/index.es.js
CHANGED
|
@@ -17743,6 +17743,34 @@ const fileSizeLimitConfigMap = /* @__PURE__ */ new Map([
|
|
|
17743
17743
|
[FileSuffixEnum.JSON]: 100 * 1024 * 1024
|
|
17744
17744
|
}
|
|
17745
17745
|
],
|
|
17746
|
+
[
|
|
17747
|
+
"normal",
|
|
17748
|
+
{
|
|
17749
|
+
[FileSuffixEnum.PNG]: 500 * 1024 * 1024,
|
|
17750
|
+
[FileSuffixEnum.JPG]: 500 * 1024 * 1024,
|
|
17751
|
+
[FileSuffixEnum.JPEG]: 500 * 1024 * 1024,
|
|
17752
|
+
[FileSuffixEnum.GIF]: 500 * 1024 * 1024,
|
|
17753
|
+
[FileSuffixEnum.WEBP]: 500 * 1024 * 1024,
|
|
17754
|
+
[FileSuffixEnum.PPT]: 500 * 1024 * 1024,
|
|
17755
|
+
[FileSuffixEnum.PPTX]: 500 * 1024 * 1024,
|
|
17756
|
+
[FileSuffixEnum.DOC]: 500 * 1024 * 1024,
|
|
17757
|
+
[FileSuffixEnum.DOCX]: 500 * 1024 * 1024,
|
|
17758
|
+
[FileSuffixEnum.PDF]: 500 * 1024 * 1024,
|
|
17759
|
+
[FileSuffixEnum.TXT]: 500 * 1024 * 1024,
|
|
17760
|
+
[FileSuffixEnum.XLS]: 500 * 1024 * 1024,
|
|
17761
|
+
[FileSuffixEnum.XLSX]: 500 * 1024 * 1024,
|
|
17762
|
+
[FileSuffixEnum.MP4]: 500 * 1024 * 1024,
|
|
17763
|
+
[FileSuffixEnum.MKV]: 500 * 1024 * 1024,
|
|
17764
|
+
[FileSuffixEnum.FLV]: 500 * 1024 * 1024,
|
|
17765
|
+
[FileSuffixEnum.AVI]: 500 * 1024 * 1024,
|
|
17766
|
+
[FileSuffixEnum.WAV]: 500 * 1024 * 1024,
|
|
17767
|
+
[FileSuffixEnum.MP3]: 500 * 1024 * 1024,
|
|
17768
|
+
[FileSuffixEnum.ZIP]: 500 * 1024 * 1024,
|
|
17769
|
+
[FileSuffixEnum.RAR]: 500 * 1024 * 1024,
|
|
17770
|
+
[FileSuffixEnum.HTML]: 500 * 1024 * 1024,
|
|
17771
|
+
[FileSuffixEnum.JSON]: 500 * 1024 * 1024
|
|
17772
|
+
}
|
|
17773
|
+
],
|
|
17746
17774
|
[
|
|
17747
17775
|
"small",
|
|
17748
17776
|
{
|
package/dist/index.umd.js
CHANGED
|
@@ -58903,6 +58903,34 @@ usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`);
|
|
|
58903
58903
|
[tools.FileSuffixEnum.JSON]: 100 * 1024 * 1024
|
|
58904
58904
|
}
|
|
58905
58905
|
],
|
|
58906
|
+
[
|
|
58907
|
+
"normal",
|
|
58908
|
+
{
|
|
58909
|
+
[tools.FileSuffixEnum.PNG]: 500 * 1024 * 1024,
|
|
58910
|
+
[tools.FileSuffixEnum.JPG]: 500 * 1024 * 1024,
|
|
58911
|
+
[tools.FileSuffixEnum.JPEG]: 500 * 1024 * 1024,
|
|
58912
|
+
[tools.FileSuffixEnum.GIF]: 500 * 1024 * 1024,
|
|
58913
|
+
[tools.FileSuffixEnum.WEBP]: 500 * 1024 * 1024,
|
|
58914
|
+
[tools.FileSuffixEnum.PPT]: 500 * 1024 * 1024,
|
|
58915
|
+
[tools.FileSuffixEnum.PPTX]: 500 * 1024 * 1024,
|
|
58916
|
+
[tools.FileSuffixEnum.DOC]: 500 * 1024 * 1024,
|
|
58917
|
+
[tools.FileSuffixEnum.DOCX]: 500 * 1024 * 1024,
|
|
58918
|
+
[tools.FileSuffixEnum.PDF]: 500 * 1024 * 1024,
|
|
58919
|
+
[tools.FileSuffixEnum.TXT]: 500 * 1024 * 1024,
|
|
58920
|
+
[tools.FileSuffixEnum.XLS]: 500 * 1024 * 1024,
|
|
58921
|
+
[tools.FileSuffixEnum.XLSX]: 500 * 1024 * 1024,
|
|
58922
|
+
[tools.FileSuffixEnum.MP4]: 500 * 1024 * 1024,
|
|
58923
|
+
[tools.FileSuffixEnum.MKV]: 500 * 1024 * 1024,
|
|
58924
|
+
[tools.FileSuffixEnum.FLV]: 500 * 1024 * 1024,
|
|
58925
|
+
[tools.FileSuffixEnum.AVI]: 500 * 1024 * 1024,
|
|
58926
|
+
[tools.FileSuffixEnum.WAV]: 500 * 1024 * 1024,
|
|
58927
|
+
[tools.FileSuffixEnum.MP3]: 500 * 1024 * 1024,
|
|
58928
|
+
[tools.FileSuffixEnum.ZIP]: 500 * 1024 * 1024,
|
|
58929
|
+
[tools.FileSuffixEnum.RAR]: 500 * 1024 * 1024,
|
|
58930
|
+
[tools.FileSuffixEnum.HTML]: 500 * 1024 * 1024,
|
|
58931
|
+
[tools.FileSuffixEnum.JSON]: 500 * 1024 * 1024
|
|
58932
|
+
}
|
|
58933
|
+
],
|
|
58906
58934
|
[
|
|
58907
58935
|
"small",
|
|
58908
58936
|
{
|