<template>
  <div>
    <template v-for="(attachment,index) in rows">
      <p :key="attachment.id">
        <el-tooltip class="item" effect="dark" :content="$t2('预览', 'system.button.preview')" placement="top"
                    :enterable="false">
          <a
            :key="attachment.id"
            href="javascript:void(0);"
            class="a-link"
            style="font-weight:bold; text-decoration: underline"
            @click="$baseFilePreview(rows,index)"
          >
            {{ attachment.name }}
          </a>
        </el-tooltip>
        <el-tooltip class="item" effect="dark" :content="$t2('下载', 'system.button.preview')" placement="top"
                    :enterable="false">
          <a
            href="javascript:void(0);"
            class="a-link"
            @click="$commonFileUtil.downloadFile(attachment.domain + attachment.url, attachment.name)"
          >
            <i class="el-icon-download"></i>
          </a>
        </el-tooltip>

      </p>
    </template>
  </div>
</template>

<script>
export default {
  name: "attachmentShowList",
  props: {
    rows: Array
  }
}
</script>

<style scoped>

</style>
