Closed ianef closed 7 months ago
You can add the compatConfig
property directly before installing the component:
import VueCountdown from '@chenfengyuan/vue-countdown';
VueCountdown.compatConfig = { RENDER_FUNCTION: false };
// ...
Excellent, thanks for that @fengyuanchen.
I'm migrating a project to Vue 3 that requires the use of @vue/compat until some other depencencies can be resolved or replaced.
I've replaced another component with vue-countdown, this has a much closer fit to what we need, however it's crashing in the render function.
The problem is that this.$slots.default is not accessible, there are a few other posts around relating to this where @vue/compat is used.
I've locally copied index.ts to debug it and found that by including compatConfig: { RENDER_FUNCTION: false } resolves the problem:
I don't think adding a compatConfig property when @vue/compat is not used would cause a problem, I'm not sure as I haven't had the time to setup another project to test that, but would you consider adding this change to resolve this problem.
It's also worth noting that components that rendered via a \<template> tag apparently do not have this issue.