|
|
@ -6,8 +6,6 @@ |
|
|
|
* |
|
|
|
* modified by Evan You (@yyx990803) |
|
|
|
* |
|
|
|
|
|
|
|
/* |
|
|
|
* Not type-checking this because this file is perf-critical and the cost |
|
|
|
* of making flow understand it is not worth it. |
|
|
|
*/ |
|
|
@ -17,6 +15,7 @@ import config from '../config' |
|
|
|
import { SSR_ATTR } from 'shared/constants' |
|
|
|
import { registerRef } from './modules/ref' |
|
|
|
import { activeInstance } from '../instance/lifecycle' |
|
|
|
import { isTextInputType } from 'web/util/element' |
|
|
|
|
|
|
|
import { |
|
|
|
warn, |
|
|
@ -48,14 +47,12 @@ function sameVnode (a, b) { |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
// Some browsers do not support dynamically changing type for <input>
|
|
|
|
// so they need to be treated as different nodes
|
|
|
|
function sameInputType (a, b) { |
|
|
|
if (a.tag !== 'input') return true |
|
|
|
let i |
|
|
|
const typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type |
|
|
|
const typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type |
|
|
|
return typeA === typeB |
|
|
|
return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB) |
|
|
|
} |
|
|
|
|
|
|
|
function createKeyToOldIdx (children, beginIdx, endIdx) { |
|
|
|