Skip to content
本页目录

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预览显示的 widthstirng/number'100px','100%',100'100%'
height预览显示的 heightstirng/number'100px','100%',100500

说明

type FileType = 'pdf' | 'ofd' | 'xml' | 'jpg' | 'png' | 'gif' | 'svg' | 'psd' | 'bmp' | 'ico' | 'ttf' | 'woff' | 'eot' | 'iframe'

预算单位软件产品开发部