@maxelms/create-plugin-cli 1.1.21 → 1.1.23
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/maxelms-navigation/package.json +1 -0
- package/templates/maxelms-script/package.json.tpl +1 -0
- package/templates/react-micro-app/package.json.tpl +1 -0
- package/templates/react-micro-button/package.json.tpl +1 -0
- package/templates/react-micro-field/package.json.tpl +1 -0
- package/templates/react-micro-plugin/package.json.tpl +1 -0
- package/templates/vue3-micro-button/src/App.vue.tpl +8 -2
- package/templates/vue3-micro-button/src/main.js +1 -3
- package/templates/vue3-micro-field/src/App.vue.tpl +14 -5
- package/templates/vue3-micro-field/src/main.js +1 -3
- package/templates/vue3-micro-plugin/src/App.vue.tpl +12 -3
- package/templates/vue3-micro-plugin/src/main.js +1 -3
package/package.json
CHANGED
|
@@ -16,10 +16,16 @@ if (process.env.NODE_ENV === 'development') {
|
|
|
16
16
|
|
|
17
17
|
export default {
|
|
18
18
|
name: 'App',
|
|
19
|
+
props: {
|
|
20
|
+
masterProps: {
|
|
21
|
+
type: Object,
|
|
22
|
+
default: () => ({})
|
|
23
|
+
}
|
|
24
|
+
},
|
|
19
25
|
data() {
|
|
20
26
|
return {
|
|
21
27
|
visible: false,
|
|
22
|
-
buttonName: this
|
|
28
|
+
buttonName: this.masterProps?.originalButtonProps?.name,
|
|
23
29
|
}
|
|
24
30
|
},
|
|
25
31
|
components: {
|
|
@@ -29,7 +35,7 @@ export default {
|
|
|
29
35
|
|
|
30
36
|
},
|
|
31
37
|
created() {
|
|
32
|
-
|
|
38
|
+
console.log(this.masterProps)
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
41
|
</script>
|
|
@@ -23,6 +23,12 @@ export default {
|
|
|
23
23
|
name: 'App',
|
|
24
24
|
components: {
|
|
25
25
|
},
|
|
26
|
+
props: {
|
|
27
|
+
masterProps: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default: () => ({})
|
|
30
|
+
}
|
|
31
|
+
},
|
|
26
32
|
methods: {
|
|
27
33
|
change(e) {
|
|
28
34
|
this.onChange && this.onChange({
|
|
@@ -34,24 +40,27 @@ export default {
|
|
|
34
40
|
computed: {
|
|
35
41
|
/** value、onChange 是字段组件作为表单受控组件的必要属性 */
|
|
36
42
|
value () {
|
|
37
|
-
return this
|
|
43
|
+
return this.masterProps?.value?.value || "欢迎使用 Maxelms 字段组件"
|
|
38
44
|
},
|
|
39
45
|
onChange () {
|
|
40
|
-
return this
|
|
46
|
+
return this.masterProps?.onChange
|
|
41
47
|
},
|
|
42
48
|
/** 是否禁用 */
|
|
43
49
|
disabled () {
|
|
44
|
-
return this
|
|
50
|
+
return this.masterProps?.configurations?.propName3
|
|
45
51
|
},
|
|
46
52
|
/** 控件宽度 */
|
|
47
53
|
width () {
|
|
48
|
-
return this
|
|
54
|
+
return this.masterProps?.configurations?.propName2 || 350
|
|
49
55
|
},
|
|
50
56
|
/** 提示文本 */
|
|
51
57
|
placeholder () {
|
|
52
|
-
return this
|
|
58
|
+
return this.masterProps?.configurations?.propName1
|
|
53
59
|
},
|
|
54
60
|
},
|
|
61
|
+
created() {
|
|
62
|
+
console.log(this.masterProps)
|
|
63
|
+
}
|
|
55
64
|
}
|
|
56
65
|
</script>
|
|
57
66
|
|
|
@@ -19,6 +19,12 @@ if (process.env.NODE_ENV === 'development') {
|
|
|
19
19
|
|
|
20
20
|
export default {
|
|
21
21
|
name: 'App',
|
|
22
|
+
props: {
|
|
23
|
+
masterProps: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default: () => ({})
|
|
26
|
+
}
|
|
27
|
+
},
|
|
22
28
|
components: {
|
|
23
29
|
},
|
|
24
30
|
methods: {
|
|
@@ -27,17 +33,20 @@ export default {
|
|
|
27
33
|
computed: {
|
|
28
34
|
/** 是否禁用 */
|
|
29
35
|
disabled () {
|
|
30
|
-
return this
|
|
36
|
+
return this.masterProps?.configurations?.propName3
|
|
31
37
|
},
|
|
32
38
|
/** 控件宽度 */
|
|
33
39
|
width () {
|
|
34
|
-
return this
|
|
40
|
+
return this.masterProps?.configurations?.propName2 || 350
|
|
35
41
|
},
|
|
36
42
|
/** 提示文本 */
|
|
37
43
|
placeholder () {
|
|
38
|
-
return this
|
|
44
|
+
return this.masterProps?.configurations?.propName1
|
|
39
45
|
},
|
|
40
46
|
},
|
|
47
|
+
created () {
|
|
48
|
+
console.log('masterProps', this.masterProps)
|
|
49
|
+
}
|
|
41
50
|
}
|
|
42
51
|
</script>
|
|
43
52
|
|