aloha-vue 1.0.49 → 1.0.52
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/src/AModal/AModal.js +20 -4
- package/src/ui/AForm/AForm.js +17 -1
package/package.json
CHANGED
package/src/AModal/AModal.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
|
|
20
20
|
// @vue/component
|
|
21
21
|
export default {
|
|
22
|
-
name: "
|
|
22
|
+
name: "AModal",
|
|
23
23
|
props: {
|
|
24
24
|
disabled: {
|
|
25
25
|
type: Boolean,
|
|
@@ -64,6 +64,10 @@ export default {
|
|
|
64
64
|
required: false,
|
|
65
65
|
default: "a_btn a_btn_primary",
|
|
66
66
|
},
|
|
67
|
+
isSaveButtonHide: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
required: false,
|
|
70
|
+
},
|
|
67
71
|
close: {
|
|
68
72
|
type: Function,
|
|
69
73
|
required: true,
|
|
@@ -78,7 +82,7 @@ export default {
|
|
|
78
82
|
required: false,
|
|
79
83
|
default: "a_btn a_btn_secondary",
|
|
80
84
|
},
|
|
81
|
-
|
|
85
|
+
isCloseButtonHide: {
|
|
82
86
|
type: Boolean,
|
|
83
87
|
required: false,
|
|
84
88
|
},
|
|
@@ -102,6 +106,15 @@ export default {
|
|
|
102
106
|
required: false,
|
|
103
107
|
default: () => [],
|
|
104
108
|
},
|
|
109
|
+
isDataFormHide: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
required: false,
|
|
112
|
+
},
|
|
113
|
+
isDataFormRender: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
required: false,
|
|
116
|
+
default: true,
|
|
117
|
+
},
|
|
105
118
|
modelValue: {
|
|
106
119
|
type: Object,
|
|
107
120
|
required: false,
|
|
@@ -426,6 +439,7 @@ export default {
|
|
|
426
439
|
class: "a_btn_close",
|
|
427
440
|
ariaLabel: "Close",
|
|
428
441
|
disabled: this.disabledLocal,
|
|
442
|
+
title: this.closeButtonText,
|
|
429
443
|
onClick: this.close,
|
|
430
444
|
})
|
|
431
445
|
]),
|
|
@@ -441,6 +455,8 @@ export default {
|
|
|
441
455
|
idPrefix: this.idPrefix,
|
|
442
456
|
isRequired: this.isRequired,
|
|
443
457
|
textRequired: this.textRequired,
|
|
458
|
+
isHide: this.isDataFormHide,
|
|
459
|
+
isRender: this.isDataFormRender,
|
|
444
460
|
"onUpdate:modelValue": this.updateModelLocal,
|
|
445
461
|
}, this.$slots),
|
|
446
462
|
this.bodyHtml && h("div", {
|
|
@@ -453,7 +469,7 @@ export default {
|
|
|
453
469
|
class: "a_modal_footer",
|
|
454
470
|
}, [
|
|
455
471
|
this.$slots.modalFooter && this.$slots.modalFooter(),
|
|
456
|
-
this.save && h("button", {
|
|
472
|
+
(!this.isSaveButtonHide && this.save) && h("button", {
|
|
457
473
|
type: "button",
|
|
458
474
|
class: this.saveButtonClass,
|
|
459
475
|
disabled: this.disabledLocal,
|
|
@@ -461,7 +477,7 @@ export default {
|
|
|
461
477
|
}, [
|
|
462
478
|
h("span", null, this.saveButtonText),
|
|
463
479
|
]),
|
|
464
|
-
!this.
|
|
480
|
+
!this.isCloseButtonHide && h("button", {
|
|
465
481
|
type: "button",
|
|
466
482
|
class: this.closeButtonClass,
|
|
467
483
|
disabled: this.disabledLocal,
|
package/src/ui/AForm/AForm.js
CHANGED
|
@@ -46,6 +46,15 @@ export default {
|
|
|
46
46
|
type: Boolean,
|
|
47
47
|
required: false,
|
|
48
48
|
},
|
|
49
|
+
isHide: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
required: false,
|
|
52
|
+
},
|
|
53
|
+
isRender: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
required: false,
|
|
56
|
+
default: true,
|
|
57
|
+
},
|
|
49
58
|
},
|
|
50
59
|
emits: [
|
|
51
60
|
"update:modelValue",
|
|
@@ -84,16 +93,23 @@ export default {
|
|
|
84
93
|
return isRequiredInData;
|
|
85
94
|
});
|
|
86
95
|
|
|
96
|
+
const isHide = toRef(props, "isHide");
|
|
97
|
+
const styleFormHide = computed(() => {
|
|
98
|
+
return isHide.value ? "display: none;" : "";
|
|
99
|
+
});
|
|
100
|
+
|
|
87
101
|
return {
|
|
88
102
|
componentTypesMapping,
|
|
89
103
|
isRequiredLocal,
|
|
90
104
|
modelValueLocal,
|
|
91
105
|
onUpdateModelLocal,
|
|
106
|
+
styleFormHide,
|
|
92
107
|
};
|
|
93
108
|
},
|
|
94
109
|
render() {
|
|
95
|
-
return h("form", {
|
|
110
|
+
return this.isRender && h("form", {
|
|
96
111
|
class: "a_form",
|
|
112
|
+
style: this.styleFormHide,
|
|
97
113
|
}, [
|
|
98
114
|
this.$slots.formPrepend && this.$slots.formPrepend(),
|
|
99
115
|
this.isRequiredLocal && h(ARequired, {
|