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

chore: fix useShadowRoot warning method name

Evan You пре 1 година
родитељ
комит
197afc2c1f
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      packages/runtime-dom/src/apiCustomElement.ts

+ 2 - 2
packages/runtime-dom/src/apiCustomElement.ts

@@ -664,10 +664,10 @@ export function useShadowRoot(): ShadowRoot | null {
     return (el as VueElement).shadowRoot
   } else if (__DEV__) {
     if (!instance) {
-      warn(`useCustomElementRoot called without an active component instance.`)
+      warn(`useShadowRoot called without an active component instance.`)
     } else {
       warn(
-        `useCustomElementRoot can only be used in components defined via ` +
+        `useShadowRoot can only be used in components defined via ` +
           `defineCustomElement.`,
       )
     }