@unicom-blockchain/file-preview
TypeScript icon, indicating that this package has built-in type declarations

1.5.5 • Public • Published

FileExplorer

安装

pnpm i @unicom-blockchain/file-preview

使用

<template>
  <div>
    <FilePreview ref="previewRef"></FilePreview>
    <button @click="preview"></button>
  </div>
</template>
<script setup lang="ts">
import { FilePreview } from '@unicom-blockchain/file-preview';
import { ref } from 'vue';
const previewRef = ref<InstanceType<typeof FilePreview>>();
function preview() {
  if (previewRef.value) {
    previewRef.value.preview(
      {
        name: 'aaa.png',
        type: 'file',
        contentType: 'image/png',
      },
      new Blob(),
    );
  }
}
</script>
<style scoped></style>

Readme

Keywords

none

Package Sidebar

Install

npm i @unicom-blockchain/file-preview

Weekly Downloads

3

Version

1.5.5

License

ISC

Unpacked Size

16.7 MB

Total Files

34

Last publish

Collaborators

  • adou
  • aze275443207
  • neocn