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

解决 pinia store 的类型错误问题 #73

Closed
cuixiaorui opened this issue Jan 30, 2024 · 0 comments
Closed

解决 pinia store 的类型错误问题 #73

cuixiaorui opened this issue Jan 30, 2024 · 0 comments
Assignees
Labels
technology Purely technical issues
Milestone

Comments

@cuixiaorui
Copy link
Contributor

cuixiaorui commented Jan 30, 2024

现在项目中针对于 pinia 的类型提示全部是错误的

直接使用 store.xxx 的话 是不需要包含 .value 的

image

诊断

之前创建了一个新的 nuxtjs 项目,把所有代码全部 copy 过去后 发现 pinia 的类型提示正常了

所以说业务代码层面应该是不会破坏 怀疑是 nuxtjs 本身环境导致的

这里首先怀疑 auto import 导致的问题,因为他会修改 type

并且 auto import 因为导入来源不清晰 也会导致后续的维护成本增加的问题

后面可以尝试关掉 auto import 功能后在尝试创建新的 nuxtjs 项目看看是否可以解决这个问题

@cuixiaorui cuixiaorui added the technology Purely technical issues label Jan 30, 2024
@cuixiaorui cuixiaorui added this to the Stone milestone Jan 30, 2024
@Nauxscript Nauxscript self-assigned this Jan 30, 2024
shellingfordly added a commit to shellingfordly/earthworm that referenced this issue Jan 31, 2024
Nauxscript added a commit that referenced this issue Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technology Purely technical issues
Projects
Status: Done
Development

No branches or pull requests

2 participants