aloha-vue 1.0.60 → 1.0.61
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/AGet/AGet.js +9 -5
package/package.json
CHANGED
package/src/AGet/AGet.js
CHANGED
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
get,
|
|
11
11
|
isArray,
|
|
12
12
|
isFunction,
|
|
13
|
+
isNil,
|
|
13
14
|
isUndefined,
|
|
14
15
|
} from "lodash-es";
|
|
15
16
|
|
|
@@ -92,18 +93,21 @@ export default {
|
|
|
92
93
|
},
|
|
93
94
|
computed: {
|
|
94
95
|
valueLocal() {
|
|
95
|
-
|
|
96
|
-
if (
|
|
96
|
+
let value = get(this.data, this.pathLocal);
|
|
97
|
+
if (isNil(value)) {
|
|
98
|
+
value = this.defaultValue;
|
|
99
|
+
}
|
|
100
|
+
if (this.isValueEqualsWithValueThenDefaultValue(value)) {
|
|
97
101
|
return this.defaultValue;
|
|
98
102
|
}
|
|
99
103
|
if (this.filter) {
|
|
100
104
|
const FILTER_FUNCTION_NAME = `filter${ capitalize(this.filter) }`;
|
|
101
105
|
if (isFunction(this[FILTER_FUNCTION_NAME])) {
|
|
102
|
-
return this[FILTER_FUNCTION_NAME](
|
|
103
|
-
}
|
|
106
|
+
return this[FILTER_FUNCTION_NAME](value, this.filterParameters);
|
|
107
|
+
}
|
|
104
108
|
console.warn(`filter "${ FILTER_FUNCTION_NAME }" ist not defined`);
|
|
105
109
|
}
|
|
106
|
-
return
|
|
110
|
+
return value;
|
|
107
111
|
},
|
|
108
112
|
|
|
109
113
|
pathLocal() {
|