(newRawValue: { [key: string]: any })
| 43 | |
| 44 | // 保存所有键值 |
| 45 | const saveRawData = (newRawValue: { [key: string]: any }) => { |
| 46 | const keyValuePairs = [] as TKeyValuePair[]; |
| 47 | for (const [key, value] of Object.entries(newRawValue)) { |
| 48 | keyValuePairs.push([key, encodeRValue(value)]); |
| 49 | } |
| 50 | valueClient.setScriptValues({ uuid: script!.uuid, keyValuePairs, isReplace: true, ts: Date.now() }); |
| 51 | updateRawData(newRawValue); |
| 52 | }; |
| 53 | |
| 54 | // 更新UI数据 |
| 55 | const updateRawData = (newRawValue: { [key: string]: any }) => { |
no test coverage detected