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,149 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "tag",
|
|
3
|
-
"name": "em-tag",
|
|
4
|
-
"title": "标记",
|
|
5
|
-
"description": "标记组件。",
|
|
6
|
-
"props": [
|
|
7
|
-
{
|
|
8
|
-
"name": "type",
|
|
9
|
-
"type": "string",
|
|
10
|
-
"default": "default",
|
|
11
|
-
"required": false,
|
|
12
|
-
"description": "类型,可选值为`primary` `success` `danger` `warning`"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "size",
|
|
16
|
-
"type": "string",
|
|
17
|
-
"default": "-",
|
|
18
|
-
"required": false,
|
|
19
|
-
"description": "大小, 可选值为`large` `medium`"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "color",
|
|
23
|
-
"type": "string",
|
|
24
|
-
"default": "-",
|
|
25
|
-
"required": false,
|
|
26
|
-
"description": "标签颜色"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "plain",
|
|
30
|
-
"type": "boolean",
|
|
31
|
-
"default": "false",
|
|
32
|
-
"required": false,
|
|
33
|
-
"description": "是否为空心样式"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "round",
|
|
37
|
-
"type": "boolean",
|
|
38
|
-
"default": "false",
|
|
39
|
-
"required": false,
|
|
40
|
-
"description": "是否为圆角样式"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "mark",
|
|
44
|
-
"type": "boolean",
|
|
45
|
-
"default": "false",
|
|
46
|
-
"required": false,
|
|
47
|
-
"description": "是否为标记样式"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"name": "text-color",
|
|
51
|
-
"type": "string",
|
|
52
|
-
"default": "white",
|
|
53
|
-
"required": false,
|
|
54
|
-
"description": "文本颜色,优先级高于`color`属性"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"name": "closeable",
|
|
58
|
-
"type": "boolean",
|
|
59
|
-
"default": "false",
|
|
60
|
-
"required": false,
|
|
61
|
-
"description": "是否为可关闭标签"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"name": "basic-type",
|
|
65
|
-
"type": "string",
|
|
66
|
-
"default": "-",
|
|
67
|
-
"required": false,
|
|
68
|
-
"description": "基座风格的标签类型, 可选值为` person``type``news``status``number `"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "photo",
|
|
72
|
-
"type": "string",
|
|
73
|
-
"default": "-",
|
|
74
|
-
"required": false,
|
|
75
|
-
"description": "基座人员类型标签时,可用该属性设置头像"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "status",
|
|
79
|
-
"type": "string",
|
|
80
|
-
"default": "-",
|
|
81
|
-
"required": false,
|
|
82
|
-
"description": "基座状态类型标签时,可用该属性设置状态,可选值为` complete``loading``offline `"
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
"events": [
|
|
86
|
-
{
|
|
87
|
-
"name": "click",
|
|
88
|
-
"parameters": "点击时触发",
|
|
89
|
-
"description": "event: Event"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"name": "close",
|
|
93
|
-
"parameters": "关闭标签时触发",
|
|
94
|
-
"description": "-"
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
|
-
"slots": [
|
|
98
|
-
{
|
|
99
|
-
"name": "default",
|
|
100
|
-
"description": "标签显示内容"
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
"examples": {
|
|
104
|
-
"vue2": [
|
|
105
|
-
{
|
|
106
|
-
"title": "基础用法",
|
|
107
|
-
"code": "<em-tag type=\"primary\">标签</em-tag>\n<em-tag type=\"success\">标签</em-tag>\n<em-tag type=\"danger\">标签</em-tag>\n<em-tag type=\"warning\">标签</em-tag>"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"title": "基座风格: 人员、部门、职级等",
|
|
111
|
-
"code": "<em-tag basic-type=\"person\">科长</em-tag>\n<em-tag basic-type=\"person\" closeable @close=\"close()\">我的部门</em-tag>\n<em-tag basic-type=\"person\" photo=\"https://img01.yzcdn.cn/vant/cat.jpeg\">李科员</em-tag>"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"title": "基座风格: 属性标签",
|
|
115
|
-
"code": "<em-tag type=\"warning\" basic-type=\"type\">待审核</em-tag>\n<em-tag type=\"danger\" basic-type=\"type\">特急件</em-tag>\n<em-tag type=\"primary\" basic-type=\"type\">待分送</em-tag>"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
"title": "基座风格: 新闻标题标签",
|
|
119
|
-
"code": "<em-tag type=\"danger\" basic-type=\"news\">急</em-tag>\n<em-tag type=\"primary\" basic-type=\"news\">政策</em-tag>\n<em-tag type=\"danger\" basic-type=\"news\">热点</em-tag>"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
"title": "基座风格: 状态标签",
|
|
123
|
-
"code": "<em-tag basic-type=\"status\" status=\"complete\"></em-tag>\n<em-tag basic-type=\"status\" status=\"loading\"></em-tag>\n<em-tag basic-type=\"status\" status=\"offline\"></em-tag>"
|
|
124
|
-
}
|
|
125
|
-
],
|
|
126
|
-
"vue3": [
|
|
127
|
-
{
|
|
128
|
-
"title": "基础用法",
|
|
129
|
-
"code": "<em-tag type=\"primary\">标签</em-tag>\n<em-tag type=\"success\">标签</em-tag>\n<em-tag type=\"danger\">标签</em-tag>\n<em-tag type=\"warning\">标签</em-tag>"
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"title": "基座风格: 人员、部门、职级等",
|
|
133
|
-
"code": "<em-tag basic-type=\"person\">科长</em-tag>\n<em-tag basic-type=\"person\" closeable @close=\"close()\">我的部门</em-tag>\n<em-tag basic-type=\"person\" photo=\"https://img01.yzcdn.cn/vant/cat.jpeg\">李科员</em-tag>"
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"title": "基座风格: 属性标签",
|
|
137
|
-
"code": "<em-tag type=\"warning\" basic-type=\"type\">待审核</em-tag>\n<em-tag type=\"danger\" basic-type=\"type\">特急件</em-tag>\n<em-tag type=\"primary\" basic-type=\"type\">待分送</em-tag>"
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
"title": "基座风格: 新闻标题标签",
|
|
141
|
-
"code": "<em-tag type=\"danger\" basic-type=\"news\">急</em-tag>\n<em-tag type=\"primary\" basic-type=\"news\">政策</em-tag>\n<em-tag type=\"danger\" basic-type=\"news\">热点</em-tag>"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"title": "基座风格: 状态标签",
|
|
145
|
-
"code": "<em-tag basic-type=\"status\" status=\"complete\"></em-tag>\n<em-tag basic-type=\"status\" status=\"loading\"></em-tag>\n<em-tag basic-type=\"status\" status=\"offline\"></em-tag>"
|
|
146
|
-
}
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "toast",
|
|
3
|
-
"name": "em-toast",
|
|
4
|
-
"title": "轻提示",
|
|
5
|
-
"description": "在页面中间弹出黑色半透明提示,用于消息通知、加载提示、操作结果提示等场景。",
|
|
6
|
-
"props": [
|
|
7
|
-
{
|
|
8
|
-
"name": "custom-class",
|
|
9
|
-
"type": "string",
|
|
10
|
-
"default": "-",
|
|
11
|
-
"required": false,
|
|
12
|
-
"description": "自定义类名"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "custom-style",
|
|
16
|
-
"type": "string",
|
|
17
|
-
"default": "-",
|
|
18
|
-
"required": false,
|
|
19
|
-
"description": "自定义样式"
|
|
20
|
-
}
|
|
21
|
-
],
|
|
22
|
-
"events": [],
|
|
23
|
-
"slots": [],
|
|
24
|
-
"examples": {
|
|
25
|
-
"vue2": [
|
|
26
|
-
{
|
|
27
|
-
"title": "文字提示",
|
|
28
|
-
"code": "<em-toast ref=\"emToast\"></em-toast>"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"title": "加载提示",
|
|
32
|
-
"code": "<em-toast ref=\"emToast\"></em-toast>"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"title": "成功/失败提示",
|
|
36
|
-
"code": "<em-toast ref=\"emToast\"></em-toast>"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"title": "自定义图标",
|
|
40
|
-
"code": "<em-toast ref=\"emToast\"></em-toast>"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"title": "动态更新提示",
|
|
44
|
-
"code": "<em-toast ref=\"emToast\"></em-toast>"
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"vue3": [
|
|
48
|
-
{
|
|
49
|
-
"title": "文字提示",
|
|
50
|
-
"code": "<em-toast ref=\"emToast\"></em-toast>"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"title": "加载提示",
|
|
54
|
-
"code": "<em-toast ref=\"emToast\"></em-toast>"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"title": "成功/失败提示",
|
|
58
|
-
"code": "<em-toast ref=\"emToast\"></em-toast>"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"title": "自定义图标",
|
|
62
|
-
"code": "<em-toast ref=\"emToast\"></em-toast>"
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"title": "动态更新提示",
|
|
66
|
-
"code": "<em-toast ref=\"emToast\"></em-toast>"
|
|
67
|
-
}
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "treeselect",
|
|
3
|
-
"name": "em-treeselect",
|
|
4
|
-
"title": "分类选择",
|
|
5
|
-
"description": "分类选择组件。",
|
|
6
|
-
"props": [
|
|
7
|
-
{
|
|
8
|
-
"name": "items",
|
|
9
|
-
"type": "Item[]",
|
|
10
|
-
"default": "[]",
|
|
11
|
-
"required": false,
|
|
12
|
-
"description": "分类显示所需的数据"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "height",
|
|
16
|
-
"type": "number / string",
|
|
17
|
-
"default": "300",
|
|
18
|
-
"required": false,
|
|
19
|
-
"description": "高度,默认单位为`px`"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "main-active-index",
|
|
23
|
-
"type": "number / string",
|
|
24
|
-
"default": "0",
|
|
25
|
-
"required": false,
|
|
26
|
-
"description": "左侧选中项的索引"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "active-id",
|
|
30
|
-
"type": "number / string /(number / string)[]",
|
|
31
|
-
"default": "0",
|
|
32
|
-
"required": false,
|
|
33
|
-
"description": "右侧选中项的 `id`,支持传入数组"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "max",
|
|
37
|
-
"type": "number / string",
|
|
38
|
-
"default": "Infinity",
|
|
39
|
-
"required": false,
|
|
40
|
-
"description": "右侧项最大选中个数"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "selected-icon",
|
|
44
|
-
"type": "string",
|
|
45
|
-
"default": "success",
|
|
46
|
-
"required": false,
|
|
47
|
-
"description": "自定义右侧栏选中状态的图标"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"events": [
|
|
51
|
-
{
|
|
52
|
-
"name": "click-nav",
|
|
53
|
-
"parameters": "点击左侧导航时触发",
|
|
54
|
-
"description": "index:被点击的导航的索引"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"name": "click-item",
|
|
58
|
-
"parameters": "点击右侧选择项时触发",
|
|
59
|
-
"description": "data: 该点击项的数据"
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
"slots": [
|
|
63
|
-
{
|
|
64
|
-
"name": "content",
|
|
65
|
-
"description": "自定义右侧区域内容"
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
"examples": {
|
|
69
|
-
"vue2": [
|
|
70
|
-
{
|
|
71
|
-
"title": "单选模式",
|
|
72
|
-
"code": "<em-tree-select\n :items=\"items\"\n :active-id.sync=\"activeId\"\n :main-active-index.sync=\"activeIndex\"\n @click-nav=\"onNavClick\"\n @click-item=\"onItemClick\"\n></em-tree-select>\n<em-toast ref=\"emToast\"></em-toast>"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"title": "多选模式",
|
|
76
|
-
"code": "<em-tree-select\n :items=\"items\"\n :active-id.sync=\"activeIds\"\n :main-active-index.sync=\"activeIndex1\"\n @click-nav=\"onNavClick\"\n @click-item=\"onItemClick\"\n></em-tree-select>\n<em-toast ref=\"emToast\"></em-toast>"
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
"title": "自定义内容",
|
|
80
|
-
"code": "<em-tree-select :items=\"items1\" :main-active-index.sync=\"activeIndex2\" @click-nav=\"onNavClick\">\n <template #content>\n <em-image v-if=\"activeIndex2 === 0\" :width=\"240\" :height=\"190\" src=\"https://img.yzcdn.cn/vant/apple-1.jpg\" />\n <em-image :width=\"240\" :height=\"190\" v-if=\"activeIndex2 === 1\" src=\"https://img.yzcdn.cn/vant/apple-2.jpg\" />\n </template>\n</em-tree-select>\n<em-toast ref=\"emToast\"></em-toast>"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"title": "徽标提示",
|
|
84
|
-
"code": "<em-tree-select :items=\"items2\" :main-active-index.sync=\"activeIndex3\"></em-tree-select>"
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
"vue3": [
|
|
88
|
-
{
|
|
89
|
-
"title": "单选模式",
|
|
90
|
-
"code": "<em-tree-select\n :items=\"items\"\n :active-id.sync=\"activeId\"\n :main-active-index.sync=\"activeIndex\"\n @click-nav=\"onNavClick\"\n @click-item=\"onItemClick\"\n></em-tree-select>\n<em-toast ref=\"emToast\"></em-toast>"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"title": "多选模式",
|
|
94
|
-
"code": "<em-tree-select\n :items=\"items\"\n :active-id.sync=\"activeIds\"\n :main-active-index.sync=\"activeIndex1\"\n @click-nav=\"onNavClick\"\n @click-item=\"onItemClick\"\n></em-tree-select>\n<em-toast ref=\"emToast\"></em-toast>"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
"title": "自定义内容",
|
|
98
|
-
"code": "<em-tree-select :items=\"items1\" :main-active-index.sync=\"activeIndex2\" @click-nav=\"onNavClick\">\n <template #content>\n <em-image v-if=\"activeIndex2 === 0\" :width=\"240\" :height=\"190\" src=\"https://img.yzcdn.cn/vant/apple-1.jpg\" />\n <em-image :width=\"240\" :height=\"190\" v-if=\"activeIndex2 === 1\" src=\"https://img.yzcdn.cn/vant/apple-2.jpg\" />\n </template>\n</em-tree-select>\n<em-toast ref=\"emToast\"></em-toast>"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"title": "徽标提示",
|
|
102
|
-
"code": "<em-tree-select :items=\"items2\" :main-active-index.sync=\"activeIndex3\"></em-tree-select>"
|
|
103
|
-
}
|
|
104
|
-
]
|
|
105
|
-
}
|
|
106
|
-
}
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "uploader",
|
|
3
|
-
"name": "em-uploader",
|
|
4
|
-
"title": "文件上传",
|
|
5
|
-
"description": "文件上传组件。",
|
|
6
|
-
"props": [
|
|
7
|
-
{
|
|
8
|
-
"name": "v-model",
|
|
9
|
-
"type": "FileListItem[]",
|
|
10
|
-
"default": "-",
|
|
11
|
-
"required": false,
|
|
12
|
-
"description": "已上传的文件列表"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"name": "useEjsUpload",
|
|
16
|
-
"type": "boolean",
|
|
17
|
-
"default": "false",
|
|
18
|
-
"required": false,
|
|
19
|
-
"description": "ejs 环境下是否使用 ejs 方法进行选择文件、图片、视频, 注意,由于`ejs api`返回的是个本地路径,若该参数开启则无法正常展示预览图,建议上传后,使用接口返回的图片路径进行展示。"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"name": "accept",
|
|
23
|
-
"type": "string",
|
|
24
|
-
"default": "image/*",
|
|
25
|
-
"required": false,
|
|
26
|
-
"description": "允许上传的文件类型,例如,选择所有图片和视频:`image/*,video/*`,(详细说明)[https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/Input/file#%E9%99%90%E5%88%B6%E5%85%81%E8%AE%B8%E7%9A%84%E6%96%87%E4%BB%B6%E7%B1%BB%E5%9E%8B]"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "accept-extensions",
|
|
30
|
-
"type": "array",
|
|
31
|
-
"default": "-",
|
|
32
|
-
"required": false,
|
|
33
|
-
"description": "允许上传的文件后缀名,例如,`['jpg', 'png']`, 不区分大小写"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"name": "listType",
|
|
37
|
-
"type": "string",
|
|
38
|
-
"default": "default",
|
|
39
|
-
"required": false,
|
|
40
|
-
"description": "列表样式类型:`default`、`card`、`vertical`"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "title",
|
|
44
|
-
"type": "string",
|
|
45
|
-
"default": "-",
|
|
46
|
-
"required": false,
|
|
47
|
-
"description": "附件上传标题"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"name": "tip",
|
|
51
|
-
"type": "string",
|
|
52
|
-
"default": "-",
|
|
53
|
-
"required": false,
|
|
54
|
-
"description": "附件上传提示"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"name": "required",
|
|
58
|
-
"type": "boolean",
|
|
59
|
-
"default": "false",
|
|
60
|
-
"required": false,
|
|
61
|
-
"description": "附件上传必填样式,`title`不为空时生效"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"name": "name",
|
|
65
|
-
"type": "number / string",
|
|
66
|
-
"default": "-",
|
|
67
|
-
"required": false,
|
|
68
|
-
"description": "标识符,可以在回调函数的第二项参数中获取"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"name": "preview-size",
|
|
72
|
-
"type": "number / string",
|
|
73
|
-
"default": "80px",
|
|
74
|
-
"required": false,
|
|
75
|
-
"description": "预览图和上传区域的尺寸,默认单位为 px"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"name": "preview-image",
|
|
79
|
-
"type": "boolean",
|
|
80
|
-
"default": "true",
|
|
81
|
-
"required": false,
|
|
82
|
-
"description": "是否在上传完成后展示预览图"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "preview-full-image",
|
|
86
|
-
"type": "boolean",
|
|
87
|
-
"default": "true",
|
|
88
|
-
"required": false,
|
|
89
|
-
"description": "是否在点击预览图后展示全屏图片预览"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"name": "preview-options",
|
|
93
|
-
"type": "object",
|
|
94
|
-
"default": "-",
|
|
95
|
-
"required": false,
|
|
96
|
-
"description": "全屏图片预览的配置项,可选值见 `ImagePreview` 组件"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"name": "multiple",
|
|
100
|
-
"type": "boolean",
|
|
101
|
-
"default": "false",
|
|
102
|
-
"required": false,
|
|
103
|
-
"description": "是否开启图片多选,部分安卓机型不支持"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"name": "disabled",
|
|
107
|
-
"type": "boolean",
|
|
108
|
-
"default": "false",
|
|
109
|
-
"required": false,
|
|
110
|
-
"description": "是否禁用文件上传"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"name": "deletable",
|
|
114
|
-
"type": "boolean",
|
|
115
|
-
"default": "true",
|
|
116
|
-
"required": false,
|
|
117
|
-
"description": "是否展示删除按钮"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"name": "show-upload",
|
|
121
|
-
"type": "boolean",
|
|
122
|
-
"default": "true",
|
|
123
|
-
"required": false,
|
|
124
|
-
"description": "是否展示上传区域"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
"name": "lazy-load",
|
|
128
|
-
"type": "boolean",
|
|
129
|
-
"default": "false",
|
|
130
|
-
"required": false,
|
|
131
|
-
"description": "是否开启图片懒加载,"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"name": "capture",
|
|
135
|
-
"type": "array",
|
|
136
|
-
"default": "['camera', 'album']",
|
|
137
|
-
"required": false,
|
|
138
|
-
"description": "图片选取模式,可选值为 `camera` `album` (直接调起摄像头)"
|
|
139
|
-
},
|
|
140
|
-
{
|
|
141
|
-
"name": "after-read",
|
|
142
|
-
"type": "Function",
|
|
143
|
-
"default": "-",
|
|
144
|
-
"required": false,
|
|
145
|
-
"description": "文件读取完成后的回调函数"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"name": "before-read",
|
|
149
|
-
"type": "Function",
|
|
150
|
-
"default": "-",
|
|
151
|
-
"required": false,
|
|
152
|
-
"description": "文件读取前的回调函数,返回 `false` 可终止文件读取,支持返回`Promise`"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"name": "before-delete",
|
|
156
|
-
"type": "Function",
|
|
157
|
-
"default": "-",
|
|
158
|
-
"required": false,
|
|
159
|
-
"description": "文件删除前的回调函数,返回 `false` 可终止文件读取,支持返回`Promise`"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"name": "max-size",
|
|
163
|
-
"type": "number / string",
|
|
164
|
-
"default": "-",
|
|
165
|
-
"required": false,
|
|
166
|
-
"description": "文件大小限制,单位为 `byte`"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"name": "max-count",
|
|
170
|
-
"type": "number / string",
|
|
171
|
-
"default": "-",
|
|
172
|
-
"required": false,
|
|
173
|
-
"description": "文件上传数量限制"
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"name": "result-type",
|
|
177
|
-
"type": "string",
|
|
178
|
-
"default": "file",
|
|
179
|
-
"required": false,
|
|
180
|
-
"description": "文件读取结果类型,可选值为 `dataUrl` `text`,注意,当开启`useEjsUpload`参数时,ejs 环境下该参数设置无效,文件只能读取到一个本地路径"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"name": "upload-text",
|
|
184
|
-
"type": "**string**",
|
|
185
|
-
"default": "-",
|
|
186
|
-
"required": false,
|
|
187
|
-
"description": "上传区域文字提示"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"name": "image-fit",
|
|
191
|
-
"type": "string",
|
|
192
|
-
"default": "cover",
|
|
193
|
-
"required": false,
|
|
194
|
-
"description": "预览图裁剪模式,可选值见 `Image` 组件"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"name": "upload-icon",
|
|
198
|
-
"type": "string",
|
|
199
|
-
"default": "photograph",
|
|
200
|
-
"required": false,
|
|
201
|
-
"description": "上传区域图标名称或图片链接"
|
|
202
|
-
}
|
|
203
|
-
],
|
|
204
|
-
"events": [
|
|
205
|
-
{
|
|
206
|
-
"name": "oversize",
|
|
207
|
-
"parameters": "文件大小超过限制时触发",
|
|
208
|
-
"description": "同`after-read`"
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
"name": "click-preview",
|
|
212
|
-
"parameters": "点击预览图时触发",
|
|
213
|
-
"description": "同`after-read`"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"name": "close-preview",
|
|
217
|
-
"parameters": "关闭预览图时触发",
|
|
218
|
-
"description": "同`after-read`"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"name": "delete",
|
|
222
|
-
"parameters": "删除文件预览时触发",
|
|
223
|
-
"description": "同`after-read`"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"name": "errextension-beta.1",
|
|
227
|
-
"parameters": "上传文件后缀名校验未通过时触发",
|
|
228
|
-
"description": "`file`: object,上传的文件, `acceptExtensions`: array,允许的后缀名列表"
|
|
229
|
-
}
|
|
230
|
-
],
|
|
231
|
-
"slots": [
|
|
232
|
-
{
|
|
233
|
-
"name": "default",
|
|
234
|
-
"description": "自定义上传区域"
|
|
235
|
-
}
|
|
236
|
-
],
|
|
237
|
-
"examples": {
|
|
238
|
-
"vue2": [
|
|
239
|
-
{
|
|
240
|
-
"title": "基础用法",
|
|
241
|
-
"code": "<em-uploader :after-read=\"afterRead\" />"
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
"title": "文件预览",
|
|
245
|
-
"code": "<em-uploader v-model=\"fileList\" multiple />"
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
"title": "上传状态",
|
|
249
|
-
"code": "<em-uploader v-model=\"fileList\" :after-read=\"afterRead\" />"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"title": "限制上传数量",
|
|
253
|
-
"code": "<em-uploader v-model=\"fileList\" multiple :max-count=\"2\" />"
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
"title": "限制上传大小",
|
|
257
|
-
"code": "<em-uploader multiple :max-size=\"14 * 1024\" @oversize=\"onOversize\" />"
|
|
258
|
-
}
|
|
259
|
-
],
|
|
260
|
-
"vue3": [
|
|
261
|
-
{
|
|
262
|
-
"title": "基础用法",
|
|
263
|
-
"code": "<em-uploader :after-read=\"afterRead\" />"
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
"title": "文件预览",
|
|
267
|
-
"code": "<em-uploader v-model=\"fileList\" multiple />"
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
"title": "上传状态",
|
|
271
|
-
"code": "<em-uploader v-model=\"fileList\" :after-read=\"afterRead\" />"
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
"title": "限制上传数量",
|
|
275
|
-
"code": "<em-uploader v-model=\"fileList\" multiple :max-count=\"2\" />"
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
"title": "限制上传大小",
|
|
279
|
-
"code": "<em-uploader multiple :max-size=\"14 * 1024\" @oversize=\"onOversize\" />"
|
|
280
|
-
}
|
|
281
|
-
]
|
|
282
|
-
}
|
|
283
|
-
}
|