@bildvitta/quasar-ui-asteroid 2.15.0 → 2.16.0
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/components/grid-generator/QasGridGenerator.stories.js +4 -0
- package/src/components/grid-generator/QasGridGenerator.vue +6 -3
- package/src/components/table-generator/QasTableGenerator.stories.js +4 -0
- package/src/components/table-generator/QasTableGenerator.vue +6 -1
- package/src/helpers/filters.js +1 -1
package/package.json
CHANGED
|
@@ -38,6 +38,11 @@ export default {
|
|
|
38
38
|
type: Boolean
|
|
39
39
|
},
|
|
40
40
|
|
|
41
|
+
emptyResultText: {
|
|
42
|
+
default: '-',
|
|
43
|
+
type: String
|
|
44
|
+
},
|
|
45
|
+
|
|
41
46
|
result: {
|
|
42
47
|
default: () => ({}),
|
|
43
48
|
type: Object
|
|
@@ -76,16 +81,14 @@ export default {
|
|
|
76
81
|
resultsByFields () {
|
|
77
82
|
const formattedResult = {}
|
|
78
83
|
const result = extend(true, {}, this.result)
|
|
79
|
-
|
|
80
84
|
for (const key in result) {
|
|
81
85
|
if (this.formattedFields[key]?.type) {
|
|
82
|
-
formattedResult[key] = humanize(this.formattedFields[key], result[key])
|
|
86
|
+
formattedResult[key] = humanize(this.formattedFields[key], result[key]) || this.emptyResultText
|
|
83
87
|
// TODO: Rever.
|
|
84
88
|
// eslint-disable-next-line vue/no-side-effects-in-computed-properties
|
|
85
89
|
this.slotValue[key] = { ...this.formattedFields[key], formattedResult: formattedResult[key] }
|
|
86
90
|
}
|
|
87
91
|
}
|
|
88
|
-
|
|
89
92
|
return formattedResult
|
|
90
93
|
}
|
|
91
94
|
}
|
|
@@ -43,6 +43,11 @@ export default {
|
|
|
43
43
|
rowKey: {
|
|
44
44
|
default: 'name',
|
|
45
45
|
type: String
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
emptyResultText: {
|
|
49
|
+
default: '-',
|
|
50
|
+
type: String
|
|
46
51
|
}
|
|
47
52
|
},
|
|
48
53
|
|
|
@@ -114,7 +119,7 @@ export default {
|
|
|
114
119
|
return results.map((result, index) => {
|
|
115
120
|
for (const key in result) {
|
|
116
121
|
result.default = this.results[index]
|
|
117
|
-
result[key] = humanize(this.fields[key], result[key])
|
|
122
|
+
result[key] = humanize(this.fields[key], result[key]) || this.emptyResultText
|
|
118
123
|
}
|
|
119
124
|
|
|
120
125
|
return result
|