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
d3955af2
Commit
d3955af2
authored
May 14, 2025
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 块调整还不完善,先记一版
parent
6455e64c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
178 additions
and
334 deletions
+178
-334
index.css
form/index.css
+47
-6
index.js
form/index.js
+131
-328
No files found.
form/index.css
View file @
d3955af2
...
@@ -519,19 +519,20 @@ html, body {
...
@@ -519,19 +519,20 @@ html, body {
display
:
block
!important
;
display
:
block
!important
;
position
:
absolute
!important
;
position
:
absolute
!important
;
height
:
100%
!important
;
height
:
100%
!important
;
width
:
8
px
!important
;
width
:
1
px
!important
;
top
:
0
!important
;
top
:
0
!important
;
cursor
:
ew-resize
!important
;
cursor
:
ew-resize
!important
;
z-index
:
3
!important
;
z-index
:
3
!important
;
background
:
transparent
!important
;
}
}
.wavesurfer-handle-start
{
.wavesurfer-handle-start
{
left
:
0
!important
;
left
:
0
!important
;
background-color
:
rgba
(
0
,
255
,
0
,
0.8
)
!important
;
}
}
.wavesurfer-handle-end
{
.wavesurfer-handle-end
{
right
:
0
!important
;
right
:
0
!important
;
background-color
:
rgba
(
255
,
0
,
0
,
0.8
)
!important
;
}
}
/* 波形图的进度条样式 */
/* 波形图的进度条样式 */
...
@@ -563,6 +564,21 @@ html, body {
...
@@ -563,6 +564,21 @@ html, body {
background-color
:
rgba
(
255
,
165
,
0
,
0.4
)
!important
;
background-color
:
rgba
(
255
,
165
,
0
,
0.4
)
!important
;
}
}
.wavesurfer-region
[
data-id
^=
"group-"
]
.wavesurfer-handle
{
display
:
block
!important
;
width
:
1px
!important
;
height
:
100%
!important
;
cursor
:
ew-resize
!important
;
}
.wavesurfer-region
[
data-id
^=
"group-"
]
.wavesurfer-handle-start
{
background-color
:
rgba
(
0
,
255
,
0
,
0.8
)
!important
;
}
.wavesurfer-region
[
data-id
^=
"group-"
]
.wavesurfer-handle-end
{
background-color
:
rgba
(
255
,
0
,
0
,
0.8
)
!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
;
...
@@ -576,14 +592,39 @@ html, body {
...
@@ -576,14 +592,39 @@ html, body {
z-index
:
5
!important
;
z-index
:
5
!important
;
}
}
/* 锁定状态下
隐藏非当前页面的区间
*/
/* 锁定状态下
的组区间样式
*/
.page-locked
.wavesurfer-region
[
data-id
^=
"group-"
]
{
.page-locked
.wavesurfer-region
[
data-id
^=
"group-"
]
{
display
:
block
!important
;
display
:
block
!important
;
background-color
:
rgba
(
255
,
165
,
0
,
0.3
)
!important
;
background-color
:
rgba
(
255
,
165
,
0
,
0.3
)
!important
;
border
:
1px
solid
rgba
(
255
,
165
,
0
,
0.5
)
!important
;
border
:
1px
solid
rgba
(
255
,
165
,
0
,
0.5
)
!important
;
}
}
/* 锁定状态下禁用区间拖动 */
/* 锁定状态下允许组区间显示手柄 */
.page-locked
.wavesurfer-region
.wavesurfer-handle
{
.page-locked
.wavesurfer-region
[
data-id
^=
"group-"
]
.wavesurfer-handle
{
display
:
none
!important
;
display
:
block
!important
;
width
:
1px
!important
;
height
:
100%
!important
;
cursor
:
ew-resize
!important
;
}
.page-locked
.wavesurfer-region
[
data-id
^=
"group-"
]
.wavesurfer-handle-start
{
background-color
:
rgba
(
0
,
255
,
0
,
0.8
)
!important
;
}
.page-locked
.wavesurfer-region
[
data-id
^=
"group-"
]
.wavesurfer-handle-end
{
background-color
:
rgba
(
255
,
0
,
0
,
0.8
)
!important
;
}
#waveform
::part
(
region-handle-start
)
{
background-color
:
rgba
(
0
,
255
,
0
,
0.8
)
!important
;
width
:
1px
!important
;
height
:
100%
!important
;
cursor
:
ew-resize
!important
;
}
#waveform
::part
(
region-handle-end
)
{
background-color
:
rgba
(
255
,
0
,
0
,
0.8
)
!important
;
width
:
1px
!important
;
height
:
100%
!important
;
cursor
:
ew-resize
!important
;
}
}
\ No newline at end of file
form/index.js
View file @
d3955af2
...
@@ -211,7 +211,24 @@ new Vue({
...
@@ -211,7 +211,24 @@ new Vue({
backend
:
'
MediaElement
'
,
backend
:
'
MediaElement
'
,
plugins
:
[
plugins
:
[
WaveSurfer
.
regions
.
create
({
WaveSurfer
.
regions
.
create
({
dragSelection
:
false
// 禁用拖动选择,避免与我们的区域交互冲突
dragSelection
:
false
,
// 禁用拖动选择,避免与我们的区域交互冲突
slop
:
5
,
// 调整手柄灵敏度
handleMinWidth
:
1
,
// 最小手柄宽度
handleMaxWidth
:
1
,
// 最大手柄宽度
handleStyle
:
{
left
:
{
backgroundColor
:
'
rgba(0, 255, 0, 0.8)
'
,
// 绿色开始手柄
width
:
'
1px
'
,
height
:
'
100%
'
,
cursor
:
'
ew-resize
'
},
right
:
{
backgroundColor
:
'
rgba(255, 0, 0, 0.8)
'
,
// 红色结束手柄
width
:
'
1px
'
,
height
:
'
100%
'
,
cursor
:
'
ew-resize
'
}
}
})
})
]
]
});
});
...
@@ -327,6 +344,22 @@ new Vue({
...
@@ -327,6 +344,22 @@ new Vue({
color
:
'
rgba(255, 192, 203, 0.3)
'
,
color
:
'
rgba(255, 192, 203, 0.3)
'
,
drag
:
!
this
.
isPageLocked
,
drag
:
!
this
.
isPageLocked
,
resize
:
!
this
.
isPageLocked
,
resize
:
!
this
.
isPageLocked
,
minLength
:
0.1
,
maxLength
:
Infinity
,
handleStyle
:
{
left
:
{
backgroundColor
:
'
rgba(0, 255, 0, 0.8)
'
,
width
:
'
1px
'
,
height
:
'
100%
'
,
cursor
:
'
ew-resize
'
},
right
:
{
backgroundColor
:
'
rgba(255, 0, 0, 0.8)
'
,
width
:
'
1px
'
,
height
:
'
100%
'
,
cursor
:
'
ew-resize
'
}
},
attributes
:
{
attributes
:
{
label
:
`Page
${
pageIndex
+
1
}
`
label
:
`Page
${
pageIndex
+
1
}
`
}
}
...
@@ -378,231 +411,6 @@ new Vue({
...
@@ -378,231 +411,6 @@ new Vue({
}
}
}
}
});
});
// 创建组区间
this
.
pages
.
forEach
((
page
,
pageIndex
)
=>
{
if
(
page
.
groups
)
{
page
.
groups
.
forEach
((
group
,
groupIndex
)
=>
{
if
(
typeof
group
.
start
===
'
number
'
&&
typeof
group
.
end
===
'
number
'
)
{
const
groupRegionId
=
`
${
pageIndex
}
-
${
groupIndex
}
`
;
const
isCurrentPage
=
pageIndex
===
this
.
currentPageIndex
-
1
;
try
{
const
region
=
this
.
wavesurfer
.
addRegion
({
id
:
groupRegionId
,
start
:
group
.
start
,
end
:
group
.
end
,
color
:
isCurrentPage
?
'
rgba(64, 158, 255, 0.2)
'
:
'
rgba(144, 147, 153, 0.1)
'
,
drag
:
true
,
resize
:
true
,
handleStyle
:
{
left
:
{
backgroundColor
:
'
#409EFF
'
,
width
:
'
4px
'
,
height
:
'
100%
'
,
cursor
:
'
ew-resize
'
},
right
:
{
backgroundColor
:
'
#409EFF
'
,
width
:
'
4px
'
,
height
:
'
100%
'
,
cursor
:
'
ew-resize
'
}
}
});
if
(
region
)
{
this
.
audioRegions
[
groupRegionId
]
=
region
;
// 修改点击事件处理
const
handleClick
=
(
event
)
=>
{
event
.
stopPropagation
();
event
.
preventDefault
();
// 定位到区间开始位置
const
duration
=
this
.
wavesurfer
.
getDuration
();
this
.
wavesurfer
.
seekTo
(
group
.
start
/
duration
);
};
region
.
element
.
removeEventListener
(
'
click
'
,
handleClick
);
region
.
element
.
addEventListener
(
'
click
'
,
handleClick
);
// 添加区间更新事件处理
region
.
on
(
'
update-end
'
,
()
=>
{
// 检查是否与其他区间重叠
const
isOverlapping
=
this
.
checkOverlap
(
region
,
groupIndex
);
if
(
isOverlapping
)
{
// 如果有重叠,恢复到原始位置
region
.
update
({
start
:
group
.
start
,
end
:
group
.
end
});
this
.
$message
.
warning
(
'
区间不能重叠
'
);
return
;
}
let
newStart
=
Number
(
region
.
start
.
toFixed
(
3
));
let
newEnd
=
Number
(
region
.
end
.
toFixed
(
3
));
const
duration
=
newEnd
-
newStart
;
// 保存原始区间长度
let
needUpdate
=
false
;
// 检查并调整开始时间,同时保持区间长度
if
(
newStart
<
this
.
lockedPageStart
)
{
newStart
=
this
.
lockedPageStart
;
newEnd
=
newStart
+
duration
;
needUpdate
=
true
;
this
.
$message
.
warning
(
'
已自动调整到页面开始时间
'
);
}
// 检查并调整结束时间,同时保持区间长度
if
(
newEnd
>
this
.
lockedPageEnd
)
{
newEnd
=
this
.
lockedPageEnd
;
newStart
=
newEnd
-
duration
;
// 如果调整后的开始时间小于页面开始时间,则以页面开始时间为准
if
(
newStart
<
this
.
lockedPageStart
)
{
newStart
=
this
.
lockedPageStart
;
}
needUpdate
=
true
;
this
.
$message
.
warning
(
'
已自动调整到页面结束时间
'
);
}
// 如果需要调整,更新区间位置
if
(
needUpdate
)
{
region
.
update
({
start
:
newStart
,
end
:
newEnd
});
}
// 更新组的时间范围
group
.
start
=
newStart
;
group
.
end
=
newEnd
;
// 如果当前选中的就是这个组,更新编辑器中的值
if
(
this
.
selectedGroup
===
groupIndex
)
{
this
.
currentGroup
=
group
;
}
});
}
}
catch
(
err
)
{
console
.
error
(
`Error creating group region
${
groupRegionId
}
:`
,
err
);
}
}
});
}
});
// 重新创建组区间,使用与页面区间相似的样式
if
(
this
.
currentPage
.
groups
)
{
this
.
currentPage
.
groups
.
forEach
((
group
,
groupIndex
)
=>
{
if
(
typeof
group
.
start
===
'
number
'
&&
typeof
group
.
end
===
'
number
'
)
{
const
groupRegionId
=
`group-
${
groupIndex
}
`
;
const
region
=
this
.
wavesurfer
.
addRegion
({
id
:
groupRegionId
,
start
:
group
.
start
,
end
:
group
.
end
,
color
:
'
rgba(255, 165, 0, 0.3)
'
,
drag
:
true
,
// 允许拖动
resize
:
true
,
// 允许调整大小
attributes
:
{
label
:
`Group
${
groupIndex
+
1
}
`
}
});
if
(
region
)
{
this
.
audioRegions
[
groupRegionId
]
=
region
;
// 修改点击事件处理
const
handleClick
=
(
event
)
=>
{
event
.
stopPropagation
();
event
.
preventDefault
();
// 定位到区间开始位置
const
duration
=
this
.
wavesurfer
.
getDuration
();
this
.
wavesurfer
.
seekTo
(
group
.
start
/
duration
);
// 选中对应的组
this
.
selectedGroup
=
groupIndex
;
this
.
currentGroup
=
group
;
// 如果有第一个矩形,选中它
if
(
group
.
group
&&
group
.
group
.
length
>
0
)
{
this
.
selectedItemIndex
=
0
;
}
};
region
.
element
.
removeEventListener
(
'
click
'
,
handleClick
);
region
.
element
.
addEventListener
(
'
click
'
,
handleClick
);
// 添加区间更新事件处理
region
.
on
(
'
update-end
'
,
()
=>
{
// 检查是否与其他区间重叠
const
isOverlapping
=
this
.
checkOverlap
(
region
,
groupIndex
);
if
(
isOverlapping
)
{
// 如果有重叠,恢复到原始位置
region
.
update
({
start
:
group
.
start
,
end
:
group
.
end
});
this
.
$message
.
warning
(
'
区间不能重叠
'
);
return
;
}
let
newStart
=
Number
(
region
.
start
.
toFixed
(
3
));
let
newEnd
=
Number
(
region
.
end
.
toFixed
(
3
));
const
duration
=
newEnd
-
newStart
;
// 保存原始区间长度
let
needUpdate
=
false
;
// 检查并调整开始时间,同时保持区间长度
if
(
newStart
<
this
.
lockedPageStart
)
{
newStart
=
this
.
lockedPageStart
;
newEnd
=
newStart
+
duration
;
needUpdate
=
true
;
this
.
$message
.
warning
(
'
已自动调整到页面开始时间
'
);
}
// 检查并调整结束时间,同时保持区间长度
if
(
newEnd
>
this
.
lockedPageEnd
)
{
newEnd
=
this
.
lockedPageEnd
;
newStart
=
newEnd
-
duration
;
// 如果调整后的开始时间小于页面开始时间,则以页面开始时间为准
if
(
newStart
<
this
.
lockedPageStart
)
{
newStart
=
this
.
lockedPageStart
;
}
needUpdate
=
true
;
this
.
$message
.
warning
(
'
已自动调整到页面结束时间
'
);
}
// 如果需要调整,更新区间位置
if
(
needUpdate
)
{
region
.
update
({
start
:
newStart
,
end
:
newEnd
});
}
// 更新组的时间范围
group
.
start
=
newStart
;
group
.
end
=
newEnd
;
// 如果当前选中的就是这个组,更新编辑器中的值
if
(
this
.
selectedGroup
===
groupIndex
)
{
this
.
currentGroup
=
group
;
}
});
// 确保区间样式正确
this
.
$nextTick
(()
=>
{
if
(
region
.
element
)
{
region
.
element
.
style
.
backgroundColor
=
'
rgba(255, 165, 0, 0.3)
'
;
region
.
element
.
style
.
border
=
'
1px solid rgba(255, 165, 0, 0.5)
'
;
}
});
}
}
});
}
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
error
(
'
Error in createAllAudioRegions:
'
,
err
);
console
.
error
(
'
Error in createAllAudioRegions:
'
,
err
);
}
}
...
@@ -1385,8 +1193,8 @@ new Vue({
...
@@ -1385,8 +1193,8 @@ new Vue({
// 如果点击的是矩形框或其相关元素,不处理
// 如果点击的是矩形框或其相关元素,不处理
if
(
event
.
target
.
closest
(
'
.text-rect
'
)
||
if
(
event
.
target
.
closest
(
'
.text-rect
'
)
||
event
.
target
.
closest
(
'
.resize-handle
'
)
||
event
.
target
.
closest
(
'
.resize-handle
'
)
||
event
.
target
.
closest
(
'
.delete-rect-btn
'
)
||
event
.
target
.
closest
(
'
.delete-rect-btn
'
)
||
event
.
target
.
closest
(
'
.add-rect-btn
'
)
||
event
.
target
.
closest
(
'
.add-rect-btn
'
)
||
event
.
target
.
closest
(
'
.fullscreen-btn
'
))
{
event
.
target
.
closest
(
'
.fullscreen-btn
'
))
{
return
;
return
;
}
}
...
@@ -1402,8 +1210,8 @@ new Vue({
...
@@ -1402,8 +1210,8 @@ new Vue({
// 如果点击的是矩形框或其相关元素,不处理
// 如果点击的是矩形框或其相关元素,不处理
if
(
event
.
target
.
closest
(
'
.text-rect
'
)
||
if
(
event
.
target
.
closest
(
'
.text-rect
'
)
||
event
.
target
.
closest
(
'
.resize-handle
'
)
||
event
.
target
.
closest
(
'
.resize-handle
'
)
||
event
.
target
.
closest
(
'
.delete-rect-btn
'
)
||
event
.
target
.
closest
(
'
.delete-rect-btn
'
)
||
event
.
target
.
closest
(
'
.add-rect-btn
'
)
||
event
.
target
.
closest
(
'
.add-rect-btn
'
)
||
event
.
target
.
closest
(
'
.fullscreen-btn
'
))
{
event
.
target
.
closest
(
'
.fullscreen-btn
'
))
{
return
;
return
;
}
}
...
@@ -1546,113 +1354,108 @@ new Vue({
...
@@ -1546,113 +1354,108 @@ new Vue({
});
});
}
}
// 重新创建组区间,使用与页面区间
相似的样式
// 重新创建组区间,使用与页面区间
完全相同的配置
if
(
this
.
currentPage
.
groups
)
{
if
(
this
.
currentPage
.
groups
)
{
this
.
currentPage
.
groups
.
forEach
((
group
,
groupIndex
)
=>
{
this
.
currentPage
.
groups
.
forEach
((
group
,
groupIndex
)
=>
{
if
(
typeof
group
.
start
===
'
number
'
&&
typeof
group
.
end
===
'
number
'
)
{
const
groupRegionId
=
`group-
${
groupIndex
}
`
;
const
groupRegionId
=
`group-
${
groupIndex
}
`
;
const
region
=
this
.
wavesurfer
.
addRegion
({
const
region
=
this
.
wavesurfer
.
addRegion
({
id
:
groupRegionId
,
id
:
groupRegionId
,
start
:
group
.
start
,
start
:
group
.
start
,
end
:
group
.
end
,
end
:
group
.
end
,
color
:
'
rgba(255, 165, 0, 0.3)
'
,
color
:
'
rgba(255, 165, 0, 0.3)
'
,
drag
:
true
,
drag
:
true
,
// 允许拖动
resize
:
true
,
resize
:
true
,
// 允许调整大小
minLength
:
0.1
,
attributes
:
{
maxLength
:
Infinity
,
label
:
`Group
${
groupIndex
+
1
}
`
handleStyle
:
{
left
:
{
backgroundColor
:
'
rgba(0, 255, 0, 0.8)
'
,
width
:
'
1px
'
,
height
:
'
100%
'
,
cursor
:
'
ew-resize
'
},
right
:
{
backgroundColor
:
'
rgba(255, 0, 0, 0.8)
'
,
width
:
'
1px
'
,
height
:
'
100%
'
,
cursor
:
'
ew-resize
'
}
}
});
}
});
if
(
region
)
{
if
(
region
)
{
this
.
audioRegions
[
groupRegionId
]
=
region
;
this
.
audioRegions
[
groupRegionId
]
=
region
;
// 添加点击事件处理
const
handleClick
=
(
event
)
=>
{
event
.
stopPropagation
();
event
.
preventDefault
();
// 修改点击事件处理
// 直接选中组,不需要取消选中功能
const
handleClick
=
(
event
)
=>
{
this
.
selectedGroup
=
groupIndex
;
event
.
stopPropagation
();
this
.
currentGroup
=
this
.
currentPage
.
groups
[
groupIndex
];
event
.
preventDefault
();
};
// 定位到区间开始位置
const
duration
=
this
.
wavesurfer
.
getDuration
();
this
.
wavesurfer
.
seekTo
(
group
.
start
/
duration
);
// 选中对应的组
this
.
selectedGroup
=
groupIndex
;
this
.
currentGroup
=
group
;
// 如果有第一个矩形,选中它
if
(
group
.
group
&&
group
.
group
.
length
>
0
)
{
this
.
selectedItemIndex
=
0
;
}
};
region
.
element
.
removeEventListener
(
'
click
'
,
handleClick
);
region
.
element
.
addEventListener
(
'
click
'
,
handleClick
);
// 添加区间更新事件处理
region
.
element
.
removeEventListener
(
'
click
'
,
handleClick
);
region
.
on
(
'
update-end
'
,
()
=>
{
region
.
element
.
addEventListener
(
'
click
'
,
handleClick
);
// 检查是否与其他区间重叠
const
isOverlapping
=
this
.
checkOverlap
(
region
,
groupIndex
);
// 添加区间更新事件处理
region
.
on
(
'
update-end
'
,
()
=>
{
if
(
isOverlapping
)
{
// 检查是否与其他区间重叠
// 如果有重叠,恢复到原始位置
const
isOverlapping
=
this
.
checkOverlap
(
region
,
groupIndex
);
region
.
update
({
start
:
group
.
start
,
if
(
isOverlapping
)
{
end
:
group
.
end
// 如果有重叠,恢复到原始位置
});
region
.
update
({
this
.
$message
.
warning
(
'
区间不能重叠
'
);
start
:
group
.
start
,
return
;
end
:
group
.
end
}
});
this
.
$message
.
warning
(
'
区间不能重叠
'
);
let
newStart
=
Number
(
region
.
start
.
toFixed
(
3
));
return
;
let
newEnd
=
Number
(
region
.
end
.
toFixed
(
3
));
}
const
duration
=
newEnd
-
newStart
;
// 保存原始区间长度
let
needUpdate
=
false
;
let
newStart
=
Number
(
region
.
start
.
toFixed
(
3
));
let
newEnd
=
Number
(
region
.
end
.
toFixed
(
3
));
// 检查并调整开始时间,同时保持区间长度
const
duration
=
newEnd
-
newStart
;
// 保存原始区间长度
let
needUpdate
=
false
;
// 检查并调整开始时间,同时保持区间长度
if
(
newStart
<
this
.
lockedPageStart
)
{
newStart
=
this
.
lockedPageStart
;
newEnd
=
newStart
+
duration
;
needUpdate
=
true
;
this
.
$message
.
warning
(
'
已自动调整到页面开始时间
'
);
}
// 检查并调整结束时间,同时保持区间长度
if
(
newEnd
>
this
.
lockedPageEnd
)
{
newEnd
=
this
.
lockedPageEnd
;
newStart
=
newEnd
-
duration
;
// 如果调整后的开始时间小于页面开始时间,则以页面开始时间为准
if
(
newStart
<
this
.
lockedPageStart
)
{
if
(
newStart
<
this
.
lockedPageStart
)
{
newStart
=
this
.
lockedPageStart
;
newStart
=
this
.
lockedPageStart
;
newEnd
=
newStart
+
duration
;
needUpdate
=
true
;
this
.
$message
.
warning
(
'
已自动调整到页面开始时间
'
);
}
// 检查并调整结束时间,同时保持区间长度
if
(
newEnd
>
this
.
lockedPageEnd
)
{
newEnd
=
this
.
lockedPageEnd
;
newStart
=
newEnd
-
duration
;
// 如果调整后的开始时间小于页面开始时间,则以页面开始时间为准
if
(
newStart
<
this
.
lockedPageStart
)
{
newStart
=
this
.
lockedPageStart
;
}
needUpdate
=
true
;
this
.
$message
.
warning
(
'
已自动调整到页面结束时间
'
);
}
}
needUpdate
=
true
;
// 如果需要调整,更新区间位置
this
.
$message
.
warning
(
'
已自动调整到页面结束时间
'
);
if
(
needUpdate
)
{
}
region
.
update
({
start
:
newStart
,
// 如果需要调整,更新区间位置
end
:
newEnd
if
(
needUpdate
)
{
});
region
.
update
({
}
start
:
newStart
,
end
:
newEnd
// 更新组的时间范围
});
group
.
start
=
newStart
;
}
group
.
end
=
newEnd
;
// 更新组的时间范围
// 如果当前选中的就是这个组,更新编辑器中的值
group
.
start
=
newStart
;
if
(
this
.
selectedGroup
===
groupIndex
)
{
group
.
end
=
newEnd
;
this
.
currentGroup
=
group
;
}
// 如果当前选中的就是这个组,更新编辑器中的值
});
if
(
this
.
selectedGroup
===
groupIndex
)
{
this
.
currentGroup
=
group
;
// 确保区间样式正确
}
this
.
$nextTick
(()
=>
{
});
if
(
region
.
element
)
{
region
.
element
.
style
.
backgroundColor
=
'
rgba(255, 165, 0, 0.3)
'
;
region
.
element
.
style
.
border
=
'
1px solid rgba(255, 165, 0, 0.5)
'
;
}
});
}
}
}
});
});
}
}
...
...
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