Closed ljz572000 closed 10 months ago
Hi guys,
Since I need to build a new page using Vue3 that include a new datapicker component, I have a issue unable to perform normally.
the information shown in the console.
[Vue warn]: Failed to resolve component: vuedatepicker
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="https://unpkg.com/@vuepic/vue-datepicker@latest/dist/main.css"> </head> <body> <script src="https://unpkg.com/vue@latest"></script> <script src="https://unpkg.com/@vuepic/vue-datepicker@latest"></script> <div id="app"> {{ message }} <VueDatePicker ></VueDatePicker> </div> <script> const { createApp, ref, onMounted, onUnmounted } = Vue; createApp({ components: { Datepicker: VueDatePicker }, setup() { const message = ref("Hello vue!"); onMounted(() => { console.log(`the component is now mounted.`); }); return { message, }; }, }).mount("#app"); </script> </body> </html>
The documentation has the wrong example, In the HTML part, instead VueDatePicker use Datepicker, or just replace components: { Datepicker: VueDatePicker }, with components: { VueDatePicker },
VueDatePicker
Datepicker
components: { Datepicker: VueDatePicker },
components: { VueDatePicker },
Hi guys,
Since I need to build a new page using Vue3 that include a new datapicker component, I have a issue unable to perform normally.
the information shown in the console.