it-tools/components/Tool.vue
2021-02-13 19:55:45 +01:00

31 lines
672 B
Vue

<script lang="ts">
import {Component, Vue} from 'nuxt-property-decorator'
import ToolWrapper from '~/components/ToolWrapper.vue'
import {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>