<script setup lang="ts">
import {getLang} from "~/utils/common";

const props = withDefaults(
    defineProps<{
      data?: any;
    }>(),
    {}
);

const i18n = useI18n();
</script>

<template>
  <div class="tag pt-1" v-if="data">
    <el-space>
      <span>{{ $t('keyword') }}：</span>
      <el-tag v-for="(item,index) in JSON.parse(data)" :key="index"><a :href="`${i18n.locale.value == 'en' ? '/en' : ''}/tags/${item}`" target="_blank">{{ item }}</a></el-tag>
    </el-space>
  </div>
</template>

<style scoped lang="scss">

</style>
