MCPcopy Index your code
hub / github.com/ygs-code/vue / normalizeStyleBinding

Function normalizeStyleBinding

vue.js:10671–10680  ·  view source on GitHub ↗
(bindingStyle)

Source from the content-addressed store, hash-verified

10669 //将可能的数组/字符串值规范化为对象
10670 //看到这里
10671 function normalizeStyleBinding(bindingStyle) {
10672 if (Array.isArray(bindingStyle)) {
10673 return toObject(bindingStyle)
10674 }
10675 if (typeof bindingStyle === 'string') {
10676 //把style 字符串 转换成对象 比如'width:100px;height:200px;' 转化成 {width:100px,height:200px}
10677 return parseStyleText(bindingStyle)
10678 }
10679 return bindingStyle
10680 }
10681
10682 /**
10683 * parent component style should be after child's

Callers 2

normalizeStyleDataFunction · 0.85
updateStyleFunction · 0.85

Calls 1

toObjectFunction · 0.85

Tested by

no test coverage detected