it-tools/components/Tool.vue
2021-03-14 23:37:57 +01:00

30 lines
676 B
Vue

<script lang="ts">
import {Component, Vue} from 'nuxt-property-decorator'
import ToolWrapper from '~/components/ToolWrapper.vue'
import type {ToolConfig} from '~/types/ToolConfig'
@Component({components: {ToolWrapper}})
export default class Tool extends Vue {
config(): ToolConfig {
throw new Error('You need to specify a config() method your custom Tool.')
};
public head() {
const {title, description, keywords} = this.config()
return {
title,
meta: [
{
name: 'description',
content: description
},
{
name: 'keywords',
content: keywords
}
]
}
}
}
</script>