m8-mcp-server 1.0.9 → 1.0.10
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card-component.d.ts","sourceRoot":"","sources":["../../src/generator/card-component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAsB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"card-component.d.ts","sourceRoot":"","sources":["../../src/generator/card-component.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAsB,MAAM,mBAAmB,CAAC;AA4avG;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,oBAAoB,GAAG,mBAAmB,CAuD5F"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function p(
|
|
2
|
-
name: "${
|
|
3
|
-
module_name: "${
|
|
1
|
+
function p(a){const e=[];return(a.includes("\u6807\u9898")||a.includes("\u6587\u5B57"))&&(e.push({name:"title",type:"text",displayName:"\u6807\u9898\u5185\u5BB9"}),e.push({name:"fontSize",type:"font",displayName:"\u5B57\u4F53\u5927\u5C0F"}),e.push({name:"color",type:"color",displayName:"\u5B57\u4F53\u989C\u8272"})),(a.includes("\u56FE\u7247")||a.includes("\u8F6E\u64AD"))&&(e.push({name:"image",type:"uploadimage",displayName:"\u4E0A\u4F20\u56FE\u7247"}),e.push({name:"borderRadius",type:"text",displayName:"\u5706\u89D2"})),a.includes("\u80CC\u666F")&&e.push({name:"backgroundColor",type:"color",displayName:"\u80CC\u666F\u989C\u8272"}),(a.includes("\u5217\u8868")||a.includes("\u6570\u7EC4"))&&e.push({name:"list",type:"array",displayName:"\u5217\u8868\u6570\u636E"}),(a.includes("\u9AD8\u5EA6")||a.includes("\u5BBD\u5EA6"))&&e.push({name:"size",type:"text",displayName:"\u5C3A\u5BF8"}),e}function l(a){return`export default {
|
|
2
|
+
name: "${a}",
|
|
3
|
+
module_name: "${a}",
|
|
4
4
|
version: "0.1.0"
|
|
5
|
-
};`}function
|
|
5
|
+
};`}function m(a,e){return`import base from "./base";
|
|
6
6
|
import boxOptions from "../plugin/boxoptions/config";
|
|
7
7
|
|
|
8
8
|
export default {
|
|
@@ -20,13 +20,13 @@ export default {
|
|
|
20
20
|
displayName: "\u57FA\u7840\u914D\u7F6E",
|
|
21
21
|
name: "basicSetting",
|
|
22
22
|
value: [
|
|
23
|
-
${p(e).map(
|
|
24
|
-
displayName: "${
|
|
25
|
-
name: "${
|
|
26
|
-
value: ${
|
|
27
|
-
type: "${
|
|
23
|
+
${p(e).map(t=>{let n='""';return t.type==="color"&&(n='"#000000"'),t.type==="number"&&(n=14),t.type==="boolean"&&(n=!1),t.type==="array"&&(n="[]"),`{
|
|
24
|
+
displayName: "${t.displayName}",
|
|
25
|
+
name: "${t.name}",
|
|
26
|
+
value: ${n},
|
|
27
|
+
type: "${t.type}"
|
|
28
28
|
}`}).join(`,
|
|
29
|
-
|
|
29
|
+
`)}
|
|
30
30
|
]
|
|
31
31
|
}
|
|
32
32
|
]
|
|
@@ -111,13 +111,66 @@ export default {
|
|
|
111
111
|
}
|
|
112
112
|
]
|
|
113
113
|
}
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: "event",
|
|
117
|
+
displayName: "\u4E8B\u4EF6\uFF08\u65B0\uFF09",
|
|
118
|
+
type: "array",
|
|
119
|
+
value: [
|
|
120
|
+
{
|
|
121
|
+
name: "onMounted",
|
|
122
|
+
displayName: "onMounted\u4E8B\u4EF6",
|
|
123
|
+
dynamic: true,
|
|
124
|
+
type: "array",
|
|
125
|
+
value: [],
|
|
126
|
+
template: {
|
|
127
|
+
name: "templeteMounted_1",
|
|
128
|
+
displayName: "\u52A8\u4F5C",
|
|
129
|
+
type: "text",
|
|
130
|
+
value: 'console.log("onMounted\u4E8B\u4EF6:", e)'
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "onClick",
|
|
135
|
+
displayName: "onClick\u4E8B\u4EF6",
|
|
136
|
+
dynamic: true,
|
|
137
|
+
type: "array",
|
|
138
|
+
value: [
|
|
139
|
+
{
|
|
140
|
+
name: "OnClick_1",
|
|
141
|
+
displayName: "\u52A8\u4F5C",
|
|
142
|
+
type: "text",
|
|
143
|
+
value: 'console.log("OnClick\u4E8B\u4EF6:", e)'
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
template: {
|
|
147
|
+
name: "templeteOnClick_1",
|
|
148
|
+
displayName: "\u52A8\u4F5C",
|
|
149
|
+
type: "text",
|
|
150
|
+
value: 'console.log("OnClick\u4E8B\u4EF6:", e)'
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "onChange",
|
|
155
|
+
displayName: "onChange\u4E8B\u4EF6",
|
|
156
|
+
dynamic: true,
|
|
157
|
+
type: "array",
|
|
158
|
+
value: [],
|
|
159
|
+
template: {
|
|
160
|
+
name: "templeteOnChange_1",
|
|
161
|
+
displayName: "\u503C\u53D8\u52A8",
|
|
162
|
+
type: "text",
|
|
163
|
+
value: 'console.log("onChange\u4E8B\u4EF6:", e)'
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
]
|
|
114
167
|
}
|
|
115
168
|
]
|
|
116
169
|
}
|
|
117
170
|
]
|
|
118
|
-
};`}function
|
|
171
|
+
};`}function r(a){return`<template>
|
|
119
172
|
<div class="epoint-component" :style="boxOptions">
|
|
120
|
-
<div class="${
|
|
173
|
+
<div class="${a.toLowerCase()}-container">
|
|
121
174
|
<!-- \u7EC4\u4EF6\u5185\u5BB9 -->
|
|
122
175
|
<div>{{ config.options.basicSetting.title || '\u9ED8\u8BA4\u6807\u9898' }}</div>
|
|
123
176
|
</div>
|
|
@@ -164,7 +217,7 @@ export default {
|
|
|
164
217
|
|
|
165
218
|
<style lang="scss" scoped>
|
|
166
219
|
@import './css/index.scss';
|
|
167
|
-
</style>`}function c(
|
|
220
|
+
</style>`}function c(a){return`.${a.toLowerCase()}-container {
|
|
168
221
|
width: 100%;
|
|
169
222
|
height: 100%;
|
|
170
223
|
position: relative;
|
|
@@ -198,7 +251,7 @@ export { default as component } from './index.vue';
|
|
|
198
251
|
|
|
199
252
|
export default {
|
|
200
253
|
install
|
|
201
|
-
};`}function
|
|
254
|
+
};`}function y(){return`export default {
|
|
202
255
|
displayName: '\u901A\u7528\u5BB9\u5668\u6837\u5F0F',
|
|
203
256
|
name: 'boxOptions',
|
|
204
257
|
value: [
|
|
@@ -265,8 +318,8 @@ export default {
|
|
|
265
318
|
]
|
|
266
319
|
}
|
|
267
320
|
]
|
|
268
|
-
};`}function
|
|
321
|
+
};`}function g(){return`import eventGenerate from '@epoint-mrc/vue-cli-plugin-mc/src/mccontext/eventgenerate.js';
|
|
269
322
|
|
|
270
323
|
export default {
|
|
271
324
|
mixins: [eventGenerate]
|
|
272
|
-
};`}function f(
|
|
325
|
+
};`}function f(a){const{componentName:e,requirement:i,projectName:o}=a,t=o?`src/card_components/${o}/${e}`:`src/card_components/${e}`,n=[{path:`${t}/index.vue`,content:r(e),language:"vue"},{path:`${t}/index.js`,content:d(),language:"javascript"},{path:`${t}/js/base.js`,content:l(e),language:"javascript"},{path:`${t}/js/config.js`,content:m(e,i),language:"javascript"},{path:`${t}/mock/data.js`,content:u(),language:"javascript"},{path:`${t}/css/index.scss`,content:c(e),language:"scss"},{path:`${t}/plugin/boxoptions/config.js`,content:y(),language:"javascript"},{path:`${t}/plugin/eventgenerate/index.js`,content:g(),language:"javascript"}],s=`npm run ioc create ${e}`;return{files:n,createCommand:s,explanation:`\u5DF2\u751F\u6210\u7EC4\u4EF6 ${e} \u7684\u4EE3\u7801\u6587\u4EF6\u3002\u8BF7\u786E\u4FDD\u5148\u8FD0\u884C '${s}' \u521B\u5EFA\u7EC4\u4EF6\u6A21\u677F\u3002`}}export{f as generateCardComponentCode};
|