zhengyiming
昨天 1904e70733f763109cb8e81823dad5055a8b4a0f
src/components/Table/PortraitTableWithAttachment.vue
@@ -19,7 +19,7 @@
<script setup lang="ts" generic="TAnnexItem">
import { downloadFileByUrl } from '@bole-core/core';
import { CommonAnnexTableColumns } from '@/constants';
import { ProTableV2, ProTableV2Props } from '@bole-core/components';
import { bolePreview, ProTableV2, ProTableV2Props } from '@bole-core/components';
defineOptions({
  name: 'PortraitTableWithAttachment',
@@ -43,6 +43,15 @@
const operationListBtns = [
  {
    data: {
      enCode: 'previewBtn',
      name: '查看',
    },
    emits: {
      onClick: (row) => handlePreview(row),
    },
  },
  {
    data: {
      enCode: 'downloadBtn',
      name: '下载',
    },
@@ -59,6 +68,12 @@
    downloadFileByUrl(row[props.downloadFileKey] as any);
  }
}
function handlePreview(row: TAnnexItem) {
  bolePreview({
    fileUrl: row[props.downloadFileKey] as any,
  });
}
</script>
<style lang="scss" scoped>