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