|
|
@ -11,7 +11,7 @@ |
|
|
|
<span>{{ item.label }}: </span> |
|
|
|
<span> |
|
|
|
<slot :name="`form-${item.key}`" :data="cardData"> |
|
|
|
{{ getValue(item.key) }}{{ item.suffix }} |
|
|
|
{{ getValue(item) }}{{ item.suffix }} |
|
|
|
</slot> |
|
|
|
</span> |
|
|
|
</p> |
|
|
@ -106,8 +106,12 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getValue(key) { |
|
|
|
return pathGet(this.cardData, key) ?? "-"; |
|
|
|
getValue(item) { |
|
|
|
let value = pathGet(this.cardData, item.key) ?? "-"; |
|
|
|
if (item.value) { |
|
|
|
value = item.value(this.cardData); |
|
|
|
} |
|
|
|
return value; |
|
|
|
}, |
|
|
|
|
|
|
|
onClick() { |
|
|
|