-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add example using this.$refs.aplayer properties. #183
Labels
Comments
You can refer to this file: Lines 1 to 43 in dd10c50
If you don't use <template>
<aplayer
ref="aplayer"
:audio="audio"
:mini="playerConfig.mini"
:loop="playerConfig.loop"
:autoplay="playerConfig.autoplay"
:theme="playerConfig.theme"
:storageName="playerConfig.storageName"
@canplay="playSong"
@ended="playNextSong"
></aplayer>
</template>
<script lang="ts">
import { APlayer } from '@moefe/vue-aplayer';
export default {
playSong() {
const { currentSettings } = this.$refs.aplayer as APlayer;
}
};
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
I'm trying to use
this.$refs.aplayer.currentSettings
but as all elements in thisthis.$refs
are html elements typescript gives me an errorProperty 'currentSettings' does not exist on type 'HTMLDivElement'.
The text was updated successfully, but these errors were encountered: