Преглед изворни кода

fix(compiler-sfc): treat the return value of `useTemplateRef` as a definite ref (#13197)

山吹色御守 пре 1 година
родитељ
комит
8ae11226e8
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      packages/compiler-sfc/src/compileScript.ts

+ 1 - 0
packages/compiler-sfc/src/compileScript.ts

@@ -1104,6 +1104,7 @@ function walkDeclaration(
                 m === userImportAliases['shallowRef'] ||
                 m === userImportAliases['customRef'] ||
                 m === userImportAliases['toRef'] ||
+                m === userImportAliases['useTemplateRef'] ||
                 m === DEFINE_MODEL,
             )
           ) {