This commit is contained in:
@@ -39,40 +39,45 @@
|
|||||||
*/ -->
|
*/ -->
|
||||||
<template v-slot:body="{ items }">
|
<template v-slot:body="{ items }">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="item in items" :key="item.id">
|
<template v-if="!narrowFormat">
|
||||||
<template v-if="showSelect">
|
<tr v-for="item in items" :key="item.id">
|
||||||
<td>
|
<template v-if="showSelect">
|
||||||
<v-checkbox
|
<td>
|
||||||
v-model="selected"
|
<v-checkbox
|
||||||
:value="item"
|
v-model="selected"
|
||||||
primary
|
:value="item"
|
||||||
hide-details
|
primary
|
||||||
></v-checkbox>
|
hide-details
|
||||||
|
></v-checkbox>
|
||||||
|
</td>
|
||||||
|
</template>
|
||||||
|
<td v-for="c in item.columns" :key="c.key">
|
||||||
|
<!-- Handle all plain text types right up to and including enums -->
|
||||||
|
<!--TODO when get to coloured stuff will need to add that as a prop to column data but leaving out for now-->
|
||||||
|
<template v-if="c.t < 11">
|
||||||
|
<template v-if="c.i">
|
||||||
|
<!-- openable object with an ID -->
|
||||||
|
<v-btn depressed small @click="btnClick(c.key, c.i)">{{
|
||||||
|
c.v
|
||||||
|
}}</v-btn>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
{{ c.v }}
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-if="c.t == 11">
|
||||||
|
<a :href="'mailto:' + c.v">{{ c.v }}</a>
|
||||||
|
</template>
|
||||||
|
<template v-if="c.t == 12">
|
||||||
|
<!-- Expects full url with protocol etc in c.v so might need to add to record builder -->
|
||||||
|
<a :href="c.v" target="_blank">{{ c.v }}</a>
|
||||||
|
</template>
|
||||||
</td>
|
</td>
|
||||||
</template>
|
</tr>
|
||||||
<td v-for="c in item.columns" :key="c.key">
|
</template>
|
||||||
<!-- Handle all plain text types right up to and including enums -->
|
<template v-else>
|
||||||
<!--TODO when get to coloured stuff will need to add that as a prop to column data but leaving out for now-->
|
<!-- Narrow width template -->
|
||||||
<template v-if="c.t < 11">
|
</template>
|
||||||
<template v-if="c.i">
|
|
||||||
<!-- openable object with an ID -->
|
|
||||||
<v-btn depressed small @click="btnClick(c.key, c.i)">{{
|
|
||||||
c.v
|
|
||||||
}}</v-btn>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
{{ c.v }}
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
<template v-if="c.t == 11">
|
|
||||||
<a :href="'mailto:' + c.v">{{ c.v }}</a>
|
|
||||||
</template>
|
|
||||||
<template v-if="c.t == 12">
|
|
||||||
<!-- Expects full url with protocol etc in c.v so might need to add to record builder -->
|
|
||||||
<a :href="c.v" target="_blank">{{ c.v }}</a>
|
|
||||||
</template>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</template>
|
</template>
|
||||||
</v-data-table>
|
</v-data-table>
|
||||||
@@ -104,7 +109,8 @@ export default {
|
|||||||
totalRecords: 0,
|
totalRecords: 0,
|
||||||
records: [],
|
records: [],
|
||||||
rowsPerPageItems: [5, 10, 25, 50, 100],
|
rowsPerPageItems: [5, 10, 25, 50, 100],
|
||||||
selected: []
|
selected: [],
|
||||||
|
narrowFormat: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
Reference in New Issue
Block a user