@mijadesign/nut-mcp 1.0.0-alpha.0

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.
Files changed (58) hide show
  1. package/README.md +147 -0
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.js +16 -0
  4. package/dist/services/aliases.service.d.ts +1 -0
  5. package/dist/services/aliases.service.js +19 -0
  6. package/dist/services/doc-parser.service.d.ts +3 -0
  7. package/dist/services/doc-parser.service.js +162 -0
  8. package/dist/services/index.services.d.ts +3 -0
  9. package/dist/services/index.services.js +71 -0
  10. package/dist/services/paths.service.d.ts +5 -0
  11. package/dist/services/paths.service.js +18 -0
  12. package/dist/tools/base.tool.d.ts +8 -0
  13. package/dist/tools/base.tool.js +27 -0
  14. package/dist/tools/get-component-doc.tool.d.ts +12 -0
  15. package/dist/tools/get-component-doc.tool.js +40 -0
  16. package/dist/tools/index.d.ts +4 -0
  17. package/dist/tools/index.js +4 -0
  18. package/dist/tools/list-components.tool.d.ts +8 -0
  19. package/dist/tools/list-components.tool.js +32 -0
  20. package/dist/tools/search-components.tool.d.ts +12 -0
  21. package/dist/tools/search-components.tool.js +61 -0
  22. package/dist/types/index.d.ts +33 -0
  23. package/dist/types/index.js +1 -0
  24. package/docs/docs/aliases.json +59 -0
  25. package/docs/docs/components/base/button/index.md +415 -0
  26. package/docs/docs/components/base/cell/index.md +279 -0
  27. package/docs/docs/components/base/configprovider/index.md +215 -0
  28. package/docs/docs/components/base/image/index.md +282 -0
  29. package/docs/docs/components/base/overlay/index.md +288 -0
  30. package/docs/docs/components/dentry/cascader/index.md +1080 -0
  31. package/docs/docs/components/dentry/checkbox/index.md +842 -0
  32. package/docs/docs/components/dentry/datepicker/index.md +489 -0
  33. package/docs/docs/components/dentry/form/index.md +457 -0
  34. package/docs/docs/components/dentry/input/index.md +257 -0
  35. package/docs/docs/components/dentry/picker/index.md +621 -0
  36. package/docs/docs/components/dentry/radio/index.md +364 -0
  37. package/docs/docs/components/dentry/searchbar/index.md +317 -0
  38. package/docs/docs/components/dentry/selector/index.md +295 -0
  39. package/docs/docs/components/dentry/switch/index.md +300 -0
  40. package/docs/docs/components/dentry/textarea/index.md +231 -0
  41. package/docs/docs/components/dentry/uploader/index.md +745 -0
  42. package/docs/docs/components/exhibition/collapse/index.md +339 -0
  43. package/docs/docs/components/exhibition/swiper/index.md +385 -0
  44. package/docs/docs/components/exhibition/tag/index.md +253 -0
  45. package/docs/docs/components/feedback/dialog/index.md +306 -0
  46. package/docs/docs/components/feedback/drag/index.md +164 -0
  47. package/docs/docs/components/feedback/empty/index.md +211 -0
  48. package/docs/docs/components/feedback/infiniteloading/index.md +397 -0
  49. package/docs/docs/components/feedback/noticebar/index.md +175 -0
  50. package/docs/docs/components/feedback/popup/index.md +563 -0
  51. package/docs/docs/components/feedback/pulltorefresh/index.md +254 -0
  52. package/docs/docs/components/feedback/toast/index.md +355 -0
  53. package/docs/docs/components/layout/divider/index.md +162 -0
  54. package/docs/docs/components/layout/grid/index.md +386 -0
  55. package/docs/docs/components/layout/space/index.md +196 -0
  56. package/docs/docs/components/nav/tabs/index.md +955 -0
  57. package/docs/docs/components-index.json +233 -0
  58. package/package.json +34 -0
@@ -0,0 +1,61 @@
1
+ import { z } from "zod";
2
+ import { BaseTool } from "./base.tool.js";
3
+ import { getIndex } from "../services/index.services.js";
4
+ function tokenize(text) {
5
+ const tokens = new Set();
6
+ const lower = text.toLowerCase();
7
+ for (const word of lower.match(/[a-z]+/g) ?? []) {
8
+ if (word.length > 1)
9
+ tokens.add(word);
10
+ }
11
+ for (const char of lower.match(/[\u4e00-\u9fa5]/g) ?? []) {
12
+ tokens.add(char);
13
+ }
14
+ return [...tokens];
15
+ }
16
+ export class SearchComponentsTool extends BaseTool {
17
+ name = "search_components";
18
+ description = '按关键词搜索组件,支持中文别名(如"弹窗"→Dialog)、组件名、描述。' +
19
+ "结果按相关度排序,找到候选组件后必须调用 get_component_doc 获取详情再生成代码。";
20
+ inputSchema = z.object({
21
+ query: z.string().describe('搜索关键词,如"按钮"、"表单"、"Toast"'),
22
+ });
23
+ async execute(args) {
24
+ const { query } = args;
25
+ const idx = await getIndex();
26
+ const scoreMap = new Map();
27
+ // 别名直接命中
28
+ const aliasDir = idx.aliasMap.get(query);
29
+ if (aliasDir)
30
+ scoreMap.set(aliasDir, 999);
31
+ // 精确名称命中
32
+ const exact = idx.summaries.find((s) => s.dirName.toLowerCase() === query.toLowerCase() ||
33
+ s.name.split(/\s+/)[0].toLowerCase() === query.toLowerCase() ||
34
+ s.name.toLowerCase().includes(query.toLowerCase()));
35
+ if (exact) {
36
+ const key = exact.dirName.toLowerCase();
37
+ scoreMap.set(key, (scoreMap.get(key) ?? 0) + 100);
38
+ }
39
+ // 倒排检索
40
+ for (const token of tokenize(query)) {
41
+ for (const dirName of idx.invertedIndex.get(token) ?? []) {
42
+ const key = dirName.toLowerCase();
43
+ scoreMap.set(key, (scoreMap.get(key) ?? 0) + 1);
44
+ }
45
+ }
46
+ const results = [...scoreMap.entries()]
47
+ .sort((a, b) => b[1] - a[1])
48
+ .slice(0, 8)
49
+ .map(([dirKey]) => idx.byDirName.get(dirKey))
50
+ .filter((s) => s !== undefined);
51
+ if (results.length === 0) {
52
+ return `未找到"${query}"相关组件,请尝试其他关键词或调用 list_components 查看全部组件。`;
53
+ }
54
+ const lines = [
55
+ `找到 ${results.length} 个相关组件,请调用 get_component_doc 获取详情后再生成代码:`,
56
+ "",
57
+ ...results.map((s) => `- **${s.name}**(${s.dirName}):${s.description}`),
58
+ ];
59
+ return lines.join("\n");
60
+ }
61
+ }
@@ -0,0 +1,33 @@
1
+ export interface ComponentSummary {
2
+ name: string;
3
+ dirName: string;
4
+ group?: string;
5
+ description: string;
6
+ whenToUse: string;
7
+ }
8
+ export interface ComponentDoc extends ComponentSummary {
9
+ version: string;
10
+ props: PropItem[];
11
+ demos: DemoItem[];
12
+ }
13
+ export interface PropItem {
14
+ name: string;
15
+ description: string;
16
+ type: string;
17
+ default: string;
18
+ }
19
+ export interface DemoItem {
20
+ title: string;
21
+ code: string;
22
+ }
23
+ export interface AliasesConfig {
24
+ aliases: Record<string, string>;
25
+ }
26
+ export interface RuntimeIndex {
27
+ summaries: ComponentSummary[];
28
+ byDirName: Map<string, ComponentSummary>;
29
+ byEnName: Map<string, ComponentSummary>;
30
+ invertedIndex: Map<string, string[]>;
31
+ aliasMap: Map<string, string>;
32
+ buildTime: number;
33
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,59 @@
1
+ {
2
+ "aliases": {
3
+ "弹窗": "Dialog",
4
+ "弹框": "Dialog",
5
+ "对话框": "Dialog",
6
+ "按钮": "Button",
7
+ "输入框": "Input",
8
+ "输入": "Input",
9
+ "卡片": "Cell",
10
+ "列表": "Cell",
11
+ "开关": "Switch",
12
+ "切换": "Switch",
13
+ "复选框": "Checkbox",
14
+ "多选": "Checkbox",
15
+ "单选": "Radio",
16
+ "单选框": "Radio",
17
+ "选择器": "Picker",
18
+ "下拉": "Picker",
19
+ "标签": "Tag",
20
+ "徽标": "Tag",
21
+ "角标": "Tag",
22
+ "提示": "Toast",
23
+ "吐司": "Toast",
24
+ "加载": "Loading",
25
+ "加载中": "Loading",
26
+ "骨架屏": "Skeleton",
27
+ "导航": "NavBar",
28
+ "导航栏": "NavBar",
29
+ "表单": "Form",
30
+ "图片": "Image",
31
+ "图标": "Icon",
32
+ "滑块": "Slider",
33
+ "步骤": "Steps",
34
+ "步骤条": "Steps",
35
+ "分页": "Pagination",
36
+ "抽屉": "Drawer",
37
+ "折叠": "Collapse",
38
+ "折叠面板": "Collapse",
39
+ "轮播": "Swiper",
40
+ "宫格": "Grid",
41
+ "空格": "Space",
42
+ "间距": "Space",
43
+ "安全区": "SafeArea",
44
+ "分割线": "Divider",
45
+ "遮罩": "Overlay",
46
+ "空状态": "Empty",
47
+ "拖拽": "Drag",
48
+ "公告": "NoticeBar",
49
+ "上拉": "PullToRefresh",
50
+ "无限滚动": "InfiniteLoading",
51
+ "搜索": "SearchBar",
52
+ "文本域": "TextArea",
53
+ "上传": "Uploader",
54
+ "级联": "Cascader",
55
+ "日期": "DatePicker",
56
+ "选择组": "Selector",
57
+ "均分": "Selector"
58
+ }
59
+ }
@@ -0,0 +1,415 @@
1
+ ---
2
+ order: 1
3
+ demoUrl: 'https://frontend.mishudata.com/mobile/demo/#/base/pages/button/index'
4
+ group:
5
+ title: 基础组件
6
+ order: 2
7
+ ---
8
+
9
+ # Button 按钮 <Badge>2.0.0</Badge>
10
+
11
+
12
+ 按钮用于触发一个操作,如提交表单。
13
+
14
+ ## 引入
15
+
16
+ ```tsx
17
+ import { Button } from '@mijadesign/mjui-react-taro';
18
+ ```
19
+
20
+ ## 示例代码
21
+
22
+ ### 按钮类型
23
+
24
+ 按钮支持 `default`、`primary`、`info`、`warning`、`danger`、`success` 六种类型,默认为 `default`。
25
+
26
+
27
+ ```tsx
28
+ import { Button, Space } from '@mijadesign/mjui-react-taro'
29
+ import React from 'react'
30
+
31
+ const Demo2 = () => {
32
+ return (
33
+ <Space wrap>
34
+ <Button type="primary">主要按钮</Button>
35
+ <Button type="default">次要按钮</Button>
36
+ <Button type="primary" fill="outline">
37
+ 幽灵按钮
38
+ </Button>
39
+ <Button type="primary" fill="dashed">
40
+ 虚线按钮
41
+ </Button>
42
+ <Button type="primary" fill="none">
43
+ 文字按钮
44
+ </Button>
45
+ </Space>
46
+ )
47
+ }
48
+ export default Demo2
49
+
50
+ ```
51
+
52
+ ### 填充模式
53
+
54
+ 按钮支持 `solid`、 `outline`、 `dashed`、`none`四种类型,默认为 `solid`。
55
+
56
+
57
+ ```tsx
58
+ import { Button, Space } from '@mijadesign/mjui-react-taro'
59
+ import React from 'react'
60
+
61
+ const Demo3 = () => {
62
+ return (
63
+ <Space wrap>
64
+ <Button loading type="primary" />
65
+ <Button loading type="primary">
66
+ 加载中
67
+ </Button>
68
+ </Space>
69
+ )
70
+ }
71
+ export default Demo3
72
+
73
+ ```
74
+
75
+ ### 图标按钮
76
+
77
+ 通过 `icon` 属性来设置按钮图标,并提供`rightIcon`属性使图标在右侧显示。
78
+
79
+
80
+ ```tsx
81
+ import { Button, Space } from '@mijadesign/mjui-react-taro'
82
+ import { Plus, ArrowDown } from '@mijadesign/mobile-icons'
83
+ import React from 'react'
84
+
85
+ const Demo4 = () => {
86
+ return (
87
+ <Space wrap>
88
+ <Button type="primary" icon={<Plus />}>
89
+ 主要按钮
90
+ </Button>
91
+ <Button type="primary" rightIcon={<ArrowDown />}>
92
+ 主要按钮
93
+ </Button>
94
+ <Button type="primary" icon={<Plus />} rightIcon={<ArrowDown />}>
95
+ 主要按钮
96
+ </Button>
97
+ <Button type="primary" icon={<Plus />} />
98
+ </Space>
99
+ )
100
+ }
101
+ export default Demo4
102
+
103
+ ```
104
+
105
+ ### 禁用状态
106
+
107
+ 通过 `disabled` 属性来禁用按钮,禁用状态下按钮不可点击。
108
+
109
+
110
+ ```tsx
111
+ import { Button, Space } from '@mijadesign/mjui-react-taro'
112
+ import React from 'react'
113
+
114
+ const Demo5 = () => {
115
+ return (
116
+ <Space wrap>
117
+ <Button type="primary" disabled>
118
+ 禁用状态
119
+ </Button>
120
+ <Button type="default" fill="outline" disabled>
121
+ 禁用状态
122
+ </Button>
123
+ <Button type="primary" fill="outline" disabled>
124
+ 禁用状态
125
+ </Button>
126
+ <Button type="primary" fill="dashed" disabled>
127
+ 禁用状态
128
+ </Button>
129
+ </Space>
130
+ )
131
+ }
132
+ export default Demo5
133
+
134
+ ```
135
+
136
+ ### 按钮形状
137
+
138
+ 通过 `shape` 属性设置按钮形状,支持圆形、方形按钮,默认圆角为8px。
139
+
140
+
141
+ ```tsx
142
+ import { Button } from '@mijadesign/mjui-react-taro'
143
+ import React from 'react'
144
+
145
+ const Demo6 = () => {
146
+ const marginStyle = { margin: '5px 0' }
147
+ return (
148
+ <>
149
+ <Button type="primary" block style={marginStyle}>
150
+ 巨大52、大48、中40圆角12px
151
+ </Button>
152
+ <Button type="primary" block size="small" style={marginStyle}>
153
+ 小32、迷你24圆角8px
154
+ </Button>
155
+ <Button shape="round" type="primary" block style={marginStyle}>
156
+ 全圆角
157
+ </Button>
158
+ <Button shape="square" type="primary" block style={marginStyle}>
159
+ 无圆角
160
+ </Button>
161
+ </>
162
+ )
163
+ }
164
+ export default Demo6
165
+
166
+ ```
167
+
168
+ ### 按钮尺寸
169
+
170
+ 支持 `xlarge` 、 `large`、`normal`、`small`、`mini` 尺寸,默认为 `normal`。
171
+
172
+
173
+ ```tsx
174
+ import { Button, Space } from '@mijadesign/mjui-react-taro'
175
+ import React from 'react'
176
+
177
+ const Demo8 = () => {
178
+ return (
179
+ <Space wrap align="end">
180
+ <Button size="xlarge" type="primary">
181
+ 巨大52
182
+ </Button>
183
+ <Button size="large" type="primary">
184
+ 大48
185
+ </Button>
186
+ <Button size="normal" type="primary">
187
+ 中40
188
+ </Button>
189
+ <Button size="small" type="primary">
190
+ 小32
191
+ </Button>
192
+ <Button size="mini" type="primary">
193
+ 迷你24
194
+ </Button>
195
+ </Space>
196
+ )
197
+ }
198
+ export default Demo8
199
+
200
+ ```
201
+
202
+ ### 块级元素
203
+
204
+ 按钮在默认情况下为行内块级元素,通过 `block` 属性可以将按钮的元素类型设置为块级元素,常用来实现通栏按钮。
205
+
206
+
207
+ ```tsx
208
+ import { Button, Col, Row } from '@mijadesign/mjui-react-taro'
209
+ import React from 'react'
210
+
211
+ const App = () => {
212
+ const marginStyle = { margin: '6px 0' }
213
+ return (
214
+ <>
215
+ <div style={marginStyle}>01 组合按钮</div>
216
+ <Row gutter="12">
217
+ <Col span="12">
218
+ <Button block fill="outline">
219
+ 次要按钮
220
+ </Button>
221
+ </Col>
222
+ <Col span="12">
223
+ <Button block type="primary">
224
+ 主要按钮
225
+ </Button>
226
+ </Col>
227
+ </Row>
228
+ <div style={marginStyle}>02 通栏按钮</div>
229
+ <Button block type="primary" style={marginStyle}>
230
+ 主要按钮
231
+ </Button>
232
+ <Button block fill="outline" style={marginStyle}>
233
+ 次要按钮
234
+ </Button>
235
+ </>
236
+ )
237
+ }
238
+ export default App
239
+
240
+ ```
241
+
242
+ ### 自定义颜色
243
+
244
+ 通过 color 属性可以自定义按钮的颜色。
245
+
246
+
247
+ ```tsx
248
+ import React from 'react'
249
+ import { Button, Space } from '@mijadesign/mjui-react-taro'
250
+
251
+ const App = () => {
252
+ return (
253
+ <Space wrap>
254
+ <Button type="danger">自定义颜色</Button>
255
+ <Button type="primary" color="linear-gradient(270deg, #FF4949 0%, #FF7070 100%)">
256
+ 自定义渐变
257
+ </Button>
258
+ <Button type="danger" fill="outline">
259
+ 自定义颜色
260
+ </Button>
261
+ <Button shape="round" fill="outline" color="green">
262
+ 自定义颜色
263
+ </Button>
264
+ </Space>
265
+ )
266
+ }
267
+ export default App
268
+
269
+ ```
270
+
271
+ ### 设置 open-type
272
+
273
+
274
+ ```tsx
275
+ import { Button } from '@mijadesign/mjui-react-taro'
276
+ import React from 'react'
277
+
278
+ const Demo1 = () => {
279
+ const marginStyle = { margin: 8 }
280
+ return (
281
+ <>
282
+ <Button type="primary" openType="share" style={marginStyle}>
283
+ Share
284
+ </Button>
285
+ <Button type="primary" openType="openSetting" style={marginStyle}>
286
+ 打开授权设置页
287
+ </Button>
288
+ </>
289
+ )
290
+ }
291
+ export default Demo1
292
+
293
+ ```
294
+
295
+ ### 加载状态
296
+
297
+
298
+ ```tsx
299
+ import { Button } from '@mijadesign/mjui-react-taro'
300
+ import React, { useState } from 'react'
301
+
302
+ const Demo7 = () => {
303
+ const [loading, setLoading] = useState(false)
304
+ const marginStyle = { margin: 8 }
305
+ return (
306
+ <>
307
+ <Button
308
+ loading={loading}
309
+ type="primary"
310
+ onClick={() => {
311
+ setTimeout(() => {
312
+ setLoading(false)
313
+ }, 1500)
314
+ setLoading(!loading)
315
+ }}
316
+ style={marginStyle}
317
+ >
318
+ 点击
319
+ </Button>
320
+ </>
321
+ )
322
+ }
323
+ export default Demo7
324
+
325
+ ```
326
+
327
+
328
+ ## Button
329
+
330
+ ### Props
331
+
332
+ | 属性 | 说明 | 类型 | 默认值 |
333
+ | --- | --- | --- | --- |
334
+ | type | 按钮的样式 | `default` \| `primary` \| `warning` \| `danger` \| `success` \| `info` | `default` |
335
+ | size | 按钮的尺寸 | `normal` \|`xlarge` \| `large` \| `small` \| `mini` | `normal` |
336
+ | shape | 按钮的形状 | `square` \| `round` \| `default` | `default` |
337
+ | color | 按钮颜色,支持传入 linear-gradient 渐变色, outline 和 dashed 模式下设置的是 color,其他情况设置的是background,建议使用CSS变量实现的颜色配置 | `string` | `-` |
338
+ | fill | 填充模式 | `solid` \| `outline` \| `dashed` \| `none` | `solid` |
339
+ | disabled | 是否禁用按钮 | `boolean` | `false` |
340
+ | block | 是否为块级元素 | `boolean` | `false` |
341
+ | icon | 按钮图标 | `ReactNode` | `-` |
342
+ | rightIcon | 右侧按钮图标 | `ReactNode` | `-` |
343
+ | loading | 按钮loading状态 | `boolean` | `false` |
344
+ | nativeType | 按钮原始类型 | `submit` \| `reset` \| `button` | `button` |
345
+ | onClick | 点击按钮时触发 | `(e: MouseEvent<HTMLButtonElement>) => void` | `-` |
346
+
347
+ ### 支持小程序API能力
348
+
349
+ 如果你是需要使用原生小程序 `Button` 组件能力的用户,关于原生小程序 `Button` 组件的详细API请前往[查阅更多文档](https://taro-docs.jd.com/docs/components/forms/button)
350
+
351
+ ## 主题定制
352
+
353
+ ### 样式变量
354
+
355
+ 组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](#/zh-CN/component/configprovider)。
356
+
357
+ | 名称 | 说明 | 默认值 |
358
+ | --- | --- | --- |
359
+ | \--nutui-button-border-radius | 按钮的默认圆角 | `$radius-2` |
360
+ | \--nutui-button-border-width | 除 size 为 mini 的按钮的边框宽度 | `1px` |
361
+ | \--nutui-button-danger-background-color | type 为 danger 的按钮的背景色 | `$color-danger` |
362
+ | \--nutui-button-danger-border-color | type 为 danger 的按钮的边框色 | `$color-danger` |
363
+ | \--nutui-button-danger-color | type 为 danger 的按钮的文本色 | `$color-primary-text` |
364
+ | \--nutui-button-danger-disabled | type 为 danger 的按钮的禁用色 | `$color-danger-disabled` |
365
+ | \--nutui-button-default-background-color | type 为 default 的按钮的背景色 | `$color-white` |
366
+ | \--nutui-button-default-border-color | type 为 default 的按钮的边框色 | `$color-border-secondary` |
367
+ | \--nutui-button-default-color | type 为 default 的按钮的文本色 | `$color-text` |
368
+ | \--nutui-button-default-disabled | type 为 default 的按钮的禁用色 | `$color-border-secondary` |
369
+ | \--nutui-button-default-disabled-color | type 为 default 的按钮的禁用文本色 | `$color-text` |
370
+ | \--nutui-button-default-font-size | type 为 default 的按钮的字号 | `$font-size-3` |
371
+ | \--nutui-button-default-height | type 为 default 的按钮的高度 | `40px` |
372
+ | \--nutui-button-default-padding | type 为 default 的按钮的内边距 | `0px $spacing-3` |
373
+ | \--nutui-button-icon-font-size | 按钮 icon 的字号 | `20px` |
374
+ | \--nutui-button-info-background-color | type 为 info 的按钮的背景色 | `$color-info` |
375
+ | \--nutui-button-info-border-color | type 为 info 的按钮的边框色 | `$color-info` |
376
+ | \--nutui-button-info-color | type 为 info 的按钮的文本色 | `$color-primary-text` |
377
+ | \--nutui-button-info-disabled | type 为 info 的按钮的禁用文本色 | `$color-info-disabled` |
378
+ | \--nutui-button-large-border-radius | size 为 large 的按钮的圆角 | `$radius-2` |
379
+ | \--nutui-button-large-font-size | size 为 large 的按钮的字号 | `$font-size-3` |
380
+ | \--nutui-button-large-font-weight | size 为 large 的按钮的字号权重 | `$font-weight-bold` |
381
+ | \--nutui-button-large-height | size 为 large 的按钮的高度 | `48px` |
382
+ | \--nutui-button-large-padding | size 为 large 的按钮的内边距 | `0px $spacing-3` |
383
+ | \--nutui-button-mini-border-radius | size 为 mini 的按钮的圆角 | `$radius-1` |
384
+ | \--nutui-button-mini-font-size | size 为 mini 的按钮的字号 | `$font-size-1` |
385
+ | \--nutui-button-mini-font-weight | size 为 mini 的按钮的字号权重 | `$font-weight-bold` |
386
+ | \--nutui-button-mini-height | size 为 mini 的按钮的高度 | `24px` |
387
+ | \--nutui-button-mini-icon-font-size | size 为 mini 的按钮的 icon 的字号 | `14px` |
388
+ | \--nutui-button-mini-padding | size 为 mini 的按钮的内边距 | `0px $spacing-3` |
389
+ | \--nutui-button-normal-padding | size normal 时的 padding 值 | `0px 12px` |
390
+ | \--nutui-button-primary-border-color | type 为 primary 的按钮的边框色 | `$color-primary` |
391
+ | \--nutui-button-primary-color | type 为 primary 的按钮的文本色 | `$color-primary-text` |
392
+ | \--nutui-button-primary-disabled | type 为 primary 的按钮的禁用色 | `$color-primary-disabled-special` |
393
+ | \--nutui-button-small-border-radius | size 为 small 的按钮的圆角 | `$radius-1` |
394
+ | \--nutui-button-small-font-size | size 为 small 的按钮的字号 | `$font-size-2` |
395
+ | \--nutui-button-small-font-weight | size 为 small 的按钮的字号权重 | `$font-weight-bold` |
396
+ | \--nutui-button-small-height | size 为 small 的按钮的高度 | `32px` |
397
+ | \--nutui-button-small-icon-font-size | size 为 small 的按钮的 icon 的字号 | `16px` |
398
+ | \--nutui-button-small-padding | size 为 small 的按钮的内边距 | `0px $spacing-3` |
399
+ | \--nutui-button-success-background-color | type 为 success 的按钮的背景色 | `$color-success` |
400
+ | \--nutui-button-success-border-color | type 为 success 的按钮的边框色 | `$color-success` |
401
+ | \--nutui-button-success-color | type 为 success 的按钮的文本色 | `$color-primary-text` |
402
+ | \--nutui-button-success-disabled | type 为 success 的按钮的禁用色 | `$color-success-disabled` |
403
+ | \--nutui-button-text-icon-margin | 带 icon 按钮的文本的边距 | `4px` |
404
+ | \--nutui-button-warning-background-color | type 为 warning 的按钮的背景色 | `$color-warning` |
405
+ | \--nutui-button-warning-border-color | type 为 warning 的按钮的边框色 | `$color-warning` |
406
+ | \--nutui-button-warning-color | type 为 warning 的按钮的文本色 | `$color-primary-text` |
407
+ | \--nutui-button-warning-disabled | type 为 warning 的按钮的禁用色 | `$color-warning-disabled` |
408
+ | \--nutui-button-xlarge-border-radius | size 为 xlarge 的按钮的圆角 | `$radius-2` |
409
+ | \--nutui-button-xlarge-font-size | size 为 xlarge 的按钮的字号 | `$font-size-3` |
410
+ | \--nutui-button-xlarge-font-weight | size 为 xlarge 的按钮的字号权重 | `$font-weight-bold` |
411
+ | \--nutui-button-xlarge-height | size 为 xlarge 的按钮的高度 | `52px` |
412
+ | \--nutui-button-xlarge-padding | size 为 xlarge 的按钮的内边距 | `0 $spacing-3` |
413
+ | \--nutui-button-xlarge-text-icon-margin | 带 icon 的 xlarge 按钮的文本的边距 | `6px` |
414
+
415
+