Skip to content
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

Options don't work properly if used enableScrollSpy, scrollSpyDelay, scrollSpyOnce #6

Closed
ktm72 opened this issue May 25, 2023 · 3 comments
Labels
done Extra attention is needed usage Further information is requested

Comments

@ktm72
Copy link

ktm72 commented May 25, 2023

Options don't work properly if used enableScrollSpy, scrollSpyDelay, scrollSpyOnce.

Count in template:
<CountUp
:end-val="4073"
:duration="1"
:options="options"

Additional context
import { ref } from "vue";
import CountUp from "vue-countup-v3";
export default {
name: "Counter",
components: {
CountUp,
},
setup() {
const options = ref({
enableScrollSpy: true,
scrollSpyDelay: 100,
scrollSpyOnce: true,
});
return {
options,
};
},

It stopped at 0.

@jizai1125
Copy link
Owner

I tried it and there's no problem. Can you provide a reproduction?
https://codesandbox.io/s/strange-leavitt-fw8cpz?file=/src/App.vue:1162-1170

@ktm72
Copy link
Author

ktm72 commented May 25, 2023

@jizai1125 Yeah. I tried the above in pnpm vite vue project. Works perfectly. But don't know why it's not working in my npm vue cli project. Strange. At the project, I used jquery for some reasons. Could it affect the countup anyway?
BTW, Thanks for the immediate reply.

@jizai1125
Copy link
Owner

jizai1125 commented May 26, 2023

@ktm72 Can you provide a minimal reproduction or upgrade to the latest version and try again? If you have set enableScrollSpy to true, make sure to set the component prop autoplay to false.

@jizai1125 jizai1125 added the usage Further information is requested label May 26, 2023
@ktm72 ktm72 closed this as completed May 26, 2023
@jizai1125 jizai1125 added the done Extra attention is needed label Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done Extra attention is needed usage Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants