Add Ticket and a HeaderlessKeyValueTable
This commit is contained in:
parent
a400c7210c
commit
81ae89697f
23
src/Ticket.vue
Normal file
23
src/Ticket.vue
Normal file
|
@ -0,0 +1,23 @@
|
|||
<template>
|
||||
<div class="single-ticket">
|
||||
<h2>Ticket "ding"</h2>
|
||||
<HeaderlessKeyValueTable :data-rows="{Name: 'Bernd', Status: 'Offen', Ablaufdatum: 'gestern'}" />
|
||||
<br>
|
||||
<label for="descripton">Beschreibung</label>
|
||||
<textarea id="descripton" v-model="description" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HeaderlessKeyValueTable from './components/HeaderlessKeyValueTable'
|
||||
export default {
|
||||
name: 'Ticket',
|
||||
components: { HeaderlessKeyValueTable },
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
textarea {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
34
src/components/HeaderlessKeyValueTable.vue
Normal file
34
src/components/HeaderlessKeyValueTable.vue
Normal file
|
@ -0,0 +1,34 @@
|
|||
<template>
|
||||
<table>
|
||||
<tr v-for="(value, key, i) in dataRows" :key="i">
|
||||
<td>{{ key }}</td>
|
||||
<td>{{ value }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HeaderlessKeyValueTable',
|
||||
props: {
|
||||
dataRows: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom: solid #000 1px;
|
||||
}
|
||||
|
||||
tr:nth-child(2n) {
|
||||
background: #f0f0f0;
|
||||
}
|
||||
</style>
|
Loading…
Reference in a new issue