Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
basic-uniapp-v3
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-uniapp-v3
Commits
a0b1c8e9
提交
a0b1c8e9
authored
3月 08, 2023
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 优化视频上传组件,增加占位区允许控制 video 是否显示,解决原生组件层级过高覆盖问题
上级
535b1b1d
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
17 行增加
和
1 行删除
+17
-1
fui-upload-video.vue
src/components/firstui/fui-upload-video/fui-upload-video.vue
+17
-1
没有找到文件。
src/components/firstui/fui-upload-video/fui-upload-video.vue
浏览文件 @
a0b1c8e9
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
<view
class=
"fui-uploadv__wrap"
>
<view
class=
"fui-uploadv__wrap"
>
<view
class=
"fui-uploadv__item"
:style=
"
{width:width+'rpx',height:height+'rpx'}" v-for="(item,index) in urls"
<view
class=
"fui-uploadv__item"
:style=
"
{width:width+'rpx',height:height+'rpx'}" v-for="(item,index) in urls"
:key="index">
:key="index">
<view
:style=
"
{width:width+'rpx',height:height-(isView?0:40)+'rpx',background:'#000'}" v-if="!showVideo">
</view>
<video
class=
"fui-upload__video"
:style=
"
{width:width+'rpx',height:height-(isView?0:40)+'rpx'}"
<video
class=
"fui-upload__video"
:style=
"
{width:width+'rpx',height:height-(isView?0:40)+'rpx'}"
:src="getVideoSrc(item)">
</video>
:src="getVideoSrc(item)"
v-if="showVideo"
>
</video>
<view
class=
"fui-uploadv__del-wrap"
:style=
"
{width:width+'rpx'}" v-if="!isView">
<view
class=
"fui-uploadv__del-wrap"
:style=
"
{width:width+'rpx'}" v-if="!isView">
<view
class=
"fui-uploadv__flex-row"
@
tap
.
stop=
"reUpload(index)"
>
<view
class=
"fui-uploadv__flex-row"
@
tap
.
stop=
"reUpload(index)"
>
<fui-icon
name=
"checkbox"
color=
"#fff"
:size=
"32"
v-if=
"progress[index]===100"
></fui-icon>
<fui-icon
name=
"checkbox"
color=
"#fff"
:size=
"32"
v-if=
"progress[index]===100"
></fui-icon>
...
@@ -49,6 +50,11 @@
...
@@ -49,6 +50,11 @@
type
:
[
Number
,
String
],
type
:
[
Number
,
String
],
default
:
320
default
:
320
},
},
// 防止原生组件层级问题的视频显示
hideVideo
:
{
type
:
Boolean
,
default
:
false
},
fileList
:
{
fileList
:
{
type
:
Array
,
type
:
Array
,
default
()
{
default
()
{
...
@@ -146,6 +152,7 @@
...
@@ -146,6 +152,7 @@
//preupload、uploading、success、error
//preupload、uploading、success、error
status
:
[],
status
:
[],
progress
:
[],
progress
:
[],
showVideo
:
true
,
};
};
},
},
created
()
{
created
()
{
...
@@ -154,6 +161,15 @@
...
@@ -154,6 +161,15 @@
watch
:
{
watch
:
{
fileList
(
vals
)
{
fileList
(
vals
)
{
this
.
initData
(
vals
)
this
.
initData
(
vals
)
},
hideVideo
(
value
)
{
if
(
value
)
{
this
.
showVideo
=
false
}
else
{
setTimeout
(()
=>
{
this
.
showVideo
=
true
},
300
)
}
}
}
},
},
computed
:
{
computed
:
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论