feat(sfc): change <script setup> directive resolution to require v prefix

close #3543
This commit is contained in:
Evan You 2021-06-28 17:35:28 -04:00
parent 0245c98640
commit d35e0b1468

View File

@ -739,7 +739,8 @@ function buildDirectiveArgs(
} else {
// user directive.
// see if we have directives exposed via <script setup>
const fromSetup = !__BROWSER__ && resolveSetupReference(dir.name, context)
const fromSetup =
!__BROWSER__ && resolveSetupReference('v-' + dir.name, context)
if (fromSetup) {
dirArgs.push(fromSetup)
} else {