<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">
    <div class="flex justify-between">
      <div class="text-nowrap">{{ $t('keyword') }}：</div>
      <el-space class="flex-wrap">
        <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>
  </div>
</template>

<style scoped lang="scss">

</style>
