@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.
- package/README.md +147 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -0
- package/dist/services/aliases.service.d.ts +1 -0
- package/dist/services/aliases.service.js +19 -0
- package/dist/services/doc-parser.service.d.ts +3 -0
- package/dist/services/doc-parser.service.js +162 -0
- package/dist/services/index.services.d.ts +3 -0
- package/dist/services/index.services.js +71 -0
- package/dist/services/paths.service.d.ts +5 -0
- package/dist/services/paths.service.js +18 -0
- package/dist/tools/base.tool.d.ts +8 -0
- package/dist/tools/base.tool.js +27 -0
- package/dist/tools/get-component-doc.tool.d.ts +12 -0
- package/dist/tools/get-component-doc.tool.js +40 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.js +4 -0
- package/dist/tools/list-components.tool.d.ts +8 -0
- package/dist/tools/list-components.tool.js +32 -0
- package/dist/tools/search-components.tool.d.ts +12 -0
- package/dist/tools/search-components.tool.js +61 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/index.js +1 -0
- package/docs/docs/aliases.json +59 -0
- package/docs/docs/components/base/button/index.md +415 -0
- package/docs/docs/components/base/cell/index.md +279 -0
- package/docs/docs/components/base/configprovider/index.md +215 -0
- package/docs/docs/components/base/image/index.md +282 -0
- package/docs/docs/components/base/overlay/index.md +288 -0
- package/docs/docs/components/dentry/cascader/index.md +1080 -0
- package/docs/docs/components/dentry/checkbox/index.md +842 -0
- package/docs/docs/components/dentry/datepicker/index.md +489 -0
- package/docs/docs/components/dentry/form/index.md +457 -0
- package/docs/docs/components/dentry/input/index.md +257 -0
- package/docs/docs/components/dentry/picker/index.md +621 -0
- package/docs/docs/components/dentry/radio/index.md +364 -0
- package/docs/docs/components/dentry/searchbar/index.md +317 -0
- package/docs/docs/components/dentry/selector/index.md +295 -0
- package/docs/docs/components/dentry/switch/index.md +300 -0
- package/docs/docs/components/dentry/textarea/index.md +231 -0
- package/docs/docs/components/dentry/uploader/index.md +745 -0
- package/docs/docs/components/exhibition/collapse/index.md +339 -0
- package/docs/docs/components/exhibition/swiper/index.md +385 -0
- package/docs/docs/components/exhibition/tag/index.md +253 -0
- package/docs/docs/components/feedback/dialog/index.md +306 -0
- package/docs/docs/components/feedback/drag/index.md +164 -0
- package/docs/docs/components/feedback/empty/index.md +211 -0
- package/docs/docs/components/feedback/infiniteloading/index.md +397 -0
- package/docs/docs/components/feedback/noticebar/index.md +175 -0
- package/docs/docs/components/feedback/popup/index.md +563 -0
- package/docs/docs/components/feedback/pulltorefresh/index.md +254 -0
- package/docs/docs/components/feedback/toast/index.md +355 -0
- package/docs/docs/components/layout/divider/index.md +162 -0
- package/docs/docs/components/layout/grid/index.md +386 -0
- package/docs/docs/components/layout/space/index.md +196 -0
- package/docs/docs/components/nav/tabs/index.md +955 -0
- package/docs/docs/components-index.json +233 -0
- package/package.json +34 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
order: 7
|
|
3
|
+
demoUrl: 'https://frontend.mishudata.com/mobile/demo/#/layout/pages/space/index'
|
|
4
|
+
group:
|
|
5
|
+
title: 布局组件
|
|
6
|
+
order: 3
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Space 间距 <Badge>2.0.0</Badge>
|
|
10
|
+
|
|
11
|
+
#
|
|
12
|
+
元素排列中保持相同的宽度。
|
|
13
|
+
|
|
14
|
+
### 引入
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import { Space } from '@mijadesign/mjui-react-taro';
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 示例代码
|
|
21
|
+
|
|
22
|
+
### 基础用法
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { Button, Space } from '@mijadesign/mjui-react-taro'
|
|
27
|
+
import React from 'react'
|
|
28
|
+
|
|
29
|
+
const Demo1 = () => {
|
|
30
|
+
return (
|
|
31
|
+
<Space>
|
|
32
|
+
<Button>按钮1</Button>
|
|
33
|
+
<Button>按钮2</Button>
|
|
34
|
+
<Button>按钮3</Button>
|
|
35
|
+
</Space>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
export default Demo1
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### 换行
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import React from 'react'
|
|
47
|
+
import { Space, Button } from '@mijadesign/mjui-react-taro'
|
|
48
|
+
|
|
49
|
+
const Demo2 = () => {
|
|
50
|
+
return (
|
|
51
|
+
<Space wrap>
|
|
52
|
+
<Button>按钮1</Button>
|
|
53
|
+
<Button>按钮2</Button>
|
|
54
|
+
<Button>按钮3</Button>
|
|
55
|
+
<Button>按钮4</Button>
|
|
56
|
+
<Button>按钮5</Button>
|
|
57
|
+
<Button>按钮6</Button>
|
|
58
|
+
</Space>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
export default Demo2
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### 垂直
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
import React from 'react'
|
|
70
|
+
import { Space, Button } from '@mijadesign/mjui-react-taro'
|
|
71
|
+
|
|
72
|
+
const Demo3 = () => {
|
|
73
|
+
return (
|
|
74
|
+
<Space direction="vertical">
|
|
75
|
+
<Button>按钮1</Button>
|
|
76
|
+
<Button>按钮2</Button>
|
|
77
|
+
<Button>按钮3</Button>
|
|
78
|
+
</Space>
|
|
79
|
+
)
|
|
80
|
+
}
|
|
81
|
+
export default Demo3
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 间距大小
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
import React from 'react'
|
|
90
|
+
import { Space, Button, ConfigProvider } from '@mijadesign/mjui-react-taro'
|
|
91
|
+
|
|
92
|
+
const Demo4 = () => {
|
|
93
|
+
return (
|
|
94
|
+
<ConfigProvider
|
|
95
|
+
theme={{
|
|
96
|
+
nutuiSpaceGap: '20px',
|
|
97
|
+
}}
|
|
98
|
+
>
|
|
99
|
+
<Space direction="vertical">
|
|
100
|
+
<Button>按钮1</Button>
|
|
101
|
+
<Button>按钮2</Button>
|
|
102
|
+
<Button>按钮3</Button>
|
|
103
|
+
</Space>
|
|
104
|
+
</ConfigProvider>
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
export default Demo4
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 主轴对齐方式
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { Button, Space } from '@mijadesign/mjui-react-taro'
|
|
116
|
+
import React from 'react'
|
|
117
|
+
|
|
118
|
+
const Demo5 = () => {
|
|
119
|
+
return (
|
|
120
|
+
<Space justify="start" wrap>
|
|
121
|
+
<Button>按钮1</Button>
|
|
122
|
+
<div>
|
|
123
|
+
<Button block style={{ marginBottom: 12 }}>
|
|
124
|
+
按钮2
|
|
125
|
+
</Button>
|
|
126
|
+
<Button block>按钮2</Button>
|
|
127
|
+
</div>
|
|
128
|
+
<div>
|
|
129
|
+
<Button block style={{ marginBottom: 12 }}>
|
|
130
|
+
按钮3
|
|
131
|
+
</Button>
|
|
132
|
+
<Button block style={{ marginBottom: 12 }}>
|
|
133
|
+
按钮3
|
|
134
|
+
</Button>
|
|
135
|
+
<Button block>按钮3</Button>
|
|
136
|
+
</div>
|
|
137
|
+
</Space>
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
export default Demo5
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### 交叉轴对齐方式
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
```tsx
|
|
148
|
+
import { Button, Space } from '@mijadesign/mjui-react-taro'
|
|
149
|
+
import React from 'react'
|
|
150
|
+
|
|
151
|
+
const Demo6 = () => {
|
|
152
|
+
return (
|
|
153
|
+
<Space align="end" wrap>
|
|
154
|
+
<Button>按钮1</Button>
|
|
155
|
+
<div>
|
|
156
|
+
<Button block style={{ marginBottom: 12 }}>
|
|
157
|
+
按钮2
|
|
158
|
+
</Button>
|
|
159
|
+
<Button block>按钮2</Button>
|
|
160
|
+
</div>
|
|
161
|
+
<div>
|
|
162
|
+
<Button block style={{ marginBottom: 12 }}>
|
|
163
|
+
按钮3
|
|
164
|
+
</Button>
|
|
165
|
+
<Button block style={{ marginBottom: 12 }}>
|
|
166
|
+
按钮3
|
|
167
|
+
</Button>
|
|
168
|
+
<Button block>按钮3</Button>
|
|
169
|
+
</div>
|
|
170
|
+
</Space>
|
|
171
|
+
)
|
|
172
|
+
}
|
|
173
|
+
export default Demo6
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Space
|
|
178
|
+
|
|
179
|
+
### Props
|
|
180
|
+
|
|
181
|
+
| 属性 | 描述 | 类型 | 默认值 |
|
|
182
|
+
| --- | --- | --- | --- |
|
|
183
|
+
| direction | 间距方向 | `'vertical'| 'horizontal'` | `'horizontal'` |
|
|
184
|
+
| align | 交叉轴对齐方式 | `'start'|'end'|'center'|'baseline'` | `-` |
|
|
185
|
+
| justify | 主轴对齐方式 | `'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch'` | `-` |
|
|
186
|
+
| wrap | 是否自动换行,仅在 horizontal 时有效 | `boolean` | `false` |
|
|
187
|
+
|
|
188
|
+
## 主题定制
|
|
189
|
+
|
|
190
|
+
### 样式变量
|
|
191
|
+
|
|
192
|
+
组件提供了下列 CSS 变量,可用于自定义样式,使用方法请参考 [ConfigProvider 组件](/components/config-provider)。
|
|
193
|
+
|
|
194
|
+
| 名称 | 默认值 | 描述 |
|
|
195
|
+
| --- | --- | --- |
|
|
196
|
+
| \--nutui-space-gap | `8px` | 间距大小 |
|