增加了自动化视频以及修复了一些已知漏洞 (#1554)

* 解决bug:为角色添加权限时,如果有重复api权限,该角色所有权限均添加失败(包括登录)

* 支持视频上传和选用。视频首帧作为封面预览。

* 增加自动化代码视频选项

* 媒体库可上传视频
SelectImage组件增加参数file-type="image|video" 方便用户对媒体库可选内容做限制

* 自动化代码bug修复

---------

Co-authored-by: liuyahui <liuyahui@wjacloud.com>
Co-authored-by: Alan <alan.cd@qq.com>
This commit is contained in:
奇淼(piexlmax
2023-09-24 15:49:58 +08:00
committed by GitHub
co-authored by liuyahui Alan
parent c1c37901b5
commit 809e2496c0
12 changed files with 248 additions and 50 deletions
+6
View File
@@ -93,3 +93,9 @@ export default class ImageCompress {
const path = import.meta.env.VITE_FILE_API + '/'
export const getUrl = (url) => url && url.slice(0, 4) !== 'http' ? path + url : url
export const isVideoExt = (url) => url.endsWith('.mp4') || url.endsWith('.mov') || url.endsWith('.webm') || url.endsWith('.ogg');
export const isVideoMime = (type) => type == 'video/mp4' || type == 'video/webm' || type == 'video/ogg';
export const isImageMime = (type) => type == 'image/jpeg' || type == 'image/png' || type == 'image/webp' || type == 'image/svg+xml';