浏览代码

chore: fix import path + comment

Evan You 6 年之前
父节点
当前提交
d866d389f3
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 0
      packages/compiler-dom/src/stringifyStatic.ts
  2. 1 1
      packages/runtime-dom/src/nodeOps.ts

+ 4 - 0
packages/compiler-dom/src/stringifyStatic.ts

@@ -32,6 +32,10 @@ function shouldOptimize(node: ElementNode): boolean {
   let bindingThreshold = 5
   let nodeThreshold = 20
 
+  // TODO: check for cases where using innerHTML will result in different
+  // output compared to imperative node insertions.
+  // probably only need to check for most common case
+  // i.e. non-phrasing-content tags inside `<p>`
   function walk(node: ElementNode) {
     for (let i = 0; i < node.children.length; i++) {
       if (--nodeThreshold === 0) {

+ 1 - 1
packages/runtime-dom/src/nodeOps.ts

@@ -1,4 +1,4 @@
-import { RendererOptions } from '@vue/runtime-core/src'
+import { RendererOptions } from '@vue/runtime-core'
 
 const doc = (typeof document !== 'undefined' ? document : null) as Document
 const svgNS = 'http://www.w3.org/2000/svg'