@maxelms/create-plugin-cli 1.1.26 → 1.1.28
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/package.json +1 -1
- package/templates/angular-micro-app/.eslintrc.js +3 -0
- package/templates/angular-micro-app/README.md +5 -0
- package/templates/angular-micro-app/examples/main.css +2 -0
- package/templates/angular-micro-app/examples/main.js +2 -0
- package/templates/angular-micro-app/examples/main.js.LICENSE.txt +52 -0
- package/templates/angular-micro-app/examples/playground.html +1 -0
- package/templates/angular-micro-app/examples/react-dom.production.min.js +2 -0
- package/templates/angular-micro-app/examples/react-dom.production.min.js.LICENSE.txt +8 -0
- package/templates/angular-micro-app/examples/react.production.min.js +2 -0
- package/templates/angular-micro-app/examples/react.production.min.js.LICENSE.txt +8 -0
- package/templates/angular-micro-app/examples/vue.runtime.global.js +9054 -0
- package/templates/angular-micro-app/examples/zone.umd.min.js +2 -0
- package/templates/angular-micro-app/examples/zone.umd.min.js.LICENSE.txt +29 -0
- package/templates/angular-micro-app/manifest.json.tpl +3 -0
- package/templates/angular-micro-app/package.json.tpl +40 -0
- package/templates/angular-micro-app/pnpm-lock.yaml +7998 -0
- package/templates/angular-micro-app/public/configuration.json +34 -0
- package/templates/angular-micro-app/public/index.html.tpl +15 -0
- package/templates/angular-micro-app/src/about.component.ts +42 -0
- package/templates/angular-micro-app/src/app-routing.module.ts +12 -0
- package/templates/angular-micro-app/src/app.component.css +22 -0
- package/templates/angular-micro-app/src/app.component.html +304 -0
- package/templates/angular-micro-app/src/app.component.ts +42 -0
- package/templates/angular-micro-app/src/app.module.ts +27 -0
- package/templates/angular-micro-app/src/contact.component.ts +42 -0
- package/templates/angular-micro-app/src/home.component.ts +42 -0
- package/templates/angular-micro-app/src/index.ts +54 -0
- package/templates/angular-micro-app/src/props.service.ts +18 -0
- package/templates/angular-micro-app/src/single-spa-props.ts +7 -0
- package/templates/angular-micro-app/tsconfig.json +25 -0
- package/templates/angular-micro-app/webpack.config.js +112 -0
- package/templates/angular-micro-button/.eslintrc.js +3 -0
- package/templates/angular-micro-button/README.md +5 -0
- package/templates/angular-micro-button/manifest.json.tpl +3 -0
- package/templates/angular-micro-button/package.json.tpl +39 -0
- package/templates/angular-micro-button/pnpm-lock.yaml +7977 -0
- package/templates/angular-micro-button/public/configuration.json +34 -0
- package/templates/angular-micro-button/public/index.html.tpl +15 -0
- package/templates/angular-micro-button/src/app.component.css +10 -0
- package/templates/angular-micro-button/src/app.component.html +2 -0
- package/templates/angular-micro-button/src/app.component.ts.tpl +38 -0
- package/templates/angular-micro-button/src/app.module.ts +27 -0
- package/templates/angular-micro-button/src/components/content.component.css +116 -0
- package/templates/angular-micro-button/src/components/content.component.html +3 -0
- package/templates/angular-micro-button/src/components/content.component.ts +16 -0
- package/templates/angular-micro-button/src/index.ts.tpl +107 -0
- package/templates/angular-micro-button/src/master-props.ts +7 -0
- package/templates/angular-micro-button/tsconfig.json +25 -0
- package/templates/angular-micro-button/webpack.config.js +112 -0
- package/templates/angular-micro-field/.eslintrc.js +3 -0
- package/templates/angular-micro-field/README.md +5 -0
- package/templates/angular-micro-field/examples/main.css +2 -0
- package/templates/angular-micro-field/examples/main.js +2 -0
- package/templates/angular-micro-field/examples/main.js.LICENSE.txt +52 -0
- package/templates/angular-micro-field/examples/playground.html +1 -0
- package/templates/angular-micro-field/examples/react-dom.production.min.js +2 -0
- package/templates/angular-micro-field/examples/react-dom.production.min.js.LICENSE.txt +8 -0
- package/templates/angular-micro-field/examples/react.production.min.js +2 -0
- package/templates/angular-micro-field/examples/react.production.min.js.LICENSE.txt +8 -0
- package/templates/angular-micro-field/examples/vue.runtime.global.js +9054 -0
- package/templates/angular-micro-field/examples/zone.umd.min.js +2 -0
- package/templates/angular-micro-field/examples/zone.umd.min.js.LICENSE.txt +29 -0
- package/templates/angular-micro-field/manifest.json.tpl +3 -0
- package/templates/angular-micro-field/package.json.tpl +39 -0
- package/templates/angular-micro-field/pnpm-lock.yaml +7977 -0
- package/templates/angular-micro-field/public/configuration.json +34 -0
- package/templates/angular-micro-field/public/index.html.tpl +15 -0
- package/templates/angular-micro-field/src/app.component.css +10 -0
- package/templates/angular-micro-field/src/app.component.html +8 -0
- package/templates/angular-micro-field/src/app.component.ts.tpl +60 -0
- package/templates/angular-micro-field/src/app.module.ts +14 -0
- package/templates/angular-micro-field/src/components/content.component.css +116 -0
- package/templates/angular-micro-field/src/components/content.component.html +10 -0
- package/templates/angular-micro-field/src/components/content.component.ts +21 -0
- package/templates/angular-micro-field/src/index.ts.tpl +101 -0
- package/templates/angular-micro-field/src/master-props.ts +7 -0
- package/templates/angular-micro-field/tsconfig.json +25 -0
- package/templates/angular-micro-field/webpack.config.js +112 -0
- package/templates/angular-micro-plugin/package.json.tpl +2 -2
- package/templates/react-micro-app/package.json.tpl +6 -0
- package/templates/react-micro-button/package.json.tpl +5 -0
- package/templates/react-micro-button/src/index.tsx +1 -0
- package/templates/react-micro-field/package.json.tpl +5 -0
- package/templates/react-micro-field-umi/package.json.tpl +5 -0
- package/templates/react-micro-plugin/package.json.tpl +5 -0
- package/templates/react-micro-plugin-umi/package.json.tpl +5 -0
- package/templates/vue-micro-button/src/main.js +1 -0
- package/templates/vue3-micro-button/package.json.tpl +1 -1
- package/templates/vue3-micro-button/src/App.vue.tpl +6 -1
- package/templates/vue3-micro-button/src/main.js +3 -3
- package/templates/vue3-micro-field/package.json.tpl +1 -1
- package/templates/vue3-micro-field/src/App.vue.tpl +6 -0
- package/templates/vue3-micro-field/src/main.js +3 -3
- package/templates/vue3-micro-plugin/package.json.tpl +1 -1
- package/templates/vue3-micro-plugin/src/App.vue.tpl +6 -0
- package/templates/vue3-micro-plugin/src/main.js +3 -3
- package/templates/vue3vite-micro-button/package.json.tpl +1 -1
- package/templates/vue3vite-micro-button/src/App.vue.tpl +6 -1
- package/templates/vue3vite-micro-button/src/main.ts +2 -2
- package/templates/vue3vite-micro-plugin/package.json.tpl +1 -1
- package/templates/vue3vite-micro-plugin/src/App.vue.tpl +6 -0
- package/templates/vue3vite-micro-plugin/src/main.ts +2 -2
|
@@ -14,7 +14,7 @@ const vms = {}
|
|
|
14
14
|
|
|
15
15
|
const render = (props) => {
|
|
16
16
|
const { containerId } = props || {}
|
|
17
|
-
createApp(App, {
|
|
17
|
+
vms[containerId] = createApp(App, {
|
|
18
18
|
masterProps: props || {}
|
|
19
19
|
}).mount(containerId ? `#${containerId} #root` : '#root');
|
|
20
20
|
}
|
|
@@ -25,8 +25,8 @@ if (poweredByMaxelms) {
|
|
|
25
25
|
render(props)
|
|
26
26
|
},
|
|
27
27
|
update(props) {
|
|
28
|
-
if (vms[props.containerId]) {
|
|
29
|
-
vms[props.containerId].
|
|
28
|
+
if (vms[props.containerId] && vms[props.containerId].updateMasterProps) {
|
|
29
|
+
vms[props.containerId].updateMasterProps(props);
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
unmount(props) {
|
|
@@ -38,6 +38,12 @@ export default {
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
computed: {
|
|
41
|
+
updateMasterProps(newProps) {
|
|
42
|
+
// 更新本地数据,这会触发响应式更新
|
|
43
|
+
this.localMasterProps = { ...newProps };
|
|
44
|
+
// 同时触发事件通知父组件
|
|
45
|
+
this.$emit('update:masterProps', newProps);
|
|
46
|
+
},
|
|
41
47
|
/** value、onChange 是属性组件作为表单受控组件的必要属性 */
|
|
42
48
|
value () {
|
|
43
49
|
return this.masterProps?.value?.value || "欢迎使用 Maxelms 属性组件"
|
|
@@ -14,7 +14,7 @@ const vms = {}
|
|
|
14
14
|
|
|
15
15
|
const render = (props) => {
|
|
16
16
|
const { containerId } = props || {}
|
|
17
|
-
createApp(App, {
|
|
17
|
+
vms[containerId] = createApp(App, {
|
|
18
18
|
masterProps: props || {}
|
|
19
19
|
}).mount(containerId ? `#${containerId} #root` : '#root');
|
|
20
20
|
}
|
|
@@ -25,8 +25,8 @@ if (poweredByMaxelms) {
|
|
|
25
25
|
render(props)
|
|
26
26
|
},
|
|
27
27
|
update(props) {
|
|
28
|
-
if (vms[props.containerId]) {
|
|
29
|
-
vms[props.containerId].
|
|
28
|
+
if (vms[props.containerId] && vms[props.containerId].updateMasterProps) {
|
|
29
|
+
vms[props.containerId].updateMasterProps(props);
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
unmount(props) {
|
|
@@ -31,6 +31,12 @@ export default {
|
|
|
31
31
|
|
|
32
32
|
},
|
|
33
33
|
computed: {
|
|
34
|
+
updateMasterProps(newProps) {
|
|
35
|
+
// 更新本地数据,这会触发响应式更新
|
|
36
|
+
this.localMasterProps = { ...newProps };
|
|
37
|
+
// 同时触发事件通知父组件
|
|
38
|
+
this.$emit('update:masterProps', newProps);
|
|
39
|
+
},
|
|
34
40
|
/** 是否禁用 */
|
|
35
41
|
disabled () {
|
|
36
42
|
return this.masterProps?.configurations?.propName3
|
|
@@ -14,7 +14,7 @@ const vms = {}
|
|
|
14
14
|
|
|
15
15
|
const render = (props) => {
|
|
16
16
|
const { containerId } = props || {}
|
|
17
|
-
createApp(App, {
|
|
17
|
+
vms[containerId] = createApp(App, {
|
|
18
18
|
masterProps: props || {}
|
|
19
19
|
}).mount(containerId ? `#${containerId} #root` : '#root');
|
|
20
20
|
}
|
|
@@ -25,8 +25,8 @@ if (poweredByMaxelms) {
|
|
|
25
25
|
render(props)
|
|
26
26
|
},
|
|
27
27
|
update(props) {
|
|
28
|
-
if (vms[props.containerId]) {
|
|
29
|
-
vms[props.containerId].
|
|
28
|
+
if (vms[props.containerId] && vms[props.containerId].updateMasterProps) {
|
|
29
|
+
vms[props.containerId].updateMasterProps(props);
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
unmount(props) {
|
|
@@ -15,8 +15,8 @@ if (poweredByMaxelms && registerPlugin) {
|
|
|
15
15
|
render(props)
|
|
16
16
|
},
|
|
17
17
|
update(props) {
|
|
18
|
-
if (vms[props.containerId]) {
|
|
19
|
-
vms[props.containerId].
|
|
18
|
+
if (vms[props.containerId] && vms[props.containerId].updateMasterProps) {
|
|
19
|
+
vms[props.containerId].updateMasterProps(props);
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
unmount(props) {
|
|
@@ -21,6 +21,12 @@ export default {
|
|
|
21
21
|
|
|
22
22
|
},
|
|
23
23
|
computed: {
|
|
24
|
+
updateMasterProps(newProps) {
|
|
25
|
+
// 更新本地数据,这会触发响应式更新
|
|
26
|
+
this.localMasterProps = { ...newProps };
|
|
27
|
+
// 同时触发事件通知父组件
|
|
28
|
+
this.$emit('update:masterProps', newProps);
|
|
29
|
+
},
|
|
24
30
|
/** 是否禁用 */
|
|
25
31
|
disabled () {
|
|
26
32
|
return this.$root?.masterProps?.configurations?.propName3
|
|
@@ -15,8 +15,8 @@ if (poweredByMaxelms && registerPlugin) {
|
|
|
15
15
|
render(props)
|
|
16
16
|
},
|
|
17
17
|
update(props) {
|
|
18
|
-
if (vms[props.containerId]) {
|
|
19
|
-
vms[props.containerId].
|
|
18
|
+
if (vms[props.containerId] && vms[props.containerId].updateMasterProps) {
|
|
19
|
+
vms[props.containerId].updateMasterProps(props);
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
unmount(props) {
|