Commit 9cbc1e5
committed
fix: 弹窗"响应头"概览数字始终是 0
buildPopupResult 里输出的字段叫 headerCount: Object.keys(headers).length(一个数字),并不返还原始 headers 对象——后者只在 buildPopupRawResult 里有。但 Popup.vue 的 headerCount computed 一直读的是 state.result.headers 然后 Object.keys(headers || {}).length,state.result 实际只有 headerCount 数字字段没有 headers 对象,于是永远落到 Object.keys({}).length = 0。
computed 加一条优先分支:先读 state.result.headerCount,存在且是 number 就直接返回。原本读 state.result.headers 的两条 fallback 仍保留兼容历史缓存数据,但现在主路径走数字字段。
插件版本升级到 1.1.0(响应头数字第一次能正确显示,是个面向用户可见的修,从 1.0.x 跨到 1.1.x 标记一下)。1 parent 7eff6c5 commit 9cbc1e5
2 files changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| 342 | + | |
342 | 343 | | |
343 | 344 | | |
344 | 345 | | |
| |||
0 commit comments