|
@@ -211,16 +211,16 @@ export default defineComponent({
|
|
|
|
|
|
/** 刷新曲谱 */
|
|
|
const refreshMusicScore = () => {
|
|
|
+ const container = document.getElementById('musicAndSelection'), svgDom = document.getElementById('osmdCanvasPage1'), selectionBox = document.getElementById('selectionBox'), selectionBgBox = document.getElementById('selectionBgBox');
|
|
|
+ if (container) {
|
|
|
+ svgDom && container?.removeChild(svgDom)
|
|
|
+ selectionBox && container?.removeChild(selectionBox)
|
|
|
+ selectionBgBox && container?.removeChild(selectionBgBox)
|
|
|
+ }
|
|
|
// 有可能会有 其他地方的js执行 阻塞 这里下一帧再执行确保加载条出来
|
|
|
requestAnimationFrame(() =>{
|
|
|
isLoadingCss.value = true
|
|
|
requestAnimationFrame(async () => {
|
|
|
- const container = document.getElementById('musicAndSelection'), svgDom = document.getElementById('osmdCanvasPage1'), selectionBox = document.getElementById('selectionBox'), selectionBgBox = document.getElementById('selectionBgBox');
|
|
|
- if (container) {
|
|
|
- svgDom && container?.removeChild(svgDom)
|
|
|
- selectionBox && container?.removeChild(selectionBox)
|
|
|
- selectionBgBox && container?.removeChild(selectionBgBox)
|
|
|
- }
|
|
|
state.evXmlBeginArr = [];
|
|
|
state.vfmeasures = [];
|
|
|
musicData.showSelection = false;
|