m8-mcp-server 1.0.5 → 1.0.7
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/dist/cli.d.ts +2 -2
- package/dist/cli.js +1 -13
- package/dist/docs/apis.d.ts +2 -2
- package/dist/docs/apis.js +9 -326
- package/dist/docs/components.d.ts +2 -2
- package/dist/docs/components.js +2 -186
- package/dist/docs/index.d.ts +2 -2
- package/dist/docs/index.js +18 -177
- package/dist/docs/loader.d.ts +2 -2
- package/dist/docs/loader.js +1 -165
- package/dist/docs/search.d.ts +2 -2
- package/dist/docs/search.js +2 -196
- package/dist/docs/standards.d.ts +2 -2
- package/dist/docs/standards.js +3 -134
- package/dist/docs/utils.d.ts +2 -2
- package/dist/docs/utils.js +3 -129
- package/dist/generator/header.d.ts +2 -2
- package/dist/generator/header.js +3 -83
- package/dist/generator/index.d.ts +2 -2
- package/dist/generator/index.js +283 -648
- package/dist/generator/vue-template.d.ts +2 -2
- package/dist/generator/vue-template.js +336 -1016
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -73
- package/dist/recommend/index.d.ts +2 -2
- package/dist/recommend/index.js +2 -412
- package/dist/tools/generate-code.d.ts +2 -2
- package/dist/tools/generate-code.js +39 -211
- package/dist/tools/get-api-info.d.ts +2 -2
- package/dist/tools/get-api-info.js +1 -65
- package/dist/tools/get-coding-standard.d.ts +2 -2
- package/dist/tools/get-coding-standard.js +1 -66
- package/dist/tools/get-component-info.d.ts +2 -2
- package/dist/tools/get-component-info.js +1 -60
- package/dist/tools/get-util-info.d.ts +2 -2
- package/dist/tools/get-util-info.js +1 -65
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +3 -101
- package/dist/tools/recommend-solution.d.ts +2 -2
- package/dist/tools/recommend-solution.js +1 -67
- package/dist/tools/search-docs.d.ts +2 -2
- package/dist/tools/search-docs.js +1 -71
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js +0 -8
- package/package.json +6 -5
- package/dist/cli.js.map +0 -1
- package/dist/docs/apis.js.map +0 -1
- package/dist/docs/components.js.map +0 -1
- package/dist/docs/index.js.map +0 -1
- package/dist/docs/loader.js.map +0 -1
- package/dist/docs/search.js.map +0 -1
- package/dist/docs/standards.js.map +0 -1
- package/dist/docs/utils.js.map +0 -1
- package/dist/generator/header.js.map +0 -1
- package/dist/generator/index.js.map +0 -1
- package/dist/generator/vue-template.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/recommend/index.js.map +0 -1
- package/dist/tools/generate-code.js.map +0 -1
- package/dist/tools/get-api-info.js.map +0 -1
- package/dist/tools/get-coding-standard.js.map +0 -1
- package/dist/tools/get-component-info.js.map +0 -1
- package/dist/tools/get-util-info.js.map +0 -1
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/recommend-solution.js.map +0 -1
- package/dist/tools/search-docs.js.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/resources/cases/.gitkeep +0 -0
- package/resources/cases/form-submit-vue2.json +0 -15
- package/resources/cases/index.json +0 -8
- package/resources/cases/list-detail-vue2.json +0 -27
- package/resources/components/.gitkeep +0 -0
- package/resources/components/actionsheet.json +0 -199
- package/resources/components/amap.json +0 -66
- package/resources/components/area.json +0 -158
- package/resources/components/badge.json +0 -93
- package/resources/components/button.json +0 -260
- package/resources/components/calendar.json +0 -225
- package/resources/components/cascader.json +0 -115
- package/resources/components/cell.json +0 -85
- package/resources/components/chart.json +0 -55
- package/resources/components/checkbox.json +0 -158
- package/resources/components/circle.json +0 -138
- package/resources/components/collapse.json +0 -88
- package/resources/components/countdown.json +0 -105
- package/resources/components/datepicker.json +0 -216
- package/resources/components/dialog.json +0 -250
- package/resources/components/divider.json +0 -82
- package/resources/components/dragsort.json +0 -67
- package/resources/components/dropdownmenu.json +0 -129
- package/resources/components/easycalendar.json +0 -84
- package/resources/components/empty.json +0 -90
- package/resources/components/field.json +0 -423
- package/resources/components/form.json +0 -156
- package/resources/components/grid.json +0 -131
- package/resources/components/header.json +0 -147
- package/resources/components/icon.json +0 -104
- package/resources/components/image.json +0 -169
- package/resources/components/imagepreview.json +0 -150
- package/resources/components/imagescale.json +0 -245
- package/resources/components/index.json +0 -72
- package/resources/components/indexbar.json +0 -83
- package/resources/components/layout.json +0 -74
- package/resources/components/lazyload.json +0 -46
- package/resources/components/loading.json +0 -103
- package/resources/components/minirefresh.json +0 -341
- package/resources/components/noticebar.json +0 -148
- package/resources/components/notify.json +0 -60
- package/resources/components/numberkeyboard.json +0 -216
- package/resources/components/overlay.json +0 -78
- package/resources/components/pagination.json +0 -137
- package/resources/components/panel.json +0 -87
- package/resources/components/passwordinput.json +0 -103
- package/resources/components/picker.json +0 -195
- package/resources/components/popover.json +0 -161
- package/resources/components/popup.json +0 -229
- package/resources/components/progress.json +0 -111
- package/resources/components/qrcode.json +0 -128
- package/resources/components/radio.json +0 -139
- package/resources/components/rate.json +0 -157
- package/resources/components/rtc.json +0 -35
- package/resources/components/search.json +0 -234
- package/resources/components/selectperson.json +0 -175
- package/resources/components/sidebar.json +0 -74
- package/resources/components/skeleton.json +0 -110
- package/resources/components/slider.json +0 -159
- package/resources/components/stepper.json +0 -241
- package/resources/components/steps.json +0 -108
- package/resources/components/sticky.json +0 -72
- package/resources/components/swipe.json +0 -146
- package/resources/components/swipecell.json +0 -118
- package/resources/components/switch.json +0 -123
- package/resources/components/switchcell.json +0 -123
- package/resources/components/tab.json +0 -257
- package/resources/components/tabbar.json +0 -137
- package/resources/components/table.json +0 -149
- package/resources/components/tag.json +0 -149
- package/resources/components/toast.json +0 -70
- package/resources/components/treeselect.json +0 -106
- package/resources/components/uploader.json +0 -283
- package/resources/components/verifycode.json +0 -94
- package/resources/standards/.gitkeep +0 -0
- package/resources/standards/css.json +0 -108
- package/resources/standards/javascript.json +0 -129
- package/resources/standards/project-structure.json +0 -101
- package/resources/standards/vue.json +0 -122
- package/resources/utils/.gitkeep +0 -0
- package/resources/utils/ajax.json +0 -76
- package/resources/utils/common.json +0 -129
- package/resources/utils/index.json +0 -7
- package/resources/utils/string.json +0 -112
|
@@ -1,423 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "field",
|
|
3
|
-
"name": "em-field",
|
|
4
|
-
"title": "输入框",
|
|
5
|
-
"description": "表单中的输入框组件。",
|
|
6
|
-
"props": [
|
|
7
|
-
{
|
|
8
|
-
"name": "v-model",
|
|
9
|
-
"type": "number / string",
|
|
10
|
-
"default": "-",
|
|
11
|
-
"required": false,
|
|
12
|
-
"description": "当前输入的值"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "label",
|
|
16
|
-
"type": "string",
|
|
17
|
-
"default": "-",
|
|
18
|
-
"required": false,
|
|
19
|
-
"description": "输入框左侧文本"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "name",
|
|
23
|
-
"type": "string",
|
|
24
|
-
"default": "-",
|
|
25
|
-
"required": false,
|
|
26
|
-
"description": "名称,提交表单的标识符"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "type",
|
|
30
|
-
"type": "string",
|
|
31
|
-
"default": "text",
|
|
32
|
-
"required": false,
|
|
33
|
-
"description": "输入框类型, 可选值为 `tel` `digit` `number` `textarea` `password` 等"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "size",
|
|
37
|
-
"type": "string",
|
|
38
|
-
"default": "-",
|
|
39
|
-
"required": false,
|
|
40
|
-
"description": "大小,可选值为 `large`"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "maxlength",
|
|
44
|
-
"type": "number / string",
|
|
45
|
-
"default": "-",
|
|
46
|
-
"required": false,
|
|
47
|
-
"description": "输入的最大字符数"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"name": "placeholder",
|
|
51
|
-
"type": "string",
|
|
52
|
-
"default": "-",
|
|
53
|
-
"required": false,
|
|
54
|
-
"description": "输入框占位提示文字"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"name": "placeholder-style",
|
|
58
|
-
"type": "string",
|
|
59
|
-
"default": "color: #b8becc;",
|
|
60
|
-
"required": false,
|
|
61
|
-
"description": "指定 placeholder 的样式"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"name": "placeholder-class",
|
|
65
|
-
"type": "string",
|
|
66
|
-
"default": "-",
|
|
67
|
-
"required": false,
|
|
68
|
-
"description": "指定 placeholder 的样式类,注意页面或组件的`style`中写了`scoped`时,需要使用`::v-deep`样式穿透"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "border",
|
|
72
|
-
"type": "boolean",
|
|
73
|
-
"default": "true",
|
|
74
|
-
"required": false,
|
|
75
|
-
"description": "是否显示内边框"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "disabled",
|
|
79
|
-
"type": "boolean",
|
|
80
|
-
"default": "false",
|
|
81
|
-
"required": false,
|
|
82
|
-
"description": "是否禁用输入框"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "readonly",
|
|
86
|
-
"type": "boolean",
|
|
87
|
-
"default": "false",
|
|
88
|
-
"required": false,
|
|
89
|
-
"description": "是否只读"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"name": "colon",
|
|
93
|
-
"type": "boolean",
|
|
94
|
-
"default": "false",
|
|
95
|
-
"required": false,
|
|
96
|
-
"description": "是否在 `label` 后面添加冒号"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"name": "required",
|
|
100
|
-
"type": "boolean",
|
|
101
|
-
"default": "false",
|
|
102
|
-
"required": false,
|
|
103
|
-
"description": "是否显示表单必填星号"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"name": "required-before",
|
|
107
|
-
"type": "boolean",
|
|
108
|
-
"default": "false",
|
|
109
|
-
"required": false,
|
|
110
|
-
"description": "表单必填星号位置是否切换在前"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"name": "center",
|
|
114
|
-
"type": "boolean",
|
|
115
|
-
"default": "false",
|
|
116
|
-
"required": false,
|
|
117
|
-
"description": "是否使内容垂直居中"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"name": "clearable",
|
|
121
|
-
"type": "boolean",
|
|
122
|
-
"default": "false",
|
|
123
|
-
"required": false,
|
|
124
|
-
"description": "是否启用清除图标,点击清除图标后会清空输入框"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"name": "clear-trigger",
|
|
128
|
-
"type": "string",
|
|
129
|
-
"default": "focus",
|
|
130
|
-
"required": false,
|
|
131
|
-
"description": "显示清除图标的时机,`always` 表示输入框不为空时展示,`focus` 表示输入框聚焦且不为空时展示"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"name": "clickable",
|
|
135
|
-
"type": "boolean",
|
|
136
|
-
"default": "false",
|
|
137
|
-
"required": false,
|
|
138
|
-
"description": "是否开启点击反馈"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"name": "is-link",
|
|
142
|
-
"type": "boolean",
|
|
143
|
-
"default": "false",
|
|
144
|
-
"required": false,
|
|
145
|
-
"description": "是否展示右侧箭头并开启点击反馈"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"name": "autofocus",
|
|
149
|
-
"type": "boolean",
|
|
150
|
-
"default": "false",
|
|
151
|
-
"required": false,
|
|
152
|
-
"description": "是否自动聚焦,`iOS` 系统不支持该属性"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"name": "show-word-limit",
|
|
156
|
-
"type": "boolean",
|
|
157
|
-
"default": "false",
|
|
158
|
-
"required": false,
|
|
159
|
-
"description": "是否显示字数统计,需要设置`maxlength`属性"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"name": "error",
|
|
163
|
-
"type": "boolean",
|
|
164
|
-
"default": "false",
|
|
165
|
-
"required": false,
|
|
166
|
-
"description": "是否将输入内容标红"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"name": "error-message",
|
|
170
|
-
"type": "string",
|
|
171
|
-
"default": "-",
|
|
172
|
-
"required": false,
|
|
173
|
-
"description": "底部错误提示文案,为空时不展示"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"name": "formatter",
|
|
177
|
-
"type": "Function",
|
|
178
|
-
"default": "-",
|
|
179
|
-
"required": false,
|
|
180
|
-
"description": "输入内容格式化函数"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"name": "format-trigger",
|
|
184
|
-
"type": "string",
|
|
185
|
-
"default": "onChange",
|
|
186
|
-
"required": false,
|
|
187
|
-
"description": "格式化函数触发的时机,可选值为 `onBlur`"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"name": "arrow-direction",
|
|
191
|
-
"type": "string",
|
|
192
|
-
"default": "right",
|
|
193
|
-
"required": false,
|
|
194
|
-
"description": "箭头方向,可选值为 `left` `up` `down`"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"name": "label-class",
|
|
198
|
-
"type": "string",
|
|
199
|
-
"default": "-",
|
|
200
|
-
"required": false,
|
|
201
|
-
"description": "左侧文本额外类名"
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
"name": "label-width",
|
|
205
|
-
"type": "number /string",
|
|
206
|
-
"default": "96px",
|
|
207
|
-
"required": false,
|
|
208
|
-
"description": "左侧文本宽度,默认单位为`px`"
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
"name": "label-align",
|
|
212
|
-
"type": "string",
|
|
213
|
-
"default": "left",
|
|
214
|
-
"required": false,
|
|
215
|
-
"description": "左侧文本对齐方式,可选值为 `center` `right`"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
"name": "input-class",
|
|
219
|
-
"type": "string",
|
|
220
|
-
"default": "-",
|
|
221
|
-
"required": false,
|
|
222
|
-
"description": "输入框额外类名"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"name": "input-align",
|
|
226
|
-
"type": "string",
|
|
227
|
-
"default": "left",
|
|
228
|
-
"required": false,
|
|
229
|
-
"description": "输入框对齐方式,可选值为 `center` `right` `vertical`"
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
"name": "error-message-align",
|
|
233
|
-
"type": "string",
|
|
234
|
-
"default": "left",
|
|
235
|
-
"required": false,
|
|
236
|
-
"description": "错误提示文案对齐方式,可选值为 `center` `right`"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"name": "autosize",
|
|
240
|
-
"type": "boolean / object",
|
|
241
|
-
"default": "false",
|
|
242
|
-
"required": false,
|
|
243
|
-
"description": "是否自适应内容高度,只对 `textarea` 有效,可传入对象,如 { `maxHeight`: `100`, `minHeight`: `50` },单位为`px`"
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
"name": "left-icon",
|
|
247
|
-
"type": "string",
|
|
248
|
-
"default": "-",
|
|
249
|
-
"required": false,
|
|
250
|
-
"description": "左侧图标名称或图片链接"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
"name": "right-icon",
|
|
254
|
-
"type": "string",
|
|
255
|
-
"default": "-",
|
|
256
|
-
"required": false,
|
|
257
|
-
"description": "右侧图标名称或图片链接"
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
"name": "icon-prefix",
|
|
261
|
-
"type": "string",
|
|
262
|
-
"default": "van-icon",
|
|
263
|
-
"required": false,
|
|
264
|
-
"description": "图标类名前缀,同 `Icon` 组件的 `class-prefix` 属性"
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
"name": "icon-class",
|
|
268
|
-
"type": "string",
|
|
269
|
-
"default": "-",
|
|
270
|
-
"required": false,
|
|
271
|
-
"description": "右侧图标额外类名"
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"name": "cell-style",
|
|
275
|
-
"type": "string",
|
|
276
|
-
"default": "-",
|
|
277
|
-
"required": false,
|
|
278
|
-
"description": "内部单元格组件的额外样式"
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
"name": "rules",
|
|
282
|
-
"type": "Rule[]",
|
|
283
|
-
"default": "-",
|
|
284
|
-
"required": false,
|
|
285
|
-
"description": "表单校验规则,详见 `Form` 组件"
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"name": "desensitizationType",
|
|
289
|
-
"type": "string",
|
|
290
|
-
"default": "-",
|
|
291
|
-
"required": false,
|
|
292
|
-
"description": "脱敏类型。脱敏功能需配合`emForm`使用,设置该属性时开启脱敏功能,详见 `Form` 组件"
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"name": "desensitizer",
|
|
296
|
-
"type": "function",
|
|
297
|
-
"default": "-",
|
|
298
|
-
"required": false,
|
|
299
|
-
"description": "自定义脱敏数据处理方法"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"name": "desensitizeReg",
|
|
303
|
-
"type": "RegExp",
|
|
304
|
-
"default": "/(?:)/",
|
|
305
|
-
"required": false,
|
|
306
|
-
"description": "自定义脱敏正则表达式"
|
|
307
|
-
}
|
|
308
|
-
],
|
|
309
|
-
"events": [
|
|
310
|
-
{
|
|
311
|
-
"name": "input",
|
|
312
|
-
"parameters": "输入框内容变化时触发",
|
|
313
|
-
"description": "value: string (当前输入的值)"
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
"name": "focus",
|
|
317
|
-
"parameters": "输入框获得焦点时触发",
|
|
318
|
-
"description": "event: Event"
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
"name": "blur",
|
|
322
|
-
"parameters": "输入框失去焦点时触发",
|
|
323
|
-
"description": "event: Event"
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
"name": "clear",
|
|
327
|
-
"parameters": "点击清除按钮时触发",
|
|
328
|
-
"description": "event: Event"
|
|
329
|
-
},
|
|
330
|
-
{
|
|
331
|
-
"name": "click",
|
|
332
|
-
"parameters": "点击 Field 时触发",
|
|
333
|
-
"description": "event: Event"
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
"name": "click-input",
|
|
337
|
-
"parameters": "点击输入区域时触发",
|
|
338
|
-
"description": "event: Event"
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
"name": "click-left-icon",
|
|
342
|
-
"parameters": "点击左侧图标时触发",
|
|
343
|
-
"description": "event: Event"
|
|
344
|
-
},
|
|
345
|
-
{
|
|
346
|
-
"name": "click-right-icon",
|
|
347
|
-
"parameters": "点击右侧图标时触发",
|
|
348
|
-
"description": "event: Event"
|
|
349
|
-
}
|
|
350
|
-
],
|
|
351
|
-
"slots": [
|
|
352
|
-
{
|
|
353
|
-
"name": "label",
|
|
354
|
-
"description": "自定义输入框 label 标签"
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
"name": "input",
|
|
358
|
-
"description": "自定义输入框,使用此插槽后,与输入框相关的属性和事件将失效"
|
|
359
|
-
},
|
|
360
|
-
{
|
|
361
|
-
"name": "leftIcon",
|
|
362
|
-
"description": "自定义输入框头部图标"
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
"name": "rightIcon",
|
|
366
|
-
"description": "自定义输入框尾部图标"
|
|
367
|
-
},
|
|
368
|
-
{
|
|
369
|
-
"name": "button",
|
|
370
|
-
"description": "自定义输入框尾部按钮"
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
"name": "extra",
|
|
374
|
-
"description": "自定义输入框最右侧的额外内容"
|
|
375
|
-
}
|
|
376
|
-
],
|
|
377
|
-
"examples": {
|
|
378
|
-
"vue2": [
|
|
379
|
-
{
|
|
380
|
-
"title": "基础用法",
|
|
381
|
-
"code": "<!-- Field 是基于 Cell 实现的,可以使用 CellGroup 作为容器来提供外边框。 -->\n<em-cell-group>\n <em-field v-model=\"value\" label=\"文本\" placeholder=\"请输入用户名\" />\n</em-cell-group>"
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
"title": "基座风格",
|
|
385
|
-
"code": "<em-cell-group>\n <em-field label=\"横向必填项\" basic required is-link placeholder=\"请输入\" v-model=\"value\"></em-field>\n</em-cell-group>"
|
|
386
|
-
},
|
|
387
|
-
{
|
|
388
|
-
"title": "基座风格:纵向",
|
|
389
|
-
"code": "<em-cell-group>\n <em-field\n label=\"纵向必填项\"\n basic\n required\n is-link\n input-align=\"vertical\"\n placeholder=\"请输入\"\n v-model=\"value\"\n ></em-field>\n</em-cell-group>"
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
"title": "基座风格: 多行文本框",
|
|
393
|
-
"code": "<em-cell-group>\n <em-field\n label=\"多行文本框\"\n basic\n required\n input-align=\"vertical\"\n :autosize=\"{ minHeight: 24 }\"\n type=\"textarea\"\n placeholder=\"请输入\"\n v-model=\"value\"\n ></em-field>\n</em-cell-group>"
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
"title": "基座风格: 其他表单项类型",
|
|
397
|
-
"code": "<em-cell-group>\n <em-field name=\"switch\" basic label=\"滑动开关\" input-align=\"right\">\n <template v-slot:input>\n <em-switch v-model=\"value\" />\n </template>\n </em-field>\n</em-cell-group>"
|
|
398
|
-
}
|
|
399
|
-
],
|
|
400
|
-
"vue3": [
|
|
401
|
-
{
|
|
402
|
-
"title": "基础用法",
|
|
403
|
-
"code": "<!-- Field 是基于 Cell 实现的,可以使用 CellGroup 作为容器来提供外边框。 -->\n<em-cell-group>\n <em-field v-model=\"value\" label=\"文本\" placeholder=\"请输入用户名\" />\n</em-cell-group>"
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
"title": "基座风格",
|
|
407
|
-
"code": "<em-cell-group>\n <em-field label=\"横向必填项\" basic required is-link placeholder=\"请输入\" v-model=\"value\"></em-field>\n</em-cell-group>"
|
|
408
|
-
},
|
|
409
|
-
{
|
|
410
|
-
"title": "基座风格:纵向",
|
|
411
|
-
"code": "<em-cell-group>\n <em-field\n label=\"纵向必填项\"\n basic\n required\n is-link\n input-align=\"vertical\"\n placeholder=\"请输入\"\n v-model=\"value\"\n ></em-field>\n</em-cell-group>"
|
|
412
|
-
},
|
|
413
|
-
{
|
|
414
|
-
"title": "基座风格: 多行文本框",
|
|
415
|
-
"code": "<em-cell-group>\n <em-field\n label=\"多行文本框\"\n basic\n required\n input-align=\"vertical\"\n :autosize=\"{ minHeight: 24 }\"\n type=\"textarea\"\n placeholder=\"请输入\"\n v-model=\"value\"\n ></em-field>\n</em-cell-group>"
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
"title": "基座风格: 其他表单项类型",
|
|
419
|
-
"code": "<em-cell-group>\n <em-field name=\"switch\" basic label=\"滑动开关\" input-align=\"right\">\n <template v-slot:input>\n <em-switch v-model=\"value\" />\n </template>\n </em-field>\n</em-cell-group>"
|
|
420
|
-
}
|
|
421
|
-
]
|
|
422
|
-
}
|
|
423
|
-
}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "form",
|
|
3
|
-
"name": "em-form",
|
|
4
|
-
"title": "表单",
|
|
5
|
-
"description": "用于数据录入、校验,支持输入框、单选框、复选框、文件上传等类型。",
|
|
6
|
-
"props": [
|
|
7
|
-
{
|
|
8
|
-
"name": "label-width",
|
|
9
|
-
"type": "number /string",
|
|
10
|
-
"default": "96px",
|
|
11
|
-
"required": false,
|
|
12
|
-
"description": "表单项 `label` 宽度,默认单位为`px`"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "label-align",
|
|
16
|
-
"type": "string",
|
|
17
|
-
"default": "left",
|
|
18
|
-
"required": false,
|
|
19
|
-
"description": "表单项 `label` 对齐方式,可选值为 `center` `right`"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "input-align",
|
|
23
|
-
"type": "string",
|
|
24
|
-
"default": "left",
|
|
25
|
-
"required": false,
|
|
26
|
-
"description": "输入框对齐方式,可选值为 `center` `right` `vertical`"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "error-message-align",
|
|
30
|
-
"type": "string",
|
|
31
|
-
"default": "left",
|
|
32
|
-
"required": false,
|
|
33
|
-
"description": "错误提示文案对齐方式,可选值为 `center` `right`"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "validate-trigger",
|
|
37
|
-
"type": "string",
|
|
38
|
-
"default": "onBlur",
|
|
39
|
-
"required": false,
|
|
40
|
-
"description": "表单校验触发时机,可选值为`onChange` `onSubmit`"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "colon",
|
|
44
|
-
"type": "boolean",
|
|
45
|
-
"default": "false",
|
|
46
|
-
"required": false,
|
|
47
|
-
"description": "是否在 `label` 后面添加冒号"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"name": "disabled",
|
|
51
|
-
"type": "boolean",
|
|
52
|
-
"default": "false",
|
|
53
|
-
"required": false,
|
|
54
|
-
"description": "是否禁用表单中的所有输入框"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"name": "readonly",
|
|
58
|
-
"type": "boolean",
|
|
59
|
-
"default": "false",
|
|
60
|
-
"required": false,
|
|
61
|
-
"description": "是否将表单中的所有输入框设置为只读"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"name": "validate-first",
|
|
65
|
-
"type": "boolean",
|
|
66
|
-
"default": "false",
|
|
67
|
-
"required": false,
|
|
68
|
-
"description": "是否在某一项校验不通过时停止校验"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "scroll-to-error",
|
|
72
|
-
"type": "boolean",
|
|
73
|
-
"default": "false",
|
|
74
|
-
"required": false,
|
|
75
|
-
"description": "是否在提交表单且校验不通过时滚动至错误的表单项"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "show-error",
|
|
79
|
-
"type": "boolean",
|
|
80
|
-
"default": "true",
|
|
81
|
-
"required": false,
|
|
82
|
-
"description": "是否在校验不通过时标红输入框"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "show-error-message",
|
|
86
|
-
"type": "boolean",
|
|
87
|
-
"default": "true",
|
|
88
|
-
"required": false,
|
|
89
|
-
"description": "是否在校验不通过时在输入框下方展示错误提示"
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
"events": [
|
|
93
|
-
{
|
|
94
|
-
"name": "submit",
|
|
95
|
-
"parameters": "提交表单且验证通过后触发",
|
|
96
|
-
"description": "values: object"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"name": "failed",
|
|
100
|
-
"parameters": "提交表单且验证不通过后触发",
|
|
101
|
-
"description": "errorInfo: { values: object, errors: object[] }"
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"slots": [
|
|
105
|
-
{
|
|
106
|
-
"name": "default",
|
|
107
|
-
"description": "表单内容"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"examples": {
|
|
111
|
-
"vue2": [
|
|
112
|
-
{
|
|
113
|
-
"title": "基础用法",
|
|
114
|
-
"code": "<em-form @submit=\"onSubmit\">\n <em-field\n v-model=\"username\"\n name=\"用户名\"\n label=\"用户名\"\n placeholder=\"用户名\"\n :rules=\"[{ required: true, message: '请填写用户名' }]\"\n />\n <em-field\n v-model=\"password\"\n type=\"password\"\n name=\"密码\"\n label=\"密码\"\n placeholder=\"密码\"\n :rules=\"[{ required: true, message: '请填写密码' }]\"\n />\n <div style=\"margin: 16px;\">\n <em-button round block type=\"info\" native-type=\"submit\">提交</em-button>\n </div>\n</em-form>"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"title": "校验规则",
|
|
118
|
-
"code": "<em-form validate-first @failed=\"onFailed\">\n <!-- 通过 pattern 进行正则校验 -->\n <em-field\n v-model=\"value1\"\n name=\"pattern\"\n placeholder=\"正则校验\"\n :rules=\"[{ pattern, message: '请输入正确内容' }]\"\n />\n <!-- 通过 validator 进行函数校验 -->\n <em-field\n v-model=\"value2\"\n name=\"validator\"\n placeholder=\"函数校验\"\n :rules=\"[{ validator, message: '请输入正确内容' }]\"\n />\n <!-- 通过 validator 进行异步函数校验 -->\n <em-field\n v-model=\"value3\"\n name=\"asyncValidator\"\n placeholder=\"异步函数校验\"\n :rules=\"[{ validator: asyncValidator, message: '请输入正确内容' }]\"\n />\n <div style=\"margin: 16px;\">\n <em-button round block type=\"info\" native-type=\"submit\">提交</em-button>\n </div>\n</em-form>\n<em-toast ref=\"emToast\"></em-toast>"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"title": "脱敏",
|
|
122
|
-
"code": "<em-form ref=\"formComp\" validate-first @submit=\"onSubmit2\">\n <!-- 手机号,默认脱敏校验 -->\n <em-field\n v-model=\"valueMobile\"\n label=\"手机号\"\n name=\"mobile\"\n placeholder=\"请输入手机号\"\n :rules=\"[{ validator, message: '请输入以1开头的11位数字' }]\"\n :desensitization-type=\"DESENDATATYPE_MOBILE_PHONE\"\n />\n <!-- 邮箱,自定义脱敏 -->\n <em-field\n v-model=\"valueEmail\"\n label=\"邮箱\"\n name=\"email\"\n placeholder=\"请输入邮箱\"\n :rules=\"[{ validator: emailValidator, message: '请输入正确的邮箱格式' }]\"\n :desensitization-type=\"DESENDATATYPE_CUSTOM\"\n :desensitizer=\"desensitizer\"\n />\n <div style=\"margin: 16px\">\n <em-button round block type=\"info\" native-type=\"submit\">提交</em-button>\n </div>\n</em-form>"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"title": "表单项类型 - 输入框",
|
|
126
|
-
"code": "<em-field name=\"input\" label=\"输入框\">\n <template #input>\n <em-input v-model=\"input\" placeholder=\"请输入内容\" />\n </template>\n</em-field>"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"title": "表单项类型 - 开关",
|
|
130
|
-
"code": "<em-field name=\"switch\" label=\"开关\">\n <template #input>\n <em-switch v-model=\"switchChecked\" size=\"20\" />\n </template>\n</em-field>"
|
|
131
|
-
}
|
|
132
|
-
],
|
|
133
|
-
"vue3": [
|
|
134
|
-
{
|
|
135
|
-
"title": "基础用法",
|
|
136
|
-
"code": "<em-form @submit=\"onSubmit\">\n <em-field\n v-model=\"username\"\n name=\"用户名\"\n label=\"用户名\"\n placeholder=\"用户名\"\n :rules=\"[{ required: true, message: '请填写用户名' }]\"\n />\n <em-field\n v-model=\"password\"\n type=\"password\"\n name=\"密码\"\n label=\"密码\"\n placeholder=\"密码\"\n :rules=\"[{ required: true, message: '请填写密码' }]\"\n />\n <div style=\"margin: 16px;\">\n <em-button round block type=\"info\" native-type=\"submit\">提交</em-button>\n </div>\n</em-form>"
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
"title": "校验规则",
|
|
140
|
-
"code": "<em-form validate-first @failed=\"onFailed\">\n <!-- 通过 pattern 进行正则校验 -->\n <em-field\n v-model=\"value1\"\n name=\"pattern\"\n placeholder=\"正则校验\"\n :rules=\"[{ pattern, message: '请输入正确内容' }]\"\n />\n <!-- 通过 validator 进行函数校验 -->\n <em-field\n v-model=\"value2\"\n name=\"validator\"\n placeholder=\"函数校验\"\n :rules=\"[{ validator, message: '请输入正确内容' }]\"\n />\n <!-- 通过 validator 进行异步函数校验 -->\n <em-field\n v-model=\"value3\"\n name=\"asyncValidator\"\n placeholder=\"异步函数校验\"\n :rules=\"[{ validator: asyncValidator, message: '请输入正确内容' }]\"\n />\n <div style=\"margin: 16px;\">\n <em-button round block type=\"info\" native-type=\"submit\">提交</em-button>\n </div>\n</em-form>\n<em-toast ref=\"emToast\"></em-toast>"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"title": "脱敏",
|
|
144
|
-
"code": "<em-form ref=\"formComp\" validate-first @submit=\"onSubmit2\">\n <!-- 手机号,默认脱敏校验 -->\n <em-field\n v-model=\"valueMobile\"\n label=\"手机号\"\n name=\"mobile\"\n placeholder=\"请输入手机号\"\n :rules=\"[{ validator, message: '请输入以1开头的11位数字' }]\"\n :desensitization-type=\"DESENDATATYPE_MOBILE_PHONE\"\n />\n <!-- 邮箱,自定义脱敏 -->\n <em-field\n v-model=\"valueEmail\"\n label=\"邮箱\"\n name=\"email\"\n placeholder=\"请输入邮箱\"\n :rules=\"[{ validator: emailValidator, message: '请输入正确的邮箱格式' }]\"\n :desensitization-type=\"DESENDATATYPE_CUSTOM\"\n :desensitizer=\"desensitizer\"\n />\n <div style=\"margin: 16px\">\n <em-button round block type=\"info\" native-type=\"submit\">提交</em-button>\n </div>\n</em-form>"
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
"title": "表单项类型 - 输入框",
|
|
148
|
-
"code": "<em-field name=\"input\" label=\"输入框\">\n <template #input>\n <em-input v-model=\"input\" placeholder=\"请输入内容\" />\n </template>\n</em-field>"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"title": "表单项类型 - 开关",
|
|
152
|
-
"code": "<em-field name=\"switch\" label=\"开关\">\n <template #input>\n <em-switch v-model=\"switchChecked\" size=\"20\" />\n </template>\n</em-field>"
|
|
153
|
-
}
|
|
154
|
-
]
|
|
155
|
-
}
|
|
156
|
-
}
|