edulogin
v1.5.0
Published
此组件默认主题颜色是`#52C9A0` ### 使用 ``` // 安装 yarn add -D @xylink/xy-file-preview --registry http://10.80.84.176:4873/
Downloads
46
Readme
@xylink/xy-file-preview
此组件默认主题颜色是#52C9A0
使用
// 安装
yarn add -D @xylink/xy-file-preview --registry http://10.80.84.176:4873/
// 引入
import FilePreview from "@xylink/xy-file-preview"
<FilePreview
fileUrl={'https://qacdtrain-res.xylinkedu.com/file/20201022/503978911969837056.png?auth_key=1603360856-1-2-fb719f7ca4660e3669e1dab6cc694a56'}
apiUrl={`https://testqa.xylinkedu.com/api/rest/v1/edu/resource/onlinePreview`}
fileName={'我是测试文件.png'}
token={'85a254da8d7c24f47a9794d743bea9ce1754f6fc280'}
resourceType={'STORAGE_CENTER'}
size={2}
resourceId={'503980768863715328'}
businessId={'503980771149611008'}
isEduManage={true}
/>
预览UI
pdf预览
参数
| 参数 | 类型 | 默认值 | 说明 | 是否必传 | :---: | :-: | :-: | :-- | :-- | | fileName | string | | 文件名 (包含后缀 xxx.mp4) | yes | | size | number | | 文件大小(大于100兆不支持预览) | | | fileUrl | string | | 文件地址 | | | resourceId | string | | 资源id | | | businessId | string | "storageId" | 资源中心传storageId 同步备课传prepareLessonId | | | resourceType | string | ""STORAGE_CENTER"" | 资源中心传"STORAGE_CENTER" ,备课传"PREPARE_LESSON" | | | token | string | | 教学平台的token标识符 | yes | | apiUrl | string | | 接口地址 | | | isShowTitle | boolean | true | 是否显示文件标题 | |