Skip to content

函数无法在模板中使用,并且会导致 IDE 的代码提示导入消失 #590

@WangJincheng4869

Description

@WangJincheng4869

Describe the bug

Image Image Image

其实不能用也可以,但是不让 IDE 的提示导入功能消失也行。

Reproduction

https://github.com/WangJincheng4869/fanKuiWenJian/blob/main/packages/vite-auto-imports/src/components/TheWelcome.vue

System Info

System:
    OS: Windows 11 10.0.26100
    CPU: (16) x64 AMD Ryzen 9 7940H  w/ Radeon 780M Graphics     
    Memory: 6.74 GB / 31.22 GB
  Binaries:
    Node: 22.17.1 - D:\Program Files\nodejs\node.EXE
    npm: 10.9.2 - D:\Program Files\nodejs\npm.CMD
    pnpm: 10.15.0 - D:\Users\jcwang\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (133.0.3065.69)
    Internet Explorer: 11.0.26100.1882

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions