mengxiong10 / vue-datepicker-next

A datepicker / datetimepicker component for Vue3
https://mengxiong10.github.io/vue-datepicker-next/
MIT License
148 stars 33 forks source link

vue3.2.39最新版本引入使用即报错[Bug] #24

Closed okssq closed 2 years ago

okssq commented 2 years ago

Vue2-datepicker version: Vue version: Browser:

Steps to reproduce

Reproduction Link or Source Code

Expected behavior

Actual behavior

mengxiong10 commented 2 years ago

@okssq 具体什么错误? 我测试了没问题

okssq commented 2 years ago

image image image

只要引用了组件就报错,删掉代码就正常~

mengxiong10 commented 2 years ago

<date-picker /> 换成 <DatePicker />

okssq commented 2 years ago

还是不行~

mengxiong10 commented 2 years ago

我试了,需要导出才可以

import DatePicker from "vue-datepicker-next";
export { DatePicker };
okssq commented 2 years ago

在script setup里面导出吗?

mengxiong10 commented 2 years ago

@okssq 对

zuo305 commented 1 year ago

不好意思,我遇到同样的问题,请问具体是怎么解决的,能给更详细一点吗?我没看懂,什么叫“在script setup”里面导出? 我是用的 options api 模式,我已经在有: components: { DatePicker , }, 用的是<date-picker 出错内容和上面这位兄台一摸一样,而且我特别奇怪的是,本地运行正常,只有发布后的版本才出这个错误。

mengxiong10 commented 1 year ago

@zuo305 具体是什么错误,还有代码是怎么样? 生产版本才有问题,感觉和 vue 有关系

zuo305 commented 1 year ago

Hi @mengxiong10 , 这个是错误截图,我的VUE 版本是3.2.47. 嗯,我这个确实很奇怪,我印象中上个月还是没有问题的,最近突然发现出错了。 Screenshot 2023-03-05 104950 Screenshot 2023-03-05 104950

zuo305 commented 1 year ago

Screenshot 2023-03-05 105005

zuo305 commented 1 year ago

Hi, @mengxiong10 I also tried the most simple code but got the same error.

Screenshot 2023-03-06 180330