We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have created a simple timer component in using typescript, but the timer isn't started. Any idea what I'm doing wrong?
<script lang="ts"> import { Component, Vue, Prop } from 'vue-property-decorator'; import { mixin as VueTimers } from 'vue-timers'; @Component({ mixins: [VueTimers] }) export default class ApplicationStatus extends Vue { private time: string = new Date().toString(); timers: { tick: { time: 2000; autostart: true; repeat: true }; }; tick() { this.time = new Date().toString(); console.debug(new Date()); } } </script>
The text was updated successfully, but these errors were encountered:
I ran into this issue as well, and the only way I could get the timer to work was by setting the timers property directly on the $options property.
timers
$options
Here is an example that is works:
<script lang="ts"> import { Component, Vue } from 'vue-property-decorator'; import { mixin as VueTimers } from 'vue-timers'; @Component({ name: 'App.vue', mixins: [VueTimers], }) export default class App extends Vue { constructor() { super(); (this.$options as any).timers = { log: { time: 1000, autostart: true, repeat: true }, }; } log() { console.log('hello world'); } } </script>
It's not the best, but it did allow us to get the timer working for now.
Sorry, something went wrong.
No branches or pull requests
I have created a simple timer component in using typescript, but the timer isn't started. Any idea what I'm doing wrong?
The text was updated successfully, but these errors were encountered: