|
|
|
|
@ -85,6 +85,48 @@
|
|
|
|
|
|
|
|
|
|
下次用户打开页面时,流程会从第1步重新开始,但这次会从 localStorage 加载上次保存的数据,从而恢复之前的布局状态。
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 历史任务
|
|
|
|
|
* 在index.js中conputedInitData函数,当type为save的时候帮我处理带有下划线的数据,数据结构参考data.json和下面示例(xxx为省略结果不代表真实值)
|
|
|
|
|
```
|
|
|
|
|
mainData = {
|
|
|
|
|
xxx,
|
|
|
|
|
children: [{
|
|
|
|
|
"focusedStyle_background": "",
|
|
|
|
|
"focusedStyle_border_width": 0,
|
|
|
|
|
"focusedStyle_border_color": "",
|
|
|
|
|
"focusedStyle_scale": 1,
|
|
|
|
|
...这里后续还有可能扩展(例如)
|
|
|
|
|
"other_name": "",
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
最终转换为(最终转换的结果需要保留原址,类似focusedStyle_background):
|
|
|
|
|
mainData = {
|
|
|
|
|
xxx,
|
|
|
|
|
children: [{
|
|
|
|
|
focusedStyle: {
|
|
|
|
|
background: xxx,
|
|
|
|
|
border: {
|
|
|
|
|
width: xxx,
|
|
|
|
|
color: xxx
|
|
|
|
|
},
|
|
|
|
|
scale: xxx
|
|
|
|
|
},
|
|
|
|
|
...这里后续还有扩展也保持一样的转换(例如)
|
|
|
|
|
other: {
|
|
|
|
|
name: xxx
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 对话记录
|
|
|
|
|
### 本次会话总结
|
|
|
|
|
- **任务**: 在 `js/index.js` 的 `conputedInitData` 函数中,当 `type` 为 'save' 时,处理带有下划线的属性(例如 `focusedStyle_background`),将其转换为嵌套对象结构(例如 `focusedStyle: { background: xxx }`),并保留原始带下划线的属性。
|
|
|
|
|
|