|
@@ -30,6 +30,7 @@ import { ACCESS_TOKEN } from '@/store/mutation-types';
|
|
import { promisefiyPostMessage } from '@/helpers/native-message';
|
|
import { promisefiyPostMessage } from '@/helpers/native-message';
|
|
import html2canvas from 'html2canvas';
|
|
import html2canvas from 'html2canvas';
|
|
import { addWatermark, convasToImg } from '@/views/co-ai/imageFunction';
|
|
import { addWatermark, convasToImg } from '@/views/co-ai/imageFunction';
|
|
|
|
+import { nextTick } from 'process';
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'music-detail',
|
|
name: 'music-detail',
|
|
@@ -42,6 +43,8 @@ export default defineComponent({
|
|
emits: ['handleGoto'],
|
|
emits: ['handleGoto'],
|
|
setup(props, { emit }) {
|
|
setup(props, { emit }) {
|
|
const item = toRef(props.item);
|
|
const item = toRef(props.item);
|
|
|
|
+ const noticeBarDom = ref()
|
|
|
|
+ const isScroll = ref(false)
|
|
const data = reactive({
|
|
const data = reactive({
|
|
musicPdfUrl: '',
|
|
musicPdfUrl: '',
|
|
iframeSrc: '',
|
|
iframeSrc: '',
|
|
@@ -484,6 +487,13 @@ export default defineComponent({
|
|
const __init = async () => {
|
|
const __init = async () => {
|
|
await analyzeXml();
|
|
await analyzeXml();
|
|
musicIframeLoad();
|
|
musicIframeLoad();
|
|
|
|
+
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ const noticeBarEl = noticeBarDom.value.$el
|
|
|
|
+ if(noticeBarEl){
|
|
|
|
+ isScroll.value = noticeBarEl.querySelector(".van-notice-bar__wrap")?.offsetWidth < noticeBarEl.querySelector(".van-notice-bar__content")?.offsetWidth
|
|
|
|
+ }
|
|
|
|
+ })
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
@@ -500,12 +510,13 @@ export default defineComponent({
|
|
<div class={styles.musicContainer}>
|
|
<div class={styles.musicContainer}>
|
|
<div class={styles.container}>
|
|
<div class={styles.container}>
|
|
<div
|
|
<div
|
|
- class={styles['right-musicName']}
|
|
|
|
|
|
+ class={[styles['right-musicName'], isScroll.value && styles.isScroll]}
|
|
style={{
|
|
style={{
|
|
opacity: !data.musicPdfUrl ? '1' : '0',
|
|
opacity: !data.musicPdfUrl ? '1' : '0',
|
|
height: !data.musicPdfUrl ? 'auto' : '0'
|
|
height: !data.musicPdfUrl ? 'auto' : '0'
|
|
}}>
|
|
}}>
|
|
<NoticeBar
|
|
<NoticeBar
|
|
|
|
+ ref={noticeBarDom}
|
|
text={item.value?.musicSheetName}
|
|
text={item.value?.musicSheetName}
|
|
class={styles.noticeBar}
|
|
class={styles.noticeBar}
|
|
background="none"
|
|
background="none"
|