aloha-vue 1.0.334 → 1.0.336
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
CHANGED
|
@@ -25,6 +25,9 @@ export function isPlaceholderTranslate(text = "") {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export function getTranslatedText({ placeholder, translationObj = translation.value, extra }) {
|
|
28
|
+
if (!translationObj) {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
28
31
|
const TEXT_FROM_TRANSLATION = isNil(translationObj[placeholder]) ? placeholder : translationObj[placeholder];
|
|
29
32
|
|
|
30
33
|
if (extra) {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isFunction,
|
|
3
|
+
} from "lodash-es";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
// called before bound element's attributes
|
|
7
|
+
// or event listeners are applied
|
|
8
|
+
created(el, binding) {
|
|
9
|
+
if (isFunction(binding.value?.created)) {
|
|
10
|
+
binding.value.created();
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
// called right before the element is inserted into the DOM.
|
|
14
|
+
beforeMount(el, binding) {
|
|
15
|
+
if (isFunction(binding.value?.beforeMount)) {
|
|
16
|
+
binding.value.beforeMount();
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
// called when the bound element's parent component
|
|
20
|
+
// and all its children are mounted.
|
|
21
|
+
mounted(el, binding) {
|
|
22
|
+
if (isFunction(binding.value?.mounted)) {
|
|
23
|
+
binding.value.mounted();
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
// called before the parent component is unmounted
|
|
27
|
+
beforeUnmount(el, binding) {
|
|
28
|
+
if (isFunction(binding.value?.beforeUnmount)) {
|
|
29
|
+
binding.value.beforeUnmount();
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
// called when the parent component is unmounted
|
|
33
|
+
unmounted(el, binding) {
|
|
34
|
+
if (isFunction(binding.value?.unmounted)) {
|
|
35
|
+
binding.value.unmounted();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|