2018-08-27 04:42:45 +00:00
|
|
|
<template>
|
2019-01-30 12:10:40 +00:00
|
|
|
<p class="text-muted" v-if="!Array.isArray(this.header_items)" v-html="header_items"></p>
|
|
|
|
<p class="text-muted" v-else>
|
|
|
|
<span v-for="(header_item , index) in header_items" :key="index">
|
|
|
|
<span v-if="index" v-html="spacer"></span>
|
|
|
|
<span v-if="typeof(header_item) == 'string'" v-html="header_item"></span>
|
|
|
|
<a v-else-if="typeof(header_item) == 'object'" @click="header_item.on_click(header_item.value)" v-html="header_item.value"></a>
|
|
|
|
</span>
|
|
|
|
</p>
|
2018-08-27 04:42:45 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
const spacer = '<span aria-hidden="true"> · </span>';
|
|
|
|
|
|
|
|
export default {
|
2018-08-27 05:19:42 +00:00
|
|
|
name: 'detail-header-item',
|
2018-08-27 04:42:45 +00:00
|
|
|
props: ['value'],
|
|
|
|
data() {
|
|
|
|
return {
|
2019-01-30 12:10:40 +00:00
|
|
|
header_items: this.value,
|
|
|
|
spacer: spacer
|
2018-08-27 04:42:45 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
</script>
|