CreateFormView
文件预览组件目前只支持,pdf,ofd,图片,xml
基本用法

示例
vue
<template>
<GicFilePreview type="xml" :base64="xml" height="600px"></GicFilePreview>
</template>
<script lang="ts" setup>
import { GicFilePreview } from'ctj-ui-next';
const xml = 'base64数据';
</script><template>
<GicFilePreview type="xml" :base64="xml" height="600px"></GicFilePreview>
</template>
<script lang="ts" setup>
import { GicFilePreview } from'ctj-ui-next';
const xml = 'base64数据';
</script>属性 Props
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| type | 文件类型(必填) | stirng | 见 FileType | -- |
| base64 | 文件 base64,base64 与 url 两个必传一个 | stirng | -- | -- |
| url | 文件 url,base64 与 url 两个必传一个 | stirng | -- | -- |
| width | 预览显示的 width | stirng/number | '100px','100%',100 | '100%' |
| height | 预览显示的 height | stirng/number | '100px','100%',100 | 500 |
说明
type FileType = 'pdf' | 'ofd' | 'xml' | 'jpg' | 'png' | 'gif' | 'svg' | 'psd' | 'bmp' | 'ico' | 'ttf' | 'woff' | 'eot' | 'iframe'