@hostlink/nuxt-light 1.46.4 → 1.46.6
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/dist/module.json
CHANGED
|
@@ -21,14 +21,15 @@ function getTo(field) {
|
|
|
21
21
|
}
|
|
22
22
|
return null;
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
const getFieldValue = (field) => {
|
|
25
|
+
const model = props.modelValue;
|
|
26
|
+
if (field.field) {
|
|
27
|
+
if (field.field instanceof Function) {
|
|
28
|
+
return field.field(model);
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
;
|
|
31
|
-
return
|
|
32
|
+
return model ? model[field.name] : null;
|
|
32
33
|
};
|
|
33
34
|
</script>
|
|
34
35
|
|
|
@@ -36,7 +37,7 @@ const getFormattedValue = (field, val, model) => {
|
|
|
36
37
|
<q-list v-bind="$props">
|
|
37
38
|
<template v-if="fields">
|
|
38
39
|
<l-item v-for="field in fields" :label="field.label" :to="getTo(field)">
|
|
39
|
-
{{
|
|
40
|
+
{{ getFieldValue(field) }}
|
|
40
41
|
</l-item>
|
|
41
42
|
|
|
42
43
|
</template>
|