@maxelms/create-plugin-cli 1.1.23 → 1.1.25-master.1
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/lib/index.js +4 -4
- package/package.json +2 -2
- package/templates/angular-micro-plugin/.eslintrc.js +3 -0
- package/templates/angular-micro-plugin/README.md +5 -0
- package/templates/angular-micro-plugin/manifest.json.tpl +3 -0
- package/templates/angular-micro-plugin/package.json.tpl +38 -0
- package/templates/angular-micro-plugin/pnpm-lock.yaml +7988 -0
- package/templates/angular-micro-plugin/public/configuration.html +13 -0
- package/templates/angular-micro-plugin/public/configuration.json +34 -0
- package/templates/angular-micro-plugin/public/index.html.tpl +15 -0
- package/templates/angular-micro-plugin/src/app.component.css +22 -0
- package/templates/angular-micro-plugin/src/app.component.html +312 -0
- package/templates/angular-micro-plugin/src/app.component.ts.tpl +33 -0
- package/templates/angular-micro-plugin/src/app.module.ts +10 -0
- package/templates/angular-micro-plugin/src/index.ts.tpl +53 -0
- package/templates/angular-micro-plugin/src/single-spa-props.ts +7 -0
- package/templates/angular-micro-plugin/tsconfig.json +25 -0
- package/templates/angular-micro-plugin/webpack.config.js +112 -0
- package/templates/jQuery-micro-app/src/main.js.tpl +1 -1
- package/templates/playground/dist/main.js +1 -1
- package/templates/react-micro-app/src/index.tsx +1 -1
- package/templates/react-micro-button/configuration/Configuration.tsx +1 -1
- package/templates/react-micro-button/public/configuration.html +1 -1
- package/templates/react-micro-field/configuration/Configuration.tsx +1 -1
- package/templates/react-micro-field/public/configuration.html +1 -1
- package/templates/react-micro-field/public/index.html +1 -1
- package/templates/react-micro-field/src/App.tsx.tpl +4 -4
- package/templates/react-micro-field-umi/src/pages/configuration/index.tsx +1 -1
- package/templates/react-micro-field-umi/src/pages/index.tsx.tpl +4 -4
- package/templates/react-micro-field-umi/src/pages/interface.ts +1 -1
- package/templates/react-micro-plugin/configuration/Configuration.tsx +1 -1
- package/templates/react-micro-plugin/public/configuration.html +11 -8
- package/templates/react-micro-plugin-umi/src/pages/configuration/index.tsx +1 -1
- package/templates/vue-micro-app/src/main.js +1 -1
- package/templates/vue-micro-button/public/configuration.html +1 -1
- package/templates/vue-micro-field/public/configuration.html +1 -1
- package/templates/vue-micro-field/public/index.html +1 -1
- package/templates/vue-micro-field/src/App.vue.tpl +2 -2
- package/templates/vue-micro-plugin/configuration/App.vue +1 -1
- package/templates/vue3-micro-app/src/main.js +2 -2
- package/templates/vue3-micro-app/src/public-path.js +1 -1
- package/templates/vue3-micro-button/public/configuration.html +1 -1
- package/templates/vue3-micro-button/public/index.html +1 -1
- package/templates/vue3-micro-field/public/configuration.html +1 -1
- package/templates/vue3-micro-field/public/index.html +1 -1
- package/templates/vue3-micro-field/src/App.vue.tpl +2 -2
|
@@ -96,7 +96,7 @@ const Configuration: React.FC<ConfigurationType> = () => {
|
|
|
96
96
|
<Form.Item name="label" label="label">
|
|
97
97
|
<Input />
|
|
98
98
|
</Form.Item>
|
|
99
|
-
<Form.Item name="field" label="
|
|
99
|
+
<Form.Item name="field" label="绑定属性">
|
|
100
100
|
<Select
|
|
101
101
|
options={fields.map((field) => {
|
|
102
102
|
return {
|
|
@@ -96,7 +96,7 @@ const Configuration: React.FC<ConfigurationType> = () => {
|
|
|
96
96
|
<Form.Item name="label" label="label">
|
|
97
97
|
<Input />
|
|
98
98
|
</Form.Item>
|
|
99
|
-
<Form.Item name="field" label="
|
|
99
|
+
<Form.Item name="field" label="绑定属性">
|
|
100
100
|
<Select
|
|
101
101
|
options={fields.map((field) => {
|
|
102
102
|
return {
|
|
@@ -14,8 +14,8 @@ const App = (props: any) => {
|
|
|
14
14
|
propName3: disabled,
|
|
15
15
|
} = configurations || {}
|
|
16
16
|
|
|
17
|
-
/** value、onChange
|
|
18
|
-
const inputValue = value?.value || "欢迎使用 Maxelms
|
|
17
|
+
/** value、onChange 是属性组件作为表单受控组件的必要属性 */
|
|
18
|
+
const inputValue = value?.value || "欢迎使用 Maxelms 属性组件"
|
|
19
19
|
|
|
20
20
|
const onInputChange: React.ChangeEventHandler<HTMLInputElement> = e => {
|
|
21
21
|
onChange && onChange({
|
|
@@ -24,14 +24,14 @@ const App = (props: any) => {
|
|
|
24
24
|
})
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/** 属性只读态 */
|
|
28
28
|
if (readOnly) {
|
|
29
29
|
return (
|
|
30
30
|
<span>{inputValue}</span>
|
|
31
31
|
)
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
/**
|
|
34
|
+
/** 属性编辑态 */
|
|
35
35
|
return (
|
|
36
36
|
<div className={prefixCls}>
|
|
37
37
|
<div>
|
|
@@ -73,7 +73,7 @@ const Configuration: React.FC<ConfigurationType> = () => {
|
|
|
73
73
|
<Form.Item name="propName3" label="配置项三" valuePropName="checked">
|
|
74
74
|
<Switch />
|
|
75
75
|
</Form.Item>
|
|
76
|
-
<Form.Item name="field" label="
|
|
76
|
+
<Form.Item name="field" label="绑定属性">
|
|
77
77
|
<Select
|
|
78
78
|
options={fields.map((field) => {
|
|
79
79
|
return {
|
|
@@ -17,8 +17,8 @@ const App = (props: any) => {
|
|
|
17
17
|
propName3: disabled,
|
|
18
18
|
} = configurations || {}
|
|
19
19
|
|
|
20
|
-
/** value、onChange
|
|
21
|
-
const inputValue = value?.value || "欢迎使用 Maxelms
|
|
20
|
+
/** value、onChange 是属性组件作为表单受控组件的必要属性 */
|
|
21
|
+
const inputValue = value?.value || "欢迎使用 Maxelms 属性组件"
|
|
22
22
|
|
|
23
23
|
const onInputChange: React.ChangeEventHandler<HTMLInputElement> = e => {
|
|
24
24
|
onChange && onChange({
|
|
@@ -27,14 +27,14 @@ const App = (props: any) => {
|
|
|
27
27
|
})
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
/**
|
|
30
|
+
/** 属性只读态 */
|
|
31
31
|
if (readOnly) {
|
|
32
32
|
return (
|
|
33
33
|
<span>{inputValue}</span>
|
|
34
34
|
)
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
/**
|
|
37
|
+
/** 属性编辑态 */
|
|
38
38
|
return (
|
|
39
39
|
<div className={prefixCls}>
|
|
40
40
|
<div>
|
|
@@ -5,7 +5,7 @@ export interface PageInfoProps {
|
|
|
5
5
|
mode: 'design' | 'application'
|
|
6
6
|
/** 页面类型:新建页、编辑页、列表页、迷你详情页 */
|
|
7
7
|
type: 'create' | 'edit' | 'list' | 'mini'
|
|
8
|
-
/**
|
|
8
|
+
/** 集成类型:头部高亮属性、表格、表单 */
|
|
9
9
|
integrate: 'highlight' | 'table' | 'form'
|
|
10
10
|
/** 布局设计器模式:webpc、移动端 */
|
|
11
11
|
designMode?: 'web' | 'mobile'
|
|
@@ -97,7 +97,7 @@ const Configuration: React.FC<ConfigurationType> = () => {
|
|
|
97
97
|
<Form.Item name="label" label="label">
|
|
98
98
|
<Input />
|
|
99
99
|
</Form.Item>
|
|
100
|
-
<Form.Item name="field" label="
|
|
100
|
+
<Form.Item name="field" label="绑定属性">
|
|
101
101
|
<Select
|
|
102
102
|
options={fields.map((field) => {
|
|
103
103
|
return {
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html>
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<title>Maxelms 页面组件</title>
|
|
7
|
+
</head>
|
|
8
|
+
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
</body>
|
|
12
|
+
|
|
13
|
+
</html>
|
|
@@ -96,7 +96,7 @@ const Configuration: React.FC<ConfigurationType> = () => {
|
|
|
96
96
|
<Form.Item name="label" label="label">
|
|
97
97
|
<Input />
|
|
98
98
|
</Form.Item>
|
|
99
|
-
<Form.Item name="field" label="
|
|
99
|
+
<Form.Item name="field" label="绑定属性">
|
|
100
100
|
<Select
|
|
101
101
|
options={fields.map((field) => {
|
|
102
102
|
return {
|
|
@@ -27,9 +27,9 @@ export default {
|
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
29
|
computed: {
|
|
30
|
-
/** value、onChange
|
|
30
|
+
/** value、onChange 是属性组件作为表单受控组件的必要属性 */
|
|
31
31
|
value () {
|
|
32
|
-
return this.$root?.masterProps?.value?.value || "欢迎使用 Maxelms
|
|
32
|
+
return this.$root?.masterProps?.value?.value || "欢迎使用 Maxelms 属性组件"
|
|
33
33
|
},
|
|
34
34
|
onChange () {
|
|
35
35
|
return this.$root?.masterProps?.onChange
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<el-form-item label="label">
|
|
20
20
|
<el-input v-model="form.label"></el-input>
|
|
21
21
|
</el-form-item>
|
|
22
|
-
<el-form-item label="
|
|
22
|
+
<el-form-item label="绑定属性">
|
|
23
23
|
<el-select v-model="form.field">
|
|
24
24
|
<el-option :label="field.fieldName" :value="field.pathChain" v-for="(field, index) in formFields" :key="index"></el-option>
|
|
25
25
|
</el-select>
|
|
@@ -13,7 +13,7 @@ let history = null;
|
|
|
13
13
|
function render(props = {}) {
|
|
14
14
|
console.log(props)
|
|
15
15
|
const { container, configurations } = props;
|
|
16
|
-
history = createWebHistory(window.
|
|
16
|
+
history = createWebHistory(window.__POWERED_BY_MAXELMS__ ? '/' : '/');
|
|
17
17
|
router = createRouter({
|
|
18
18
|
history,
|
|
19
19
|
routes,
|
|
@@ -25,7 +25,7 @@ function render(props = {}) {
|
|
|
25
25
|
instance.mount(container ? container.querySelector('#app') : '#app');
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
if (!window.
|
|
28
|
+
if (!window.__POWERED_BY_MAXELMS__) {
|
|
29
29
|
render();
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -38,9 +38,9 @@ export default {
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
computed: {
|
|
41
|
-
/** value、onChange
|
|
41
|
+
/** value、onChange 是属性组件作为表单受控组件的必要属性 */
|
|
42
42
|
value () {
|
|
43
|
-
return this.masterProps?.value?.value || "欢迎使用 Maxelms
|
|
43
|
+
return this.masterProps?.value?.value || "欢迎使用 Maxelms 属性组件"
|
|
44
44
|
},
|
|
45
45
|
onChange () {
|
|
46
46
|
return this.masterProps?.onChange
|