docs
docs copied to clipboard
Conflict with a variable with the same name in setup script
All in the following example:
<script setup>
const v = 'Variables declared in setup script'
</script>
<template>
<p>{{ v }} can be accessed in the template</p>
</template>
<script>
const v = 'Homonymous variable' // will cause syntax errors to be detected at variables declared by setup script
// import v from '/somewhere' // The same goes for import modules
export default {
created() {
console.log(v) // However, the homonymous variable can still be accessed, the thermal development environment is normal
},
}
</script>
This looks like an IDE or linting problem, not a documentation problem. Could you confirm which tool is reporting the error?
Is eslint.
Sorry for my late reply.
This looks like an IDE or linting problem, not a documentation problem. Could you confirm which tool is reporting the error?
Report the issue in this repo maybe because I was reading this doc, and I clicked the report link below the page.
I'm going to close this.
As far as I'm aware there isn't a documentation problem here.