Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage-go
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tracing
source-trace-manage-go
Commits
01e78834
Commit
01e78834
authored
Sep 28, 2021
by
zL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:阻止事件冒泡
parent
83561fae
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
20 deletions
+63
-20
AudioForm.vue
src/components/editTemplate/form/AudioForm.vue
+20
-7
ImageForm.vue
src/components/editTemplate/form/ImageForm.vue
+19
-2
VideoForm.vue
src/components/editTemplate/form/VideoForm.vue
+24
-11
No files found.
src/components/editTemplate/form/AudioForm.vue
View file @
01e78834
...
@@ -80,12 +80,25 @@ export default {
...
@@ -80,12 +80,25 @@ export default {
this
.
showAudio
=
true
;
this
.
showAudio
=
true
;
},
},
deleteAudios
(
index
)
{
deleteAudios
(
index
)
{
this
.
localHash
.
splice
(
index
,
1
);
this
.
$confirm
(
"此操作将永久删除该文件, 是否继续?"
,
"提示"
,
{
this
.
localObjects
.
splice
(
index
,
1
);
confirmButtonText
:
"确定"
,
this
.
$message
({
cancelButtonText
:
"取消"
,
type
:
"success"
,
type
:
"warning"
,
message
:
"删除成功!"
,
})
});
.
then
(()
=>
{
this
.
localHash
.
splice
(
index
,
1
);
this
.
localObjects
.
splice
(
index
,
1
);
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
});
});
},
},
// 上传文件
// 上传文件
upFile
()
{
upFile
()
{
...
@@ -180,7 +193,7 @@ export default {
...
@@ -180,7 +193,7 @@ export default {
line-height: 36px;
line-height: 36px;
color: rgba(121, 125, 132, 1);
color: rgba(121, 125, 132, 1);
background: #f6f6f7;
background: #f6f6f7;
border: 1px solid #
DCDFE
6;
border: 1px solid #
dcdfe
6;
.iconyinpin2 {
.iconyinpin2 {
font-size: 24px;
font-size: 24px;
vertical-align: sub;
vertical-align: sub;
...
...
src/components/editTemplate/form/ImageForm.vue
View file @
01e78834
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<img
class=
"list-item-img"
:src=
"item.url || item.dataUrl"
/>
<img
class=
"list-item-img"
:src=
"item.url || item.dataUrl"
/>
<i
<i
class=
"iconfont iconshanchu3"
class=
"iconfont iconshanchu3"
@
click=
"deleteimg(item, index)"
@
click
.
stop
=
"deleteimg(item, index)"
></i>
></i>
</div>
</div>
<div
class=
"add_wrapper"
>
<div
class=
"add_wrapper"
>
...
@@ -122,7 +122,24 @@ export default class ImageForm extends Vue {
...
@@ -122,7 +122,24 @@ export default class ImageForm extends Vue {
}
}
// 删除图片
// 删除图片
deleteimg
(
item
:
any
,
index
:
number
)
{
deleteimg
(
item
:
any
,
index
:
number
)
{
this
.
imageInfo
.
imgList
.
splice
(
index
,
1
);
this
.
$confirm
(
"此操作将永久删除该文件, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
this
.
imageInfo
.
imgList
.
splice
(
index
,
1
);
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
});
});
}
}
public
fileChange
(
e
:
any
)
{
public
fileChange
(
e
:
any
)
{
const
file
:
File
=
e
.
target
.
files
[
0
];
const
file
:
File
=
e
.
target
.
files
[
0
];
...
...
src/components/editTemplate/form/VideoForm.vue
View file @
01e78834
...
@@ -32,11 +32,7 @@
...
@@ -32,11 +32,7 @@
@
change=
"fileChange"
@
change=
"fileChange"
/>
/>
<!-- 视频预览 -->
<!-- 视频预览 -->
<common-dialog
<common-dialog
v-if=
"showVideo"
@
closePopup=
"showVideo = false"
showMask
>
v-if=
"showVideo"
@
closePopup=
"showVideo = false"
showMask
>
<div>
<div>
<video
controls=
"controls"
style=
"outline: none"
:src=
"Vurl"
></video>
<video
controls=
"controls"
style=
"outline: none"
:src=
"Vurl"
></video>
</div>
</div>
...
@@ -121,11 +117,28 @@ export default {
...
@@ -121,11 +117,28 @@ export default {
},
},
// 删除当前视频||终止上传
// 删除当前视频||终止上传
termination
(
index
)
{
termination
(
index
)
{
if
(
xhr
)
{
this
.
$confirm
(
"此操作将永久删除该文件, 是否继续?"
,
"提示"
,
{
xhr
.
abort
();
confirmButtonText
:
"确定"
,
}
cancelButtonText
:
"取消"
,
this
.
hashList
.
splice
(
index
,
1
);
type
:
"warning"
,
this
.
locaVideos
.
splice
(
index
,
1
);
})
.
then
(()
=>
{
if
(
xhr
)
{
xhr
.
abort
();
}
this
.
hashList
.
splice
(
index
,
1
);
this
.
locaVideos
.
splice
(
index
,
1
);
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
});
});
},
},
//
//
upFile
()
{
upFile
()
{
...
@@ -242,7 +255,7 @@ export default {
...
@@ -242,7 +255,7 @@ export default {
width: 151px;
width: 151px;
background: #f6f6f7;
background: #f6f6f7;
border-radius: 4px;
border-radius: 4px;
border: 1px solid #
DCDFE
6;
border: 1px solid #
dcdfe
6;
color: #353535;
color: #353535;
line-height: 36px;
line-height: 36px;
text-align: center;
text-align: center;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment