Closed yeya closed 1 year ago
Hey,
I wasn't able to reproduce your issue on codepen: https://codepen.io/abichinger/pen/poQVeWM codepen packages:
vue@2.7.14
vue-js-cron/light@1.0.5
Please provide your source code if you need further help.
I see. You have to register cronLight to the global Vue.
My issue is that I tried to use it without registering:
<template>
<div class="getting-started-light">
<cron-light v-model="value" @error="error = $event"></cron-light>
<div class="mt-2 grey--text text--darken-1">cron expression: {{ value }}</div>
</div>
</template>
<script>
import cronLight from '@vue-js-cron/light'
import '@vue-js-cron/light/dist/light.css'
export default {
components: { cronLight },
data() {
return {
value: '* * * * *',
error: '',
}
},
}
</script>
Reproduction: https://stackblitz.com/edit/vue2-vue-cli-uudsl8?file=package.json,src%2Fcomponents%2FHelloWorld.vue,src%2Fmain.js
The Vue2 version of vue-js-cron/light
exports the following
const plugin = {
install,
component,
util: core.util
};
export default plugin;
It should be possible to register the component with:
components: { CronLight: cronLight.component },
https://stackblitz.com/edit/vue2-vue-cli-gui23p?file=src%2Fcomponents%2FHelloWorld.vue
Cool! Thanks a lot! Maybe should be added to readme?
Hi
I'm getting the error on vue 2.7.14:
Failed to mount component: template or render function not defined.
I tried to install ^1.0.5, got the same error.