|
@@ -10,30 +10,46 @@ export default defineComponent({
|
|
|
props: {
|
|
|
show: {
|
|
|
type: Boolean,
|
|
|
- default: false
|
|
|
+ default: false,
|
|
|
},
|
|
|
score: {
|
|
|
- default: ''
|
|
|
- }
|
|
|
+ default: '',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ sendMessage: () => {
|
|
|
+ window.parent.postMessage(
|
|
|
+ {
|
|
|
+ api: 'headerTogge',
|
|
|
+ playState: runtime.playState,
|
|
|
+ show: true
|
|
|
+ },
|
|
|
+ '*'
|
|
|
+ )
|
|
|
+ },
|
|
|
},
|
|
|
render() {
|
|
|
- return (
|
|
|
- (this.score && runtime.osmd) || this.show? (
|
|
|
- <Popup
|
|
|
- show={state.activeTick > -1}
|
|
|
- closeable
|
|
|
- close-icon-position="bottom-right"
|
|
|
- onClickCloseIcon={RunTimeUtils.stopTick}
|
|
|
- style={{
|
|
|
- width: '100%',
|
|
|
- height: '100%',
|
|
|
- display: 'flex',
|
|
|
- background: 'transparent',
|
|
|
- }}
|
|
|
- >
|
|
|
- <Tick dots={(runtime as any)?.osmd?.numerator || getDuration((runtime as any).osmd).numerator || 0} repeat={state.activeTickRepeat}/>
|
|
|
- </Popup>
|
|
|
- ) : null
|
|
|
- )
|
|
|
- }
|
|
|
+ return (this.score && runtime.osmd) || this.show ? (
|
|
|
+ <Popup
|
|
|
+ show={state.activeTick > -1}
|
|
|
+ closeable
|
|
|
+ close-icon-position="bottom-right"
|
|
|
+ onClickCloseIcon={() => {
|
|
|
+ RunTimeUtils.stopTick()
|
|
|
+ this.sendMessage()
|
|
|
+ }}
|
|
|
+ style={{
|
|
|
+ width: '100%',
|
|
|
+ height: '100%',
|
|
|
+ display: 'flex',
|
|
|
+ background: 'transparent',
|
|
|
+ }}
|
|
|
+ >
|
|
|
+ <Tick
|
|
|
+ dots={(runtime as any)?.osmd?.numerator || getDuration((runtime as any).osmd).numerator || 0}
|
|
|
+ repeat={state.activeTickRepeat}
|
|
|
+ />
|
|
|
+ </Popup>
|
|
|
+ ) : null
|
|
|
+ },
|
|
|
})
|