Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
digitalPerson-fe
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
digitalPerson
digitalPerson-fe
Commits
81595922
You need to sign in or sign up before continuing.
Commit
81595922
authored
Sep 30, 2024
by
nick zheng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'beta' into 'master'
fix: 数字人对话上传背景显示完整名称 See merge request
!9
parents
d0a98947
84be0601
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
background-images.vue
...alogue-detail/components/background/background-images.vue
+22
-11
No files found.
src/views/dialogue-detail/components/background/background-images.vue
View file @
81595922
...
...
@@ -71,7 +71,7 @@ async function handleSearchImageList(searchNameValue: string) {
async
function
uploadImage
(
event
:
any
)
{
const
e
=
window
.
event
||
event
const
file
=
e
.
target
.
files
[
0
]
const
fileName
=
file
.
name
.
substring
(
0
,
file
.
name
.
lastIndexOf
(
'.'
))
const
fileName
=
file
.
name
const
maxImageSize
=
1024
*
1024
*
3
if
(
!
[
'png'
,
'jpg'
,
'jpeg'
].
includes
(
file
.
type
.
split
(
'/'
)[
1
]))
{
...
...
@@ -181,11 +181,16 @@ function handleUpdateBackgroundImageType(backgroundImageType: string) {
@
click=
"handleClickImage(image)"
>
<img
class=
"h-full w-full object-contain"
:src=
"image.imageUrl"
@
load=
"onImageLoaded(index)"
/>
<div
class=
"absolute bottom-0 line-clamp-1 h-5 w-full break-all bg-gradient-to-t from-gray-600 px-1 text-xs leading-5 text-white"
>
{{ image.imageName }}
</div>
<NPopover
trigger=
"hover"
placement=
"bottom"
>
<
template
#
trigger
>
<div
class=
"absolute bottom-0 line-clamp-1 h-5 w-full break-all bg-gradient-to-t from-gray-600 px-1 text-xs leading-5 text-white"
>
{{
image
.
imageName
}}
</div>
</
template
>
<span
class=
"text-xs"
>
{{ image.imageName }}
</span>
</NPopover>
<div
class=
"absolute right-1 top-1 hidden h-7 w-7 cursor-pointer items-center justify-center rounded-md bg-black/40 p-1 group-hover:flex"
@
click
.
stop=
"handleDelete(image.id!)"
...
...
@@ -214,11 +219,17 @@ function handleUpdateBackgroundImageType(backgroundImageType: string) {
@
click=
"handleClickImage(image)"
>
<img
class=
"h-full w-full object-contain"
:src=
"image.imageUrl"
@
load=
"onImageLoaded(index)"
/>
<div
class=
"absolute bottom-0 line-clamp-1 h-5 w-full break-all bg-gradient-to-t from-gray-600 px-1 text-xs leading-5 text-white"
>
{{ image.imageName }}
</div>
<NPopover
trigger=
"hover"
placement=
"bottom"
>
<
template
#
trigger
>
<div
class=
"absolute bottom-0 line-clamp-1 h-5 w-full break-all bg-gradient-to-t from-gray-600 px-1 text-xs leading-5 text-white"
>
{{
image
.
imageName
}}
</div>
</
template
>
<span
class=
"text-xs"
>
{{ image.imageName }}
</span>
</NPopover>
<CustomIcon
v-if=
"currentBackgroundUrl === image.imageUrl"
icon=
"si-glyph:checked"
...
...
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