MCPcopy Create free account
hub / github.com/ygs-code/vue / shouldUpdateValue

Function shouldUpdateValue

vue.js:10588–10594  ·  view source on GitHub ↗
(elm, checkVal)

Source from the content-addressed store, hash-verified

10586
10587 // 判断你是否更新value
10588 function shouldUpdateValue(elm, checkVal) {
10589 return (!elm.composing && (
10590 elm.tagName === 'OPTION' ||
10591 isNotInFocusAndDirty(elm, checkVal) ||
10592 isDirtyWithModifiers(elm, checkVal)
10593 ))
10594 }
10595
10596 function isNotInFocusAndDirty(elm, checkVal) {
10597 // return true when textbox (.number and .trim) loses focus and its value is

Callers 1

updateDOMPropsFunction · 0.85

Calls 2

isNotInFocusAndDirtyFunction · 0.85
isDirtyWithModifiersFunction · 0.85

Tested by

no test coverage detected