forked from mirrors/homebox
feat: link implementation (#100)
* link implementation * add docs for links * use btn instead of badge
This commit is contained in:
parent
97a34475c8
commit
2d34557f69
9 changed files with 120 additions and 6 deletions
|
@ -9,6 +9,14 @@
|
|||
<slot :name="detail.slot || detail.name" v-bind="{ detail }">
|
||||
<DateTime v-if="detail.type == 'date'" :date="detail.text" />
|
||||
<Currency v-else-if="detail.type == 'currency'" :amount="detail.text" />
|
||||
<template v-else-if="detail.type === 'link'">
|
||||
<div class="tooltip tooltip-primary tooltip-right" :data-tip="detail.href">
|
||||
<a class="btn btn-primary btn-xs" :href="detail.href" target="_blank">
|
||||
<Icon name="mdi-open-in-new" class="mr-2 swap-on"></Icon>
|
||||
{{ detail.text }}
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ detail.text }}
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue