123456789101112131415161718192021222324252627282930313233343536 |
- <template>
- <nuxt-link v-if="instation" :to="path">{{content}}</nuxt-link>
- <a :href="path" :target="target" v-else>{{content}}</a>
- </template>
- <script>
- export default {
- name: 'mta-link',
- props: {
- path: {
- required: true,
- type: String,
- default: '/',
- },
- instation: {
- type: Boolean,
- default: true
- },
- target: {
- type: String,
- default: '_self',
- validator: function(value) {
- return ['_blank', '_self', '_parent', '_top'].indexOf(value) !== -1
- }
- },
- content: {
- type: String,
- required: true
- }
- },
- };
- </script>
- <style scoped>
- </style>
|