aloha-vue 1.0.46 → 1.0.49
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/docs/package.json +1 -1
- package/docs/src/components/TheMenu/TheMenu.js +5 -0
- package/docs/src/router/index.js +5 -0
- package/docs/src/views/PageDropdown/PageDropdown.pug +2 -1
- package/docs/src/views/PageProgress/PageProgress.js +8 -0
- package/docs/src/views/PageProgress/PageProgress.pug +34 -0
- package/docs/src/views/PageProgress/PageProgress.vue +2 -0
- package/package.json +1 -1
- package/src/ADropdown/ADropdown.js +10 -1
- package/src/AProgress/AProgress.js +85 -0
- package/src/styles/components/ADropdown.scss +3 -7
- package/src/ui/ACheckbox/ACheckbox.js +6 -6
- package/src/ui/AFieldset/AFieldset.js +6 -6
- package/src/ui/AInput/AInput.js +6 -6
- package/src/ui/AOneCheckbox/AOneCheckbox.js +6 -6
- package/src/ui/ARadio/ARadio.js +6 -6
- package/src/ui/ASelect/ASelect.js +6 -6
- package/src/ui/ASwitch/ASwitch.js +6 -6
- package/src/ui/ATemplate/ATemplate.js +17 -5
- package/src/ui/ATextarea/ATextarea.js +7 -5
- package/src/ui/compositionApi/{UiDependenciesAPI.js → UiStyleHideAPI.js} +5 -4
- package/src/ui/mixins/UiMixinProps.js +5 -0
package/docs/package.json
CHANGED
package/docs/src/router/index.js
CHANGED
|
@@ -104,6 +104,11 @@ const ROUTES = [
|
|
|
104
104
|
name: "PageTabs",
|
|
105
105
|
component: () => import(/* webpackChunkName: "PageTabs" */ "../views/PageTabs/PageTabs.vue"),
|
|
106
106
|
},
|
|
107
|
+
{
|
|
108
|
+
path: "/progress",
|
|
109
|
+
name: "PageProgress",
|
|
110
|
+
component: () => import(/* webpackChunkName: "PageProgress" */ "../views/PageProgress/PageProgress.vue"),
|
|
111
|
+
},
|
|
107
112
|
{
|
|
108
113
|
// If the routing configuration '*' reports an error, replace it with '/: catchAll(. *)'
|
|
109
114
|
// caught Error: Catch all routes ("*") must now be defined using a param with a custom regexp
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
div
|
|
2
|
+
h1 PageProgress
|
|
3
|
+
a-progress(
|
|
4
|
+
:value="50"
|
|
5
|
+
:is-integer="true"
|
|
6
|
+
)
|
|
7
|
+
a-progress.a_mt_4(
|
|
8
|
+
:value="50"
|
|
9
|
+
:is-value-visible="false"
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
a-progress.a_mt_4(
|
|
13
|
+
:value="20.2"
|
|
14
|
+
:is-integer="false"
|
|
15
|
+
class-progress-bar="a_bg_success"
|
|
16
|
+
)
|
|
17
|
+
h2 Small
|
|
18
|
+
a-progress.a_mt_4.a_progress_small(
|
|
19
|
+
:value="20.2"
|
|
20
|
+
:is-integer="false"
|
|
21
|
+
class-progress-bar="a_bg_success"
|
|
22
|
+
)
|
|
23
|
+
h2 Medium
|
|
24
|
+
a-progress.a_mt_4.a_progress_medium(
|
|
25
|
+
:value="20.2"
|
|
26
|
+
:is-integer="false"
|
|
27
|
+
class-progress-bar="a_bg_success"
|
|
28
|
+
)
|
|
29
|
+
h2 Large
|
|
30
|
+
a-progress.a_mt_4.a_progress_large(
|
|
31
|
+
:value="20.2"
|
|
32
|
+
:is-integer="false"
|
|
33
|
+
class-progress-bar="a_bg_success"
|
|
34
|
+
)
|
package/package.json
CHANGED
|
@@ -124,6 +124,11 @@ export default {
|
|
|
124
124
|
required: false,
|
|
125
125
|
default: undefined,
|
|
126
126
|
},
|
|
127
|
+
isRenderDefault: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
required: false,
|
|
130
|
+
default: false,
|
|
131
|
+
},
|
|
127
132
|
},
|
|
128
133
|
data() {
|
|
129
134
|
return {
|
|
@@ -193,6 +198,10 @@ export default {
|
|
|
193
198
|
}
|
|
194
199
|
return DROPDOWN_ATTRIBUTES;
|
|
195
200
|
},
|
|
201
|
+
|
|
202
|
+
isMenuRendered() {
|
|
203
|
+
return this.isRenderDefault || this.statusExpanded;
|
|
204
|
+
},
|
|
196
205
|
},
|
|
197
206
|
beforeUnmount() {
|
|
198
207
|
this.destroyEventCloseClick();
|
|
@@ -381,7 +390,7 @@ export default {
|
|
|
381
390
|
h(Teleport, {
|
|
382
391
|
to: "body",
|
|
383
392
|
}, [
|
|
384
|
-
this.
|
|
393
|
+
this.isMenuRendered && h("div", null, [
|
|
385
394
|
h(
|
|
386
395
|
this.dropdownTag,
|
|
387
396
|
this.dropdownAttributesLocal,
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computed,
|
|
3
|
+
h, toRef,
|
|
4
|
+
} from "vue";
|
|
5
|
+
|
|
6
|
+
import AFiltersAPI from "../compositionAPI/AFiltersAPI";
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: "AProgress",
|
|
10
|
+
props: {
|
|
11
|
+
min: {
|
|
12
|
+
type: Number,
|
|
13
|
+
required: false,
|
|
14
|
+
default: 0,
|
|
15
|
+
},
|
|
16
|
+
max: {
|
|
17
|
+
type: Number,
|
|
18
|
+
required: false,
|
|
19
|
+
default: 100,
|
|
20
|
+
},
|
|
21
|
+
value: {
|
|
22
|
+
type: Number,
|
|
23
|
+
required: false,
|
|
24
|
+
default: 0,
|
|
25
|
+
},
|
|
26
|
+
isInteger: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
required: false,
|
|
29
|
+
},
|
|
30
|
+
isValueVisible: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
required: false,
|
|
33
|
+
default: true,
|
|
34
|
+
},
|
|
35
|
+
classProgressBar: {
|
|
36
|
+
type: [String, Object],
|
|
37
|
+
required: false,
|
|
38
|
+
default: undefined,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
setup(props) {
|
|
42
|
+
const {
|
|
43
|
+
filterCurrency,
|
|
44
|
+
} = AFiltersAPI();
|
|
45
|
+
|
|
46
|
+
const isInteger = toRef(props, "isInteger");
|
|
47
|
+
const value = toRef(props, "value");
|
|
48
|
+
const valuePercent = computed(() => {
|
|
49
|
+
if (isInteger.value) {
|
|
50
|
+
return filterCurrency(value.value, {
|
|
51
|
+
suffix: "%",
|
|
52
|
+
digits: 0,
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return filterCurrency(value.value, {
|
|
56
|
+
suffix: "%",
|
|
57
|
+
digits: 2,
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
valuePercent,
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
render() {
|
|
66
|
+
return h("div", {
|
|
67
|
+
class: "a_progress",
|
|
68
|
+
}, [
|
|
69
|
+
h("div", {
|
|
70
|
+
class: ["a_progress__bar", this.classProgressBar],
|
|
71
|
+
role: "progressbar",
|
|
72
|
+
"aria-valuenow": this.value,
|
|
73
|
+
"aria-valuemin": this.min,
|
|
74
|
+
"aria-valuemax": this.max,
|
|
75
|
+
style: {
|
|
76
|
+
width: `${ this.value }%`,
|
|
77
|
+
},
|
|
78
|
+
}, [
|
|
79
|
+
this.isValueVisible && h("span", {
|
|
80
|
+
class: "a_progress__text",
|
|
81
|
+
}, this.valuePercent),
|
|
82
|
+
]),
|
|
83
|
+
]);
|
|
84
|
+
},
|
|
85
|
+
};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
|
|
5
1
|
.a_dropdown {
|
|
6
2
|
display: inline-block;
|
|
7
3
|
position: relative;
|
|
@@ -51,9 +47,9 @@
|
|
|
51
47
|
border: var(--a_dropdown_border_width) solid var(--a_dropdown_border_color);
|
|
52
48
|
border-radius: var(--a_dropdown_border_radius);
|
|
53
49
|
overflow-x: auto;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
&:not([data-popper-placement]) {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
57
53
|
}
|
|
58
54
|
.a_dropdown__item {
|
|
59
55
|
display: block;
|
|
@@ -9,7 +9,7 @@ import UiMixinProps from "../mixins/UiMixinProps";
|
|
|
9
9
|
|
|
10
10
|
import UiAPI from "../compositionApi/UiAPI";
|
|
11
11
|
import UiDataWithKeyIdAndLabelAPI from "../compositionApi/UiDataWithKeyIdAndLabelAPI";
|
|
12
|
-
import
|
|
12
|
+
import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
name: "ACheckbox",
|
|
@@ -47,8 +47,8 @@ export default {
|
|
|
47
47
|
},
|
|
48
48
|
setup(props, context) {
|
|
49
49
|
const {
|
|
50
|
-
|
|
51
|
-
} =
|
|
50
|
+
componentStyleHide,
|
|
51
|
+
} = UiStyleHideAPI(props);
|
|
52
52
|
|
|
53
53
|
const {
|
|
54
54
|
ariaDescribedbyLocal,
|
|
@@ -79,7 +79,7 @@ export default {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
return {
|
|
82
|
-
|
|
82
|
+
componentStyleHide,
|
|
83
83
|
|
|
84
84
|
ariaDescribedbyLocal,
|
|
85
85
|
errorsId,
|
|
@@ -95,8 +95,8 @@ export default {
|
|
|
95
95
|
};
|
|
96
96
|
},
|
|
97
97
|
render() {
|
|
98
|
-
return
|
|
99
|
-
style: this.
|
|
98
|
+
return this.isRender && h("div", {
|
|
99
|
+
style: this.componentStyleHide,
|
|
100
100
|
}, [
|
|
101
101
|
h("div", {
|
|
102
102
|
class: ["a_form_element__parent"],
|
|
@@ -9,7 +9,7 @@ import AUiComponents from "../AUiComponents";
|
|
|
9
9
|
import UiMixinProps from "../mixins/UiMixinProps";
|
|
10
10
|
|
|
11
11
|
import UiAPI from "../compositionApi/UiAPI";
|
|
12
|
-
import
|
|
12
|
+
import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
|
|
13
13
|
import { cloneDeep } from "lodash-es";
|
|
14
14
|
|
|
15
15
|
export default {
|
|
@@ -32,8 +32,8 @@ export default {
|
|
|
32
32
|
const componentTypesMapping = AUiComponents;
|
|
33
33
|
|
|
34
34
|
const {
|
|
35
|
-
|
|
36
|
-
} =
|
|
35
|
+
componentStyleHide,
|
|
36
|
+
} = UiStyleHideAPI(props);
|
|
37
37
|
|
|
38
38
|
const {
|
|
39
39
|
ariaDescribedbyLocal,
|
|
@@ -56,7 +56,7 @@ export default {
|
|
|
56
56
|
componentTypesMapping,
|
|
57
57
|
onUpdateModelLocal,
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
componentStyleHide,
|
|
60
60
|
|
|
61
61
|
ariaDescribedbyLocal,
|
|
62
62
|
changeModel,
|
|
@@ -68,8 +68,8 @@ export default {
|
|
|
68
68
|
};
|
|
69
69
|
},
|
|
70
70
|
render() {
|
|
71
|
-
return
|
|
72
|
-
style: this.
|
|
71
|
+
return this.isRender && h("div", {
|
|
72
|
+
style: this.componentStyleHide,
|
|
73
73
|
}, [
|
|
74
74
|
h("fieldset", {
|
|
75
75
|
id: this.htmlIdLocal,
|
package/src/ui/AInput/AInput.js
CHANGED
|
@@ -16,7 +16,7 @@ import UiMixinProps from "../mixins/UiMixinProps";
|
|
|
16
16
|
|
|
17
17
|
import UiAPI from "../compositionApi/UiAPI";
|
|
18
18
|
import UiClearButtonAPI from "../compositionApi/UiClearButtonAPI";
|
|
19
|
-
import
|
|
19
|
+
import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
|
|
20
20
|
|
|
21
21
|
export default {
|
|
22
22
|
name: "AInput",
|
|
@@ -51,8 +51,8 @@ export default {
|
|
|
51
51
|
},
|
|
52
52
|
setup(props, context) {
|
|
53
53
|
const {
|
|
54
|
-
|
|
55
|
-
} =
|
|
54
|
+
componentStyleHide,
|
|
55
|
+
} = UiStyleHideAPI(props);
|
|
56
56
|
|
|
57
57
|
const {
|
|
58
58
|
ariaDescribedbyLocal,
|
|
@@ -101,7 +101,7 @@ export default {
|
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
return {
|
|
104
|
-
|
|
104
|
+
componentStyleHide,
|
|
105
105
|
|
|
106
106
|
ariaDescribedbyLocal,
|
|
107
107
|
clearModel,
|
|
@@ -122,8 +122,8 @@ export default {
|
|
|
122
122
|
};
|
|
123
123
|
},
|
|
124
124
|
render() {
|
|
125
|
-
return
|
|
126
|
-
style: this.
|
|
125
|
+
return this.isRender && h("div", {
|
|
126
|
+
style: this.componentStyleHide,
|
|
127
127
|
}, [
|
|
128
128
|
h("div", {
|
|
129
129
|
class: ["a_form_element__parent", {
|
|
@@ -9,7 +9,7 @@ import AErrorsText from "../AErrorsText/AErrorsText";
|
|
|
9
9
|
import UiMixinProps from "../mixins/UiMixinProps";
|
|
10
10
|
|
|
11
11
|
import UiAPI from "../compositionApi/UiAPI";
|
|
12
|
-
import
|
|
12
|
+
import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
|
|
13
13
|
|
|
14
14
|
const KEY_CODE_SPACE = 32;
|
|
15
15
|
|
|
@@ -30,8 +30,8 @@ export default {
|
|
|
30
30
|
},
|
|
31
31
|
setup(props, context) {
|
|
32
32
|
const {
|
|
33
|
-
|
|
34
|
-
} =
|
|
33
|
+
componentStyleHide,
|
|
34
|
+
} = UiStyleHideAPI(props);
|
|
35
35
|
|
|
36
36
|
const {
|
|
37
37
|
ariaDescribedbyLocal,
|
|
@@ -73,7 +73,7 @@ export default {
|
|
|
73
73
|
};
|
|
74
74
|
|
|
75
75
|
return {
|
|
76
|
-
|
|
76
|
+
componentStyleHide,
|
|
77
77
|
|
|
78
78
|
ariaDescribedbyLocal,
|
|
79
79
|
errorsId,
|
|
@@ -89,8 +89,8 @@ export default {
|
|
|
89
89
|
};
|
|
90
90
|
},
|
|
91
91
|
render() {
|
|
92
|
-
return
|
|
93
|
-
style: this.
|
|
92
|
+
return this.isRender && h("div", {
|
|
93
|
+
style: this.componentStyleHide,
|
|
94
94
|
}, [
|
|
95
95
|
h("div", {
|
|
96
96
|
class: ["a_form_element__parent"],
|
package/src/ui/ARadio/ARadio.js
CHANGED
|
@@ -9,7 +9,7 @@ import UiMixinProps from "../mixins/UiMixinProps";
|
|
|
9
9
|
|
|
10
10
|
import UiAPI from "../compositionApi/UiAPI";
|
|
11
11
|
import UiDataWithKeyIdAndLabelAPI from "../compositionApi/UiDataWithKeyIdAndLabelAPI";
|
|
12
|
-
import
|
|
12
|
+
import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
name: "ARadio",
|
|
@@ -52,8 +52,8 @@ export default {
|
|
|
52
52
|
},
|
|
53
53
|
setup(props, context) {
|
|
54
54
|
const {
|
|
55
|
-
|
|
56
|
-
} =
|
|
55
|
+
componentStyleHide,
|
|
56
|
+
} = UiStyleHideAPI(props);
|
|
57
57
|
|
|
58
58
|
const {
|
|
59
59
|
ariaDescribedbyLocal,
|
|
@@ -84,7 +84,7 @@ export default {
|
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
return {
|
|
87
|
-
|
|
87
|
+
componentStyleHide,
|
|
88
88
|
|
|
89
89
|
ariaDescribedbyLocal,
|
|
90
90
|
errorsId,
|
|
@@ -100,8 +100,8 @@ export default {
|
|
|
100
100
|
};
|
|
101
101
|
},
|
|
102
102
|
render() {
|
|
103
|
-
return
|
|
104
|
-
style: this.
|
|
103
|
+
return this.isRender && h("div", {
|
|
104
|
+
style: this.componentStyleHide,
|
|
105
105
|
}, [
|
|
106
106
|
h("div", {
|
|
107
107
|
class: ["a_form_element__parent"],
|
|
@@ -23,7 +23,7 @@ import ASelectSearchAPI from "./compositionAPI/ASelectSearchAPI";
|
|
|
23
23
|
import ASelectToggleAPI from "./compositionAPI/ASelectToggleAPI";
|
|
24
24
|
import UiAPI from "../compositionApi/UiAPI";
|
|
25
25
|
import UiDataWithKeyIdAndLabelAPI from "../compositionApi/UiDataWithKeyIdAndLabelAPI";
|
|
26
|
-
import
|
|
26
|
+
import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
|
|
27
27
|
|
|
28
28
|
import AKeyId from "../const/AKeyId";
|
|
29
29
|
import {
|
|
@@ -168,8 +168,8 @@ export default {
|
|
|
168
168
|
],
|
|
169
169
|
setup(props, context) {
|
|
170
170
|
const {
|
|
171
|
-
|
|
172
|
-
} =
|
|
171
|
+
componentStyleHide,
|
|
172
|
+
} = UiStyleHideAPI(props);
|
|
173
173
|
|
|
174
174
|
const {
|
|
175
175
|
ariaDescribedbyLocal,
|
|
@@ -300,7 +300,7 @@ export default {
|
|
|
300
300
|
});
|
|
301
301
|
|
|
302
302
|
return {
|
|
303
|
-
|
|
303
|
+
componentStyleHide,
|
|
304
304
|
|
|
305
305
|
ariaDescribedbyLocal,
|
|
306
306
|
clearModel,
|
|
@@ -356,8 +356,8 @@ export default {
|
|
|
356
356
|
};
|
|
357
357
|
},
|
|
358
358
|
render() {
|
|
359
|
-
return
|
|
360
|
-
style: this.
|
|
359
|
+
return this.isRender && h("div", {
|
|
360
|
+
style: this.componentStyleHide,
|
|
361
361
|
}, [
|
|
362
362
|
h("div", {
|
|
363
363
|
class: ["a_form_element__parent", {
|
|
@@ -10,7 +10,7 @@ import ALabel from "../ALabel/ALabel";
|
|
|
10
10
|
import UiMixinProps from "../mixins/UiMixinProps";
|
|
11
11
|
|
|
12
12
|
import UiAPI from "../compositionApi/UiAPI";
|
|
13
|
-
import
|
|
13
|
+
import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
|
|
14
14
|
|
|
15
15
|
const KEY_CODE_SPACE = 32;
|
|
16
16
|
|
|
@@ -63,8 +63,8 @@ export default {
|
|
|
63
63
|
},
|
|
64
64
|
setup(props, context) {
|
|
65
65
|
const {
|
|
66
|
-
|
|
67
|
-
} =
|
|
66
|
+
componentStyleHide,
|
|
67
|
+
} = UiStyleHideAPI(props);
|
|
68
68
|
|
|
69
69
|
const {
|
|
70
70
|
ariaDescribedbyLocal,
|
|
@@ -159,7 +159,7 @@ export default {
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
return {
|
|
162
|
-
|
|
162
|
+
componentStyleHide,
|
|
163
163
|
|
|
164
164
|
ariaDescribedbyLocal,
|
|
165
165
|
clearModel,
|
|
@@ -179,8 +179,8 @@ export default {
|
|
|
179
179
|
};
|
|
180
180
|
},
|
|
181
181
|
render() {
|
|
182
|
-
return
|
|
183
|
-
style: this.
|
|
182
|
+
return this.isRender && h("div", {
|
|
183
|
+
style: this.componentStyleHide,
|
|
184
184
|
}, [
|
|
185
185
|
h("div", {
|
|
186
186
|
class: ["a_form_element__parent", {
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
|
|
7
7
|
import UiMixinProps from "../mixins/UiMixinProps";
|
|
8
8
|
|
|
9
|
+
import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
|
|
10
|
+
|
|
9
11
|
export default {
|
|
10
12
|
name: "ATemplate",
|
|
11
13
|
mixins: [
|
|
@@ -24,6 +26,10 @@ export default {
|
|
|
24
26
|
},
|
|
25
27
|
},
|
|
26
28
|
setup(props) {
|
|
29
|
+
const {
|
|
30
|
+
componentStyleHide,
|
|
31
|
+
} = UiStyleHideAPI(props);
|
|
32
|
+
|
|
27
33
|
const html = toRef(props, "html");
|
|
28
34
|
const attributesWithHtml = computed(() => {
|
|
29
35
|
const ATTRIBUTES = {};
|
|
@@ -34,14 +40,20 @@ export default {
|
|
|
34
40
|
});
|
|
35
41
|
|
|
36
42
|
return {
|
|
43
|
+
componentStyleHide,
|
|
44
|
+
|
|
37
45
|
attributesWithHtml,
|
|
38
46
|
};
|
|
39
47
|
},
|
|
40
48
|
render() {
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
return this.isRender && h("div", {
|
|
50
|
+
style: this.componentStyleHide,
|
|
51
|
+
}, [
|
|
52
|
+
h("div", {
|
|
53
|
+
class: "a_template",
|
|
54
|
+
...this.attributesWithHtml,
|
|
55
|
+
}, this.$slots[this.slotName] &&
|
|
56
|
+
this.$slots[this.slotName]())
|
|
57
|
+
]);
|
|
46
58
|
},
|
|
47
59
|
};
|
|
@@ -17,7 +17,7 @@ import UiMixinProps from "../mixins/UiMixinProps";
|
|
|
17
17
|
|
|
18
18
|
import UiAPI from "../compositionApi/UiAPI";
|
|
19
19
|
import UiClearButtonAPI from "../compositionApi/UiClearButtonAPI";
|
|
20
|
-
import
|
|
20
|
+
import UiStyleHideAPI from "../compositionApi/UiStyleHideAPI";
|
|
21
21
|
|
|
22
22
|
import autosize from "../../utils/autosize";
|
|
23
23
|
|
|
@@ -53,8 +53,8 @@ export default {
|
|
|
53
53
|
},
|
|
54
54
|
setup(props, context) {
|
|
55
55
|
const {
|
|
56
|
-
|
|
57
|
-
} =
|
|
56
|
+
componentStyleHide,
|
|
57
|
+
} = UiStyleHideAPI(props);
|
|
58
58
|
|
|
59
59
|
const {
|
|
60
60
|
ariaDescribedbyLocal,
|
|
@@ -135,7 +135,7 @@ export default {
|
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
return {
|
|
138
|
-
|
|
138
|
+
componentStyleHide,
|
|
139
139
|
|
|
140
140
|
ariaDescribedbyLocal,
|
|
141
141
|
changeModel,
|
|
@@ -157,7 +157,9 @@ export default {
|
|
|
157
157
|
};
|
|
158
158
|
},
|
|
159
159
|
render() {
|
|
160
|
-
return
|
|
160
|
+
return this.isRender && h("div", {
|
|
161
|
+
style: this.componentStyleHide,
|
|
162
|
+
}, [
|
|
161
163
|
h("div", {
|
|
162
164
|
class: ["a_form_element__parent", {
|
|
163
165
|
a_form_element__parent_float: this.isLabelFloat,
|
|
@@ -9,8 +9,9 @@ import {
|
|
|
9
9
|
isPlainObject,
|
|
10
10
|
} from "lodash-es";
|
|
11
11
|
|
|
12
|
-
export default function
|
|
12
|
+
export default function UiStyleHideAPI(props) {
|
|
13
13
|
const dependencies = toRef(props, "dependencies");
|
|
14
|
+
const isHide = toRef(props, "isHide");
|
|
14
15
|
const modelDependencies = toRef(props, "modelDependencies");
|
|
15
16
|
|
|
16
17
|
const isComponentVisibleWithDependence = ({ id, value }) => {
|
|
@@ -37,11 +38,11 @@ export default function UiDependenciesAPI(props) {
|
|
|
37
38
|
return false;
|
|
38
39
|
});
|
|
39
40
|
|
|
40
|
-
const
|
|
41
|
-
return isComponentHideDependencies.value ? "display: none;" : "";
|
|
41
|
+
const componentStyleHide = computed(() => {
|
|
42
|
+
return isHide.value || isComponentHideDependencies.value ? "display: none;" : "";
|
|
42
43
|
});
|
|
43
44
|
|
|
44
45
|
return {
|
|
45
|
-
|
|
46
|
+
componentStyleHide,
|
|
46
47
|
};
|
|
47
48
|
}
|