]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(template-explorer): rename watch -> watchEffect (#780)
authordjy0 <krivergo3@gmail.com>
Wed, 26 Feb 2020 15:13:07 +0000 (23:13 +0800)
committerGitHub <noreply@github.com>
Wed, 26 Feb 2020 15:13:07 +0000 (10:13 -0500)
packages/template-explorer/src/index.ts

index cf97e8e69f7a9cdafde105e63a4cd14a5aac0c61..af90ce6c4b12289672feb55a84719e9b0edc60cb 100644 (file)
@@ -2,7 +2,7 @@ import * as m from 'monaco-editor'
 import { compile, CompilerError, CompilerOptions } from '@vue/compiler-dom'
 import { compile as ssrCompile } from '@vue/compiler-ssr'
 import { compilerOptions, initOptions, ssrMode } from './options'
-import { watch } from '@vue/runtime-dom'
+import { watchEffect } from '@vue/runtime-dom'
 import { SourceMapConsumer } from 'source-map'
 
 declare global {
@@ -221,7 +221,7 @@ window.init = () => {
   )
 
   initOptions()
-  watch(reCompile)
+  watchEffect(reCompile)
 }
 
 function debounce<T extends (...args: any[]) => any>(