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
9e17fad3
Commit
9e17fad3
authored
May 13, 2025
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 可以定位页内的时间段了
parent
065fc7f4
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
212 additions
and
96 deletions
+212
-96
index.css
form/index.css
+18
-35
index.html
form/index.html
+2
-29
index.js
form/index.js
+192
-32
No files found.
form/index.css
View file @
9e17fad3
...
@@ -171,13 +171,13 @@ html, body {
...
@@ -171,13 +171,13 @@ html, body {
overflow
:
hidden
;
overflow
:
hidden
;
}
}
#wave-timeline
{
.time-display
{
height
:
20px
!important
;
display
:
inline-block
;
position
:
absolute
;
margin-left
:
10px
;
left
:
0
px
;
font-size
:
14
px
;
right
:
0px
;
color
:
#606266
;
bottom
:
0px
;
min-width
:
6
0px
;
overflow
:
visible
;
text-align
:
center
;
}
}
.audio-controls
{
.audio-controls
{
...
@@ -225,25 +225,6 @@ html, body {
...
@@ -225,25 +225,6 @@ html, body {
margin-left
:
10px
;
margin-left
:
10px
;
}
}
/* 时间调整控件样式 */
.time-adjust-controls
{
display
:
flex
;
align-items
:
center
;
margin-left
:
20px
;
padding-left
:
20px
;
border-left
:
1px
solid
#DCDFE6
;
}
.time-label
{
font-size
:
14px
;
color
:
#606266
;
margin-right
:
5px
;
}
.time-adjust-controls
.el-input-number
{
margin
:
0
5px
;
}
/* 确保滑块和按钮在最上层 */
/* 确保滑块和按钮在最上层 */
.el-slider
{
.el-slider
{
position
:
relative
;
position
:
relative
;
...
@@ -571,33 +552,35 @@ html, body {
...
@@ -571,33 +552,35 @@ html, body {
}
}
/* 组区间样式 */
/* 组区间样式 */
.wavesurfer-region
:not
([
data-id
^=
"page-"
])
{
.wavesurfer-region
[
data-id
^=
"group-"
]
{
background-color
:
rgba
(
64
,
158
,
255
,
0.2
)
;
background-color
:
rgba
(
255
,
165
,
0
,
0.3
)
!important
;
border
:
2px
solid
rgba
(
64
,
158
,
255
,
0.5
)
;
border
:
1px
solid
rgba
(
255
,
165
,
0
,
0.5
)
!important
;
z-index
:
2
!important
;
z-index
:
2
!important
;
cursor
:
pointer
!important
;
cursor
:
pointer
!important
;
}
}
.wavesurfer-region
:not
([
data-id
^=
"page-"
])
:hover
{
.wavesurfer-region
[
data-id
^=
"group-"
]
:hover
{
background-color
:
rgba
(
64
,
158
,
255
,
0.3
)
!important
;
background-color
:
rgba
(
255
,
165
,
0
,
0.4
)
!important
;
}
}
/* 锁定状态下的标记样式 */
/* 锁定状态下的标记样式 */
.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
;
}
}
/* 锁定状态下隐藏非当前页面的区间 */
/* 锁定状态下隐藏非当前页面的区间 */
.page-locked
.wavesurfer-region
:not
([
data-id
*=
"-start"
])
:not
([
data-id
*=
"-end"
])
:not
([
data-id
$
=
"-${currentPageIndex-1}"
])
{
.page-locked
.wavesurfer-region
[
data-id
^=
"group-"
]
{
display
:
none
!important
;
display
:
block
!important
;
background-color
:
rgba
(
255
,
165
,
0
,
0.3
)
!important
;
border
:
1px
solid
rgba
(
255
,
165
,
0
,
0.5
)
!important
;
}
}
/* 锁定状态下禁用区间拖动 */
/* 锁定状态下禁用区间拖动 */
...
...
form/index.html
View file @
9e17fad3
...
@@ -282,7 +282,6 @@
...
@@ -282,7 +282,6 @@
<!-- 波形图区域 -->
<!-- 波形图区域 -->
<div
class=
"waveform-wrapper"
:class=
"{ 'page-locked': isPageLocked }"
>
<div
class=
"waveform-wrapper"
:class=
"{ 'page-locked': isPageLocked }"
>
<div
id=
"waveform"
></div>
<div
id=
"waveform"
></div>
<div
id=
"wave-timeline"
></div>
</div>
</div>
<!-- 控制按钮区域 -->
<!-- 控制按钮区域 -->
...
@@ -297,6 +296,8 @@
...
@@ -297,6 +296,8 @@
</el-button>
</el-button>
</el-button-group>
</el-button-group>
<span
class=
"time-display"
>
{{ currentTime.toFixed(2) }}s
</span>
<el-button-group
style=
"margin-left: 10px;"
>
<el-button-group
style=
"margin-left: 10px;"
>
<el-button
size=
"small"
@
click=
"handleZoomOut"
:disabled=
"audioLoading"
>
<el-button
size=
"small"
@
click=
"handleZoomOut"
:disabled=
"audioLoading"
>
<i
class=
"el-icon-zoom-out"
></i>
<i
class=
"el-icon-zoom-out"
></i>
...
@@ -316,34 +317,6 @@
...
@@ -316,34 +317,6 @@
{{ isPageLocked ? '解锁页面' : '锁定页面' }}
{{ isPageLocked ? '解锁页面' : '锁定页面' }}
</el-button>
</el-button>
</div>
</div>
<!-- 添加时间调整控件 -->
<div
class=
"time-adjust-controls"
v-if=
"currentGroup"
>
<span
class=
"time-label"
>
开始时间:
</span>
<el-input-number
v-model=
"currentGroup.start"
:min=
"0"
:max=
"currentGroup.end"
:step=
"0.1"
:precision=
"3"
size=
"small"
:disabled=
"isPageLocked"
@
change=
"handleTimeChange('start', $event)"
style=
"width: 120px"
>
</el-input-number>
<span
class=
"time-label"
style=
"margin-left: 10px"
>
结束时间:
</span>
<el-input-number
v-model=
"currentGroup.end"
:min=
"currentGroup.start"
:max=
"wavesurfer ? wavesurfer.getDuration() : 999999"
:step=
"0.1"
:precision=
"3"
size=
"small"
:disabled=
"isPageLocked"
@
change=
"handleTimeChange('end', $event)"
style=
"width: 120px"
>
</el-input-number>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
form/index.js
View file @
9e17fad3
This diff is collapsed.
Click to expand it.
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