Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
AI_BOOK_TOOL
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
AI_BOOK_TOOL
Commits
19056cab
Commit
19056cab
authored
May 13, 2025
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style:
parent
3f1b1d59
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
6 deletions
+38
-6
index.css
form/index.css
+2
-2
index.js
form/index.js
+36
-4
No files found.
form/index.css
View file @
19056cab
...
@@ -585,13 +585,13 @@ html, body {
...
@@ -585,13 +585,13 @@ html, body {
/* 锁定状态下的标记样式 */
/* 锁定状态下的标记样式 */
.wavesurfer-region
[
data-id
$
=
"-start"
]
{
.wavesurfer-region
[
data-id
$
=
"-start"
]
{
background-color
:
rgba
(
0
,
255
,
0
,
0.8
)
!important
;
background-color
:
rgba
(
0
,
255
,
0
,
0.8
)
!important
;
width
:
1px
!important
;
/* width: 1px !important; */
z-index
:
5
!important
;
z-index
:
5
!important
;
}
}
.wavesurfer-region
[
data-id
$
=
"-end"
]
{
.wavesurfer-region
[
data-id
$
=
"-end"
]
{
background-color
:
rgba
(
255
,
0
,
0
,
0.8
)
!important
;
background-color
:
rgba
(
255
,
0
,
0
,
0.8
)
!important
;
width
:
1px
!important
;
/* width: 1px !important; */
z-index
:
5
!important
;
z-index
:
5
!important
;
}
}
...
...
form/index.js
View file @
19056cab
...
@@ -1272,7 +1272,7 @@ new Vue({
...
@@ -1272,7 +1272,7 @@ new Vue({
const
startMarker
=
this
.
wavesurfer
.
addRegion
({
const
startMarker
=
this
.
wavesurfer
.
addRegion
({
id
:
`
${
pageRegionId
}
-start`
,
id
:
`
${
pageRegionId
}
-start`
,
start
:
this
.
lockedPageStart
,
start
:
this
.
lockedPageStart
,
end
:
this
.
lockedPageStart
+
0.000
1
,
end
:
this
.
lockedPageStart
+
0.000
001
,
// 使用更小的差值
color
:
'
rgba(0, 255, 0, 0.8)
'
,
color
:
'
rgba(0, 255, 0, 0.8)
'
,
drag
:
false
,
drag
:
false
,
resize
:
false
resize
:
false
...
@@ -1281,7 +1281,7 @@ new Vue({
...
@@ -1281,7 +1281,7 @@ new Vue({
// 创建结束标记(红色竖线)
// 创建结束标记(红色竖线)
const
endMarker
=
this
.
wavesurfer
.
addRegion
({
const
endMarker
=
this
.
wavesurfer
.
addRegion
({
id
:
`
${
pageRegionId
}
-end`
,
id
:
`
${
pageRegionId
}
-end`
,
start
:
this
.
lockedPageEnd
-
0.000
1
,
start
:
this
.
lockedPageEnd
-
0.000
001
,
// 使用更小的差值
end
:
this
.
lockedPageEnd
,
end
:
this
.
lockedPageEnd
,
color
:
'
rgba(255, 0, 0, 0.8)
'
,
color
:
'
rgba(255, 0, 0, 0.8)
'
,
drag
:
false
,
drag
:
false
,
...
@@ -1291,6 +1291,22 @@ new Vue({
...
@@ -1291,6 +1291,22 @@ new Vue({
if
(
startMarker
&&
endMarker
)
{
if
(
startMarker
&&
endMarker
)
{
this
.
audioRegions
[
`
${
pageRegionId
}
-start`
]
=
startMarker
;
this
.
audioRegions
[
`
${
pageRegionId
}
-start`
]
=
startMarker
;
this
.
audioRegions
[
`
${
pageRegionId
}
-end`
]
=
endMarker
;
this
.
audioRegions
[
`
${
pageRegionId
}
-end`
]
=
endMarker
;
// 添加样式以确保1px宽度
this
.
$nextTick
(()
=>
{
const
startElement
=
startMarker
.
element
;
const
endElement
=
endMarker
.
element
;
if
(
startElement
)
{
// startElement.style.width = '1px';
startElement
.
style
.
transform
=
'
translateX(-0.5px)
'
;
}
if
(
endElement
)
{
// endElement.style.width = '1px';
endElement
.
style
.
transform
=
'
translateX(-0.5px)
'
;
}
});
}
}
// 重新创建组区间
// 重新创建组区间
...
@@ -1393,15 +1409,31 @@ new Vue({
...
@@ -1393,15 +1409,31 @@ new Vue({
if
(
startMarker
)
{
if
(
startMarker
)
{
startMarker
.
update
({
startMarker
.
update
({
start
:
this
.
currentPage
.
start
,
start
:
this
.
currentPage
.
start
,
end
:
this
.
currentPage
.
start
+
0.0001
end
:
this
.
currentPage
.
start
+
0.000001
});
// 重新应用样式
this
.
$nextTick
(()
=>
{
if
(
startMarker
.
element
)
{
startMarker
.
element
.
style
.
width
=
'
1px
'
;
startMarker
.
element
.
style
.
transform
=
'
translateX(-0.5px)
'
;
}
});
});
}
}
if
(
endMarker
)
{
if
(
endMarker
)
{
endMarker
.
update
({
endMarker
.
update
({
start
:
this
.
currentPage
.
end
-
0.0001
,
start
:
this
.
currentPage
.
end
-
0.000
00
1
,
end
:
this
.
currentPage
.
end
end
:
this
.
currentPage
.
end
});
});
// 重新应用样式
this
.
$nextTick
(()
=>
{
if
(
endMarker
.
element
)
{
endMarker
.
element
.
style
.
width
=
'
1px
'
;
endMarker
.
element
.
style
.
transform
=
'
translateX(-0.5px)
'
;
}
});
}
}
}
}
...
...
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