We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I tried to use codesendbox or stackblitz, but they both have problems with the type system and I could only take screenshots
When the auto-imports.d.ts exists, @tanstack/vue-query export data can't auto UnwrapRef in template
ImVueRef types is “const ImVueRef: globalThis.Ref<string>” useQueryData types is "const useQueryData: Ref<any> | Ref<undefined>"
/** * light data */ const ImVueRef = ref('start'); const {data: useQueryData, isPending} = useQuery({ queryKey: ['testing_light_data'], queryFn: () => axios .get('/api/lightcontent/index/getData') .then(r => r.data) .then(res => { return res.data; }) });
plugins: [ AutoImport({ include: [ /\.[tj]sx?$/, // .ts, .tsx, .js, .jsx /\.vue$/, /\.vue\?vue/, // .vue /\.md$/ // .md ], imports: [ // presets 'vue', 'vue-router', '@vueuse/core', { axios: [['default', 'axios']], dayjs: [['default', 'dayjs']], ['@tanstack/vue-query']: ['useQuery'] }, VantImports(), ], resolvers: [VantResolver()], vueTemplate: true, dirs: [ './src/js', './src/js/common', './src/js/v-component' ], dts: './auto-imports.d.ts' }), Components({ resolvers: [VantResolver()] }) ],
no
"vue": "3.4.25", "eslint": "^8.56.0", "typescript": "^5.3.3", "@vant/auto-import-resolver": "^1.2.1", "unplugin-auto-import": "^0.17.6", "unplugin-vue-components": "^0.27.0" windows: 10 vscode: 1.87.2 pnpm: 8.15.6 node: 20.11.0
pnpm
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
When the auto-imports.d.ts exists, @tanstack/vue-query export data can't auto UnwrapRef in template
When the auto-imports.d.ts exists:
When the auto-imports.d.ts not exists:
Query setting
ImVueRef types is “const ImVueRef: globalThis.Ref<string>”
useQueryData types is "const useQueryData: Ref<any> | Ref<undefined>"
AutoImports Options
Reproduction
no
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: