This repository has been archived on 2022-10-05. You can view files and clone it, but cannot push or open issues or pull requests.
assetLabelGen/App.vue

27 lines
698 B
Vue
Raw Normal View History

<template>
<div>
<AssetLabel
v-for="asset in assets.rows.filter(t => t.name !== '')"
:asset="asset"
:key="asset.id"
>
<component :is="asset.category.name + 'LabelText'" :asset="asset" />
</AssetLabel>
</div>
</template>
<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator';
import snipeit from './snipeit';
import AssetLabel from './AssetLabel.vue';
import ComputersLabelText from './ComputersLabelText.vue';
import assets from './computers.json';
@Component({ components: { AssetLabel, ComputersLabelText } })
export default class App extends Vue {
assets: { rows: [snipeit.Hardware]; total: number } = assets;
}
</script>