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

<template> can not find the variable when i use destructuring assignment in the <script setup> #4540

Closed
fxosleeping opened this issue Sep 9, 2021 · 0 comments
Labels
has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working 🔩 p2-edge-case scope: compiler scope: script-setup

Comments

@fxosleeping
Copy link

fxosleeping commented Sep 9, 2021

Version

3.2.9

Reproduction link

sfc.vuejs.org/

Steps to reproduce

import { SETTING } from '@/store/config/modules';  // SETTING is string

const store = useStore();
const { [`${SETTING}/questionTypeCascade`]: questionTypeCascade } = store.getters;
//  can't use questionTypeCascade in <template>

What is expected?

can use the variable

What is actually happening?

can't find the variable

@fxosleeping fxosleeping changed the title <template> can not find the variable when i use destructuring assignment in the <script setep> <template> can not find the variable when i use destructuring assignment in the <script setup> Sep 9, 2021
@posva posva added 🐞 bug Something isn't working 🔩 p2-edge-case has workaround A workaround has been found to avoid the problem scope: compiler scope: script-setup labels Sep 9, 2021
JuniorTour added a commit to JuniorTour/vue-next that referenced this issue Sep 9, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has workaround A workaround has been found to avoid the problem 🐞 bug Something isn't working 🔩 p2-edge-case scope: compiler scope: script-setup
Projects
None yet
2 participants