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.
Files changed (151) hide show
  1. package/dist/cli.d.ts +2 -2
  2. package/dist/cli.js +1 -13
  3. package/dist/docs/apis.d.ts +2 -2
  4. package/dist/docs/apis.js +9 -326
  5. package/dist/docs/components.d.ts +2 -2
  6. package/dist/docs/components.js +2 -186
  7. package/dist/docs/index.d.ts +2 -2
  8. package/dist/docs/index.js +18 -177
  9. package/dist/docs/loader.d.ts +2 -2
  10. package/dist/docs/loader.js +1 -165
  11. package/dist/docs/search.d.ts +2 -2
  12. package/dist/docs/search.js +2 -196
  13. package/dist/docs/standards.d.ts +2 -2
  14. package/dist/docs/standards.js +3 -134
  15. package/dist/docs/utils.d.ts +2 -2
  16. package/dist/docs/utils.js +3 -129
  17. package/dist/generator/header.d.ts +2 -2
  18. package/dist/generator/header.js +3 -83
  19. package/dist/generator/index.d.ts +2 -2
  20. package/dist/generator/index.js +283 -648
  21. package/dist/generator/vue-template.d.ts +2 -2
  22. package/dist/generator/vue-template.js +336 -1016
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.js +1 -73
  25. package/dist/recommend/index.d.ts +2 -2
  26. package/dist/recommend/index.js +2 -412
  27. package/dist/tools/generate-code.d.ts +2 -2
  28. package/dist/tools/generate-code.js +39 -211
  29. package/dist/tools/get-api-info.d.ts +2 -2
  30. package/dist/tools/get-api-info.js +1 -65
  31. package/dist/tools/get-coding-standard.d.ts +2 -2
  32. package/dist/tools/get-coding-standard.js +1 -66
  33. package/dist/tools/get-component-info.d.ts +2 -2
  34. package/dist/tools/get-component-info.js +1 -60
  35. package/dist/tools/get-util-info.d.ts +2 -2
  36. package/dist/tools/get-util-info.js +1 -65
  37. package/dist/tools/index.d.ts +2 -2
  38. package/dist/tools/index.js +3 -101
  39. package/dist/tools/recommend-solution.d.ts +2 -2
  40. package/dist/tools/recommend-solution.js +1 -67
  41. package/dist/tools/search-docs.d.ts +2 -2
  42. package/dist/tools/search-docs.js +1 -71
  43. package/dist/types/index.d.ts +2 -2
  44. package/dist/types/index.js +0 -8
  45. package/package.json +6 -5
  46. package/dist/cli.js.map +0 -1
  47. package/dist/docs/apis.js.map +0 -1
  48. package/dist/docs/components.js.map +0 -1
  49. package/dist/docs/index.js.map +0 -1
  50. package/dist/docs/loader.js.map +0 -1
  51. package/dist/docs/search.js.map +0 -1
  52. package/dist/docs/standards.js.map +0 -1
  53. package/dist/docs/utils.js.map +0 -1
  54. package/dist/generator/header.js.map +0 -1
  55. package/dist/generator/index.js.map +0 -1
  56. package/dist/generator/vue-template.js.map +0 -1
  57. package/dist/index.js.map +0 -1
  58. package/dist/recommend/index.js.map +0 -1
  59. package/dist/tools/generate-code.js.map +0 -1
  60. package/dist/tools/get-api-info.js.map +0 -1
  61. package/dist/tools/get-coding-standard.js.map +0 -1
  62. package/dist/tools/get-component-info.js.map +0 -1
  63. package/dist/tools/get-util-info.js.map +0 -1
  64. package/dist/tools/index.js.map +0 -1
  65. package/dist/tools/recommend-solution.js.map +0 -1
  66. package/dist/tools/search-docs.js.map +0 -1
  67. package/dist/types/index.js.map +0 -1
  68. package/resources/cases/.gitkeep +0 -0
  69. package/resources/cases/form-submit-vue2.json +0 -15
  70. package/resources/cases/index.json +0 -8
  71. package/resources/cases/list-detail-vue2.json +0 -27
  72. package/resources/components/.gitkeep +0 -0
  73. package/resources/components/actionsheet.json +0 -199
  74. package/resources/components/amap.json +0 -66
  75. package/resources/components/area.json +0 -158
  76. package/resources/components/badge.json +0 -93
  77. package/resources/components/button.json +0 -260
  78. package/resources/components/calendar.json +0 -225
  79. package/resources/components/cascader.json +0 -115
  80. package/resources/components/cell.json +0 -85
  81. package/resources/components/chart.json +0 -55
  82. package/resources/components/checkbox.json +0 -158
  83. package/resources/components/circle.json +0 -138
  84. package/resources/components/collapse.json +0 -88
  85. package/resources/components/countdown.json +0 -105
  86. package/resources/components/datepicker.json +0 -216
  87. package/resources/components/dialog.json +0 -250
  88. package/resources/components/divider.json +0 -82
  89. package/resources/components/dragsort.json +0 -67
  90. package/resources/components/dropdownmenu.json +0 -129
  91. package/resources/components/easycalendar.json +0 -84
  92. package/resources/components/empty.json +0 -90
  93. package/resources/components/field.json +0 -423
  94. package/resources/components/form.json +0 -156
  95. package/resources/components/grid.json +0 -131
  96. package/resources/components/header.json +0 -147
  97. package/resources/components/icon.json +0 -104
  98. package/resources/components/image.json +0 -169
  99. package/resources/components/imagepreview.json +0 -150
  100. package/resources/components/imagescale.json +0 -245
  101. package/resources/components/index.json +0 -72
  102. package/resources/components/indexbar.json +0 -83
  103. package/resources/components/layout.json +0 -74
  104. package/resources/components/lazyload.json +0 -46
  105. package/resources/components/loading.json +0 -103
  106. package/resources/components/minirefresh.json +0 -341
  107. package/resources/components/noticebar.json +0 -148
  108. package/resources/components/notify.json +0 -60
  109. package/resources/components/numberkeyboard.json +0 -216
  110. package/resources/components/overlay.json +0 -78
  111. package/resources/components/pagination.json +0 -137
  112. package/resources/components/panel.json +0 -87
  113. package/resources/components/passwordinput.json +0 -103
  114. package/resources/components/picker.json +0 -195
  115. package/resources/components/popover.json +0 -161
  116. package/resources/components/popup.json +0 -229
  117. package/resources/components/progress.json +0 -111
  118. package/resources/components/qrcode.json +0 -128
  119. package/resources/components/radio.json +0 -139
  120. package/resources/components/rate.json +0 -157
  121. package/resources/components/rtc.json +0 -35
  122. package/resources/components/search.json +0 -234
  123. package/resources/components/selectperson.json +0 -175
  124. package/resources/components/sidebar.json +0 -74
  125. package/resources/components/skeleton.json +0 -110
  126. package/resources/components/slider.json +0 -159
  127. package/resources/components/stepper.json +0 -241
  128. package/resources/components/steps.json +0 -108
  129. package/resources/components/sticky.json +0 -72
  130. package/resources/components/swipe.json +0 -146
  131. package/resources/components/swipecell.json +0 -118
  132. package/resources/components/switch.json +0 -123
  133. package/resources/components/switchcell.json +0 -123
  134. package/resources/components/tab.json +0 -257
  135. package/resources/components/tabbar.json +0 -137
  136. package/resources/components/table.json +0 -149
  137. package/resources/components/tag.json +0 -149
  138. package/resources/components/toast.json +0 -70
  139. package/resources/components/treeselect.json +0 -106
  140. package/resources/components/uploader.json +0 -283
  141. package/resources/components/verifycode.json +0 -94
  142. package/resources/standards/.gitkeep +0 -0
  143. package/resources/standards/css.json +0 -108
  144. package/resources/standards/javascript.json +0 -129
  145. package/resources/standards/project-structure.json +0 -101
  146. package/resources/standards/vue.json +0 -122
  147. package/resources/utils/.gitkeep +0 -0
  148. package/resources/utils/ajax.json +0 -76
  149. package/resources/utils/common.json +0 -129
  150. package/resources/utils/index.json +0 -7
  151. package/resources/utils/string.json +0 -112
@@ -1,103 +0,0 @@
1
- {
2
- "id": "passwordinput",
3
- "name": "em-passwordinput",
4
- "title": "密码输入框",
5
- "description": "带网格的输入框组件,可以用于输入支付密码、短信验证码等,通常与数字键盘组件配合使用。",
6
- "props": [
7
- {
8
- "name": "value",
9
- "type": "string",
10
- "default": "''",
11
- "required": false,
12
- "description": "密码值"
13
- },
14
- {
15
- "name": "info",
16
- "type": "string",
17
- "default": "-",
18
- "required": false,
19
- "description": "输入框下方文字提示"
20
- },
21
- {
22
- "name": "error-info",
23
- "type": "string",
24
- "default": "-",
25
- "required": false,
26
- "description": "输入框下方错误提示"
27
- },
28
- {
29
- "name": "length",
30
- "type": "number / string",
31
- "default": "6",
32
- "required": false,
33
- "description": "密码最大长度"
34
- },
35
- {
36
- "name": "gutter",
37
- "type": "number / string",
38
- "default": "0",
39
- "required": false,
40
- "description": "输入框格子之间的间距,如 `20px` `2em`,默认单位为`px`"
41
- },
42
- {
43
- "name": "mask",
44
- "type": "boolean",
45
- "default": "true",
46
- "required": false,
47
- "description": "是否隐藏密码内容"
48
- },
49
- {
50
- "name": "focused",
51
- "type": "boolean",
52
- "default": "false",
53
- "required": false,
54
- "description": "是否已聚焦,聚焦时会显示光标"
55
- }
56
- ],
57
- "events": [
58
- {
59
- "name": "focus",
60
- "parameters": "输入框聚焦时触发",
61
- "description": "-"
62
- }
63
- ],
64
- "slots": [],
65
- "examples": {
66
- "vue2": [
67
- {
68
- "title": "基础用法",
69
- "code": "<em-password-input :value=\"value1\" info=\"密码为 6 位数字\" :focused=\"showKeyboard1\" @focus=\"showKeyboard1 = true\" />\n<em-number-keyboard :show=\"showKeyboard1\" @inputkey=\"onInput1\" @delete=\"onDelete1\" @blur=\"showKeyboard1 = false\" />"
70
- },
71
- {
72
- "title": "自定义长度",
73
- "code": "<em-password-input :value=\"value2\" :length=\"4\" :gutter=\"15\" :focused=\"showKeyboard2\" @focus=\"showKeyboard2 = true\" />"
74
- },
75
- {
76
- "title": "明文展示",
77
- "code": "<em-password-input :value=\"value3\" :mask=\"false\" :focused=\"showKeyboard3\" @focus=\"showKeyboard3 = true\" />"
78
- },
79
- {
80
- "title": "错误提示",
81
- "code": "<em-password-input :value=\"value4\" :error-info=\"errorInfo\" :focused=\"showKeyboard4\" @focus=\"showKeyboard4 = true\" />\n<em-number-keyboard :show=\"showKeyboard4\" @inputkey=\"onInput4\" @delete=\"onDelete4\" @blur=\"showKeyboard4 = false\" />"
82
- }
83
- ],
84
- "vue3": [
85
- {
86
- "title": "基础用法",
87
- "code": "<em-password-input :value=\"value1\" info=\"密码为 6 位数字\" :focused=\"showKeyboard1\" @focus=\"showKeyboard1 = true\" />\n<em-number-keyboard :show=\"showKeyboard1\" @inputkey=\"onInput1\" @delete=\"onDelete1\" @blur=\"showKeyboard1 = false\" />"
88
- },
89
- {
90
- "title": "自定义长度",
91
- "code": "<em-password-input :value=\"value2\" :length=\"4\" :gutter=\"15\" :focused=\"showKeyboard2\" @focus=\"showKeyboard2 = true\" />"
92
- },
93
- {
94
- "title": "明文展示",
95
- "code": "<em-password-input :value=\"value3\" :mask=\"false\" :focused=\"showKeyboard3\" @focus=\"showKeyboard3 = true\" />"
96
- },
97
- {
98
- "title": "错误提示",
99
- "code": "<em-password-input :value=\"value4\" :error-info=\"errorInfo\" :focused=\"showKeyboard4\" @focus=\"showKeyboard4 = true\" />\n<em-number-keyboard :show=\"showKeyboard4\" @inputkey=\"onInput4\" @delete=\"onDelete4\" @blur=\"showKeyboard4 = false\" />"
100
- }
101
- ]
102
- }
103
- }
@@ -1,195 +0,0 @@
1
- {
2
- "id": "picker",
3
- "name": "em-picker",
4
- "title": "选择器",
5
- "description": "提供多个选项集合供用户选择,支持单列选择和多列级联。",
6
- "props": [
7
- {
8
- "name": "v-model",
9
- "type": "boolean",
10
- "default": "false",
11
- "required": false,
12
- "description": "选择器的显隐"
13
- },
14
- {
15
- "name": "columns",
16
- "type": "Column[]",
17
- "default": "[]",
18
- "required": false,
19
- "description": "对象数组,配置每一列显示的数据"
20
- },
21
- {
22
- "name": "title",
23
- "type": "string",
24
- "default": "-",
25
- "required": false,
26
- "description": "顶部栏标题"
27
- },
28
- {
29
- "name": "confirm-button-text",
30
- "type": "string",
31
- "default": "确认",
32
- "required": false,
33
- "description": "确认按钮文字"
34
- },
35
- {
36
- "name": "cancel-button-text",
37
- "type": "string",
38
- "default": "取消",
39
- "required": false,
40
- "description": "取消按钮文字"
41
- },
42
- {
43
- "name": "value-key",
44
- "type": "string",
45
- "default": "text",
46
- "required": false,
47
- "description": "选项对象中,选项文字对应的键名"
48
- },
49
- {
50
- "name": "toolbar-position",
51
- "type": "string",
52
- "default": "top",
53
- "required": false,
54
- "description": "顶部栏位置,可选值为`bottom`"
55
- },
56
- {
57
- "name": "loading",
58
- "type": "boolean",
59
- "default": "false",
60
- "required": false,
61
- "description": "是否显示加载状态"
62
- },
63
- {
64
- "name": "readonly",
65
- "type": "boolean",
66
- "default": "false",
67
- "required": false,
68
- "description": "是否为只读状态,只读状态下无法切换选项"
69
- },
70
- {
71
- "name": "show-toolbar",
72
- "type": "boolean",
73
- "default": "false",
74
- "required": false,
75
- "description": "是否显示顶部栏"
76
- },
77
- {
78
- "name": "default-index",
79
- "type": "number / string",
80
- "default": "0",
81
- "required": false,
82
- "description": "单列选择时,默认选中项的索引"
83
- },
84
- {
85
- "name": "item-height",
86
- "type": "number / string",
87
- "default": "44",
88
- "required": false,
89
- "description": "选项高度,支持 `px` `vw` `rem` 单位,默认 `px`"
90
- },
91
- {
92
- "name": "visible-item-count",
93
- "type": "number / string",
94
- "default": "6",
95
- "required": false,
96
- "description": "可见的选项个数"
97
- },
98
- {
99
- "name": "swipe-duration",
100
- "type": "number / string",
101
- "default": "300",
102
- "required": false,
103
- "description": "快速滑动时惯性滚动的时长,单位 `ms`, 该值必须大于`0`"
104
- }
105
- ],
106
- "events": [
107
- {
108
- "name": "confirm",
109
- "parameters": "点击完成按钮时触发",
110
- "description": "单列:选中值,选中值对应的索引,多列:所有列选中值,所有列选中值对应的索引"
111
- },
112
- {
113
- "name": "cancel",
114
- "parameters": "点击取消按钮时触发",
115
- "description": "单列:选中值,选中值对应的索引,多列:所有列选中值,所有列选中值对应的索引"
116
- },
117
- {
118
- "name": "change",
119
- "parameters": "选项改变时触发",
120
- "description": "单列:选中值,选中值对应的索引,多列:所有列选中值,当前列对应的索引"
121
- }
122
- ],
123
- "slots": [
124
- {
125
- "name": "default",
126
- "description": "自定义顶部栏内容"
127
- },
128
- {
129
- "name": "title",
130
- "description": "自定义标题内容"
131
- },
132
- {
133
- "name": "confirm",
134
- "description": "自定义确认按钮内容"
135
- },
136
- {
137
- "name": "cancel",
138
- "description": "自定义取消按钮内容"
139
- },
140
- {
141
- "name": "columnsTop",
142
- "description": "自定义选项上方内容"
143
- },
144
- {
145
- "name": "columnsBottom",
146
- "description": "自定义选项下方内容"
147
- }
148
- ],
149
- "examples": {
150
- "vue2": [
151
- {
152
- "title": "基础用法",
153
- "code": "<em-picker\n v-model=\"showPicker\"\n title=\"标题\"\n show-toolbar\n :columns=\"columns\"\n @confirm=\"onConfirm\"\n @cancel=\"onCancel\"\n @change=\"onChange\"\n/>\n<em-toast ref=\"emToast\"></em-toast>"
154
- },
155
- {
156
- "title": "默认选中项",
157
- "code": "<em-picker show-toolbar title=\"标题\" :columns=\"columns\" :default-index=\"2\" />"
158
- },
159
- {
160
- "title": "多列选择",
161
- "code": "<em-picker show-toolbar title=\"标题\" :columns=\"column7\" />"
162
- },
163
- {
164
- "title": "级联选择",
165
- "code": "<em-picker show-toolbar title=\"标题\" :columns=\"column8\" />"
166
- },
167
- {
168
- "title": "禁用选项",
169
- "code": "<em-picker show-toolbar :columns=\"column2\" />"
170
- }
171
- ],
172
- "vue3": [
173
- {
174
- "title": "基础用法",
175
- "code": "<em-picker\n v-model=\"showPicker\"\n title=\"标题\"\n show-toolbar\n :columns=\"columns\"\n @confirm=\"onConfirm\"\n @cancel=\"onCancel\"\n @change=\"onChange\"\n/>\n<em-toast ref=\"emToast\"></em-toast>"
176
- },
177
- {
178
- "title": "默认选中项",
179
- "code": "<em-picker show-toolbar title=\"标题\" :columns=\"columns\" :default-index=\"2\" />"
180
- },
181
- {
182
- "title": "多列选择",
183
- "code": "<em-picker show-toolbar title=\"标题\" :columns=\"column7\" />"
184
- },
185
- {
186
- "title": "级联选择",
187
- "code": "<em-picker show-toolbar title=\"标题\" :columns=\"column8\" />"
188
- },
189
- {
190
- "title": "禁用选项",
191
- "code": "<em-picker show-toolbar :columns=\"column2\" />"
192
- }
193
- ]
194
- }
195
- }
@@ -1,161 +0,0 @@
1
- {
2
- "id": "popover",
3
- "name": "em-popover",
4
- "title": "气泡弹出框",
5
- "description": "弹出式的气泡菜单, M8 框架`8.2.10`版本以上支持。",
6
- "props": [
7
- {
8
- "name": "v-model",
9
- "type": "boolean",
10
- "default": "false",
11
- "required": false,
12
- "description": "是否展示气泡弹出层"
13
- },
14
- {
15
- "name": "actions",
16
- "type": "Action[]",
17
- "default": "[]",
18
- "required": false,
19
- "description": "选项列表"
20
- },
21
- {
22
- "name": "placement",
23
- "type": "string",
24
- "default": "bottom",
25
- "required": false,
26
- "description": "弹出位置"
27
- },
28
- {
29
- "name": "theme",
30
- "type": "string",
31
- "default": "light",
32
- "required": false,
33
- "description": "主题风格,可选值为 `dark`"
34
- },
35
- {
36
- "name": "offset",
37
- "type": "[number, number]",
38
- "default": "[0, 8]",
39
- "required": false,
40
- "description": "出现位置的偏移量"
41
- },
42
- {
43
- "name": "overlay",
44
- "type": "boolean",
45
- "default": "false",
46
- "required": false,
47
- "description": "是否显示遮罩层"
48
- },
49
- {
50
- "name": "close-on-click-action",
51
- "type": "boolean",
52
- "default": "true",
53
- "required": false,
54
- "description": "是否在点击选项后关闭"
55
- },
56
- {
57
- "name": "close-on-click-outside",
58
- "type": "boolean",
59
- "default": "true",
60
- "required": false,
61
- "description": "是否在点击外部元素后关闭菜单"
62
- },
63
- {
64
- "name": "close-on-touchmove-outside 8.3.19-beta.0",
65
- "type": "boolean",
66
- "default": "false",
67
- "required": false,
68
- "description": "是否在滑动外部元素后关闭菜单"
69
- },
70
- {
71
- "name": "trigger 8.3.19-beta.0",
72
- "type": "boolean",
73
- "default": "click",
74
- "required": false,
75
- "description": "触发方式,可选值为`click`、`longpress`、`manual(手动)`"
76
- }
77
- ],
78
- "events": [
79
- {
80
- "name": "select",
81
- "parameters": "点击选项时触发",
82
- "description": "action: Action, index: number"
83
- },
84
- {
85
- "name": "open",
86
- "parameters": "打开菜单时触发",
87
- "description": "-"
88
- },
89
- {
90
- "name": "close",
91
- "parameters": "关闭菜单时触发",
92
- "description": "-"
93
- },
94
- {
95
- "name": "opened",
96
- "parameters": "打开菜单且动画结束后触发",
97
- "description": "-"
98
- },
99
- {
100
- "name": "closed",
101
- "parameters": "关闭菜单且动画结束后触发",
102
- "description": "-"
103
- }
104
- ],
105
- "slots": [
106
- {
107
- "name": "default",
108
- "description": "自定义菜单内容"
109
- },
110
- {
111
- "name": "reference",
112
- "description": "触发 Popover 显示的元素内容"
113
- }
114
- ],
115
- "examples": {
116
- "vue2": [
117
- {
118
- "title": "基础用法",
119
- "code": "<em-popover v-model=\"showPopover\" :actions=\"actions\" @select=\"onSelect\">\n <template #reference>\n <em-button type=\"primary\">浅色风格</em-button>\n </template>\n</em-popover>\n<em-toast ref=\"emToast\"></em-toast>"
120
- },
121
- {
122
- "title": "深色风格",
123
- "code": "<em-popover v-model=\"showPopover\" theme=\"dark\" :actions=\"actions\">\n <template #reference>\n <em-button type=\"primary\">深色风格</em-button>\n </template>\n</em-popover>"
124
- },
125
- {
126
- "title": "弹出位置",
127
- "code": "<em-popover placement=\"top\" />"
128
- },
129
- {
130
- "title": "展示图标",
131
- "code": "<em-popover v-model=\"showPopover\" :actions=\"actions\">\n <template #reference>\n <em-button type=\"primary\">展示图标</em-button>\n </template>\n</em-popover>"
132
- },
133
- {
134
- "title": "禁用选项",
135
- "code": "<em-popover v-model=\"showPopover\" :actions=\"actions\">\n <template #reference>\n <em-button type=\"primary\">禁用选项</em-button>\n </template>\n</em-popover>"
136
- }
137
- ],
138
- "vue3": [
139
- {
140
- "title": "基础用法",
141
- "code": "<em-popover v-model=\"showPopover\" :actions=\"actions\" @select=\"onSelect\">\n <template #reference>\n <em-button type=\"primary\">浅色风格</em-button>\n </template>\n</em-popover>\n<em-toast ref=\"emToast\"></em-toast>"
142
- },
143
- {
144
- "title": "深色风格",
145
- "code": "<em-popover v-model=\"showPopover\" theme=\"dark\" :actions=\"actions\">\n <template #reference>\n <em-button type=\"primary\">深色风格</em-button>\n </template>\n</em-popover>"
146
- },
147
- {
148
- "title": "弹出位置",
149
- "code": "<em-popover placement=\"top\" />"
150
- },
151
- {
152
- "title": "展示图标",
153
- "code": "<em-popover v-model=\"showPopover\" :actions=\"actions\">\n <template #reference>\n <em-button type=\"primary\">展示图标</em-button>\n </template>\n</em-popover>"
154
- },
155
- {
156
- "title": "禁用选项",
157
- "code": "<em-popover v-model=\"showPopover\" :actions=\"actions\">\n <template #reference>\n <em-button type=\"primary\">禁用选项</em-button>\n </template>\n</em-popover>"
158
- }
159
- ]
160
- }
161
- }
@@ -1,229 +0,0 @@
1
- {
2
- "id": "popup",
3
- "name": "em-popup",
4
- "title": "弹出层",
5
- "description": "弹出层容器,用于展示弹窗、信息提示等内容,支持多个弹出层叠加展示。",
6
- "props": [
7
- {
8
- "name": "v-model",
9
- "type": "boolean",
10
- "default": "false",
11
- "required": false,
12
- "description": "是否显示弹出层"
13
- },
14
- {
15
- "name": "overlay",
16
- "type": "boolean",
17
- "default": "true",
18
- "required": false,
19
- "description": "是否显示遮罩层"
20
- },
21
- {
22
- "name": "position",
23
- "type": "string",
24
- "default": "center",
25
- "required": false,
26
- "description": "弹出位置,可选值为 `top` `bottom` `right` `left`"
27
- },
28
- {
29
- "name": "custom-style",
30
- "type": "string",
31
- "default": "-",
32
- "required": false,
33
- "description": "自定义弹出层样式"
34
- },
35
- {
36
- "name": "overlay-style",
37
- "type": "string",
38
- "default": "-",
39
- "required": false,
40
- "description": "自定义遮罩层样式"
41
- },
42
- {
43
- "name": "duration",
44
- "type": "number / string",
45
- "default": "300",
46
- "required": false,
47
- "description": "动画时长,单位毫秒"
48
- },
49
- {
50
- "name": "round",
51
- "type": "boolean",
52
- "default": "false",
53
- "required": false,
54
- "description": "是否显示圆角"
55
- },
56
- {
57
- "name": "lock-scroll",
58
- "type": "boolean",
59
- "default": "true",
60
- "required": false,
61
- "description": "是否锁定背景滚动"
62
- },
63
- {
64
- "name": "close-on-click-overlay",
65
- "type": "boolean",
66
- "default": "true",
67
- "required": false,
68
- "description": "是否在点击遮罩层后关闭"
69
- },
70
- {
71
- "name": "closeable",
72
- "type": "boolean",
73
- "default": "false",
74
- "required": false,
75
- "description": "是否显示关闭图标"
76
- },
77
- {
78
- "name": "close-icon",
79
- "type": "string",
80
- "default": "cross",
81
- "required": false,
82
- "description": "关闭图标名称或图片链接"
83
- },
84
- {
85
- "name": "close-icon-position",
86
- "type": "string",
87
- "default": "top-right",
88
- "required": false,
89
- "description": "关闭图标位置,可选值为`top-left` `bottom-left` `bottom-right`"
90
- },
91
- {
92
- "name": "transition",
93
- "type": "string",
94
- "default": "-",
95
- "required": false,
96
- "description": "动画类名,等价于 `transtion` 的`name`属性, 仅在`position='center'`时有效"
97
- },
98
- {
99
- "name": "safe-area-inset-bottom",
100
- "type": "boolean",
101
- "default": "false",
102
- "required": false,
103
- "description": "是否开启底部安全区适配"
104
- }
105
- ],
106
- "events": [
107
- {
108
- "name": "click",
109
- "parameters": "点击弹出层时触发",
110
- "description": "event: Event"
111
- },
112
- {
113
- "name": "before-enter",
114
- "parameters": "进入前触发",
115
- "description": "-"
116
- },
117
- {
118
- "name": "enter",
119
- "parameters": "进入中触发",
120
- "description": "-"
121
- },
122
- {
123
- "name": "after-enter",
124
- "parameters": "进入后触发",
125
- "description": "-"
126
- },
127
- {
128
- "name": "before-leave",
129
- "parameters": "离开前触发",
130
- "description": "-"
131
- },
132
- {
133
- "name": "leave",
134
- "parameters": "离开中触发",
135
- "description": "-"
136
- },
137
- {
138
- "name": "after-leave",
139
- "parameters": "离开后触发",
140
- "description": "-"
141
- },
142
- {
143
- "name": "click-overlay",
144
- "parameters": "点击遮罩层时触发",
145
- "description": "-"
146
- },
147
- {
148
- "name": "click-close-icon",
149
- "parameters": "点击关闭图标时触发",
150
- "description": "event: Event"
151
- }
152
- ],
153
- "slots": [
154
- {
155
- "name": "click",
156
- "description": "点击弹出层时触发"
157
- },
158
- {
159
- "name": "before-enter",
160
- "description": "进入前触发"
161
- },
162
- {
163
- "name": "enter",
164
- "description": "进入中触发"
165
- },
166
- {
167
- "name": "after-enter",
168
- "description": "进入后触发"
169
- },
170
- {
171
- "name": "before-leave",
172
- "description": "离开前触发"
173
- },
174
- {
175
- "name": "leave",
176
- "description": "离开中触发"
177
- },
178
- {
179
- "name": "after-leave",
180
- "description": "离开后触发"
181
- },
182
- {
183
- "name": "click-overlay",
184
- "description": "点击遮罩层时触发"
185
- },
186
- {
187
- "name": "click-close-icon",
188
- "description": "点击关闭图标时触发"
189
- }
190
- ],
191
- "examples": {
192
- "vue2": [
193
- {
194
- "title": "基础用法",
195
- "code": "<em-cell is-link @click=\"showPopup\">展示弹出层</em-cell>\n<em-popup v-model=\"show\">内容</em-popup>"
196
- },
197
- {
198
- "title": "弹出位置",
199
- "code": "<em-popup v-model=\"show\" position=\"top\" custom-style=\"height: 30%;\" />"
200
- },
201
- {
202
- "title": "关闭图标",
203
- "code": "<em-popup v-model=\"show\" closeable position=\"bottom\" custom-style=\"height: 30%;\" />\n<!-- 自定义图标 -->\n<em-popup v-model=\"show\" closeable close-icon=\"close\" position=\"bottom\" custom-style=\"height: 30%;\" />\n<!-- 图标位置 -->\n<em-popup v-model=\"show\" closeable close-icon-position=\"top-left\" position=\"bottom\" custom-style=\"height: 30%;\" />"
204
- },
205
- {
206
- "title": "圆角弹窗",
207
- "code": "<em-popup v-model=\"show\" round position=\"bottom\" custom-style=\"height: 30%;\" />"
208
- }
209
- ],
210
- "vue3": [
211
- {
212
- "title": "基础用法",
213
- "code": "<em-cell is-link @click=\"showPopup\">展示弹出层</em-cell>\n<em-popup v-model=\"show\">内容</em-popup>"
214
- },
215
- {
216
- "title": "弹出位置",
217
- "code": "<em-popup v-model=\"show\" position=\"top\" custom-style=\"height: 30%;\" />"
218
- },
219
- {
220
- "title": "关闭图标",
221
- "code": "<em-popup v-model=\"show\" closeable position=\"bottom\" custom-style=\"height: 30%;\" />\n<!-- 自定义图标 -->\n<em-popup v-model=\"show\" closeable close-icon=\"close\" position=\"bottom\" custom-style=\"height: 30%;\" />\n<!-- 图标位置 -->\n<em-popup v-model=\"show\" closeable close-icon-position=\"top-left\" position=\"bottom\" custom-style=\"height: 30%;\" />"
222
- },
223
- {
224
- "title": "圆角弹窗",
225
- "code": "<em-popup v-model=\"show\" round position=\"bottom\" custom-style=\"height: 30%;\" />"
226
- }
227
- ]
228
- }
229
- }