Commit 9e17fad3 authored by liujiangnan's avatar liujiangnan

feat: 可以定位页内的时间段了

parent 065fc7f4
......@@ -171,13 +171,13 @@ html, body {
overflow: hidden;
}
#wave-timeline {
height: 20px !important;
position: absolute;
left: 0px;
right: 0px;
bottom: 0px;
overflow: visible;
.time-display {
display: inline-block;
margin-left: 10px;
font-size: 14px;
color: #606266;
min-width: 60px;
text-align: center;
}
.audio-controls {
......@@ -225,25 +225,6 @@ html, body {
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 {
position: relative;
......@@ -571,33 +552,35 @@ html, body {
}
/* 组区间样式 */
.wavesurfer-region:not([data-id^="page-"]) {
background-color: rgba(64, 158, 255, 0.2);
border: 2px solid rgba(64, 158, 255, 0.5);
.wavesurfer-region[data-id^="group-"] {
background-color: rgba(255, 165, 0, 0.3) !important;
border: 1px solid rgba(255, 165, 0, 0.5) !important;
z-index: 2 !important;
cursor: pointer !important;
}
.wavesurfer-region:not([data-id^="page-"]):hover {
background-color: rgba(64, 158, 255, 0.3) !important;
.wavesurfer-region[data-id^="group-"]:hover {
background-color: rgba(255, 165, 0, 0.4) !important;
}
/* 锁定状态下的标记样式 */
.wavesurfer-region[data-id$="-start"] {
background-color: rgba(0, 255, 0, 0.8) !important;
/* width: 1px !important; */
width: 1px !important;
z-index: 5 !important;
}
.wavesurfer-region[data-id$="-end"] {
background-color: rgba(255, 0, 0, 0.8) !important;
/* width: 1px !important; */
width: 1px !important;
z-index: 5 !important;
}
/* 锁定状态下隐藏非当前页面的区间 */
.page-locked .wavesurfer-region:not([data-id*="-start"]):not([data-id*="-end"]):not([data-id$="-${currentPageIndex-1}"]) {
display: none !important;
.page-locked .wavesurfer-region[data-id^="group-"] {
display: block !important;
background-color: rgba(255, 165, 0, 0.3) !important;
border: 1px solid rgba(255, 165, 0, 0.5) !important;
}
/* 锁定状态下禁用区间拖动 */
......
......@@ -282,7 +282,6 @@
<!-- 波形图区域 -->
<div class="waveform-wrapper" :class="{ 'page-locked': isPageLocked }">
<div id="waveform"></div>
<div id="wave-timeline"></div>
</div>
<!-- 控制按钮区域 -->
......@@ -297,6 +296,8 @@
</el-button>
</el-button-group>
<span class="time-display">{{ currentTime.toFixed(2) }}s</span>
<el-button-group style="margin-left: 10px;">
<el-button size="small" @click="handleZoomOut" :disabled="audioLoading">
<i class="el-icon-zoom-out"></i>
......@@ -316,34 +317,6 @@
{{ isPageLocked ? '解锁页面' : '锁定页面' }}
</el-button>
</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>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment