MCPcopy
hub / github.com/logamee/lin-ui / setDiffData

Method setDiffData

src/core/utils/data-util.js:7–21  ·  view source on GitHub ↗

* 设置差异数据 * @param component * @param data

(component, data)

Source from the content-addressed store, hash-verified

5 * @param data
6 */
7 setDiffData(component, data) {
8 const diffData = {};
9
10 // 遍历获取到有差异的数据
11 Object.keys(data).forEach(key => {
12 if (component.data[key] !== data[key]) {
13 diffData[key] = data[key];
14 }
15 });
16
17 // 设置数据
18 if (Object.keys(diffData).length) {
19 component.setData(diffData);
20 }
21 }
22}
23
24const dataUtil = new DataUtil;

Callers 15

'clipWidth, clipHeight'Function · 0.80
'rotateAngle'Function · 0.80
'angle'Function · 0.80
'cutAnimation'Function · 0.80
'limitMove'Function · 0.80
'width, height'Function · 0.80
clipTouchMoveFunction · 0.80
moveStopFunction · 0.80
moveThrottleFunction · 0.80
imageTouchMoveFunction · 0.80
imageTouchEndFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected