1
hangbale 2022-08-12 10:47:14 +08:00
```
DebugPrint: 0x21e0000caa35: [JSPromise] - map: 0x21e0002830b1 <Map[20](HOLEY_ELEMENTS)> [FastProperties] - prototype: 0x21e000249ffd <Object map = 0x21e0002830d9> - elements: 0x21e000002251 <FixedArray[0]> [HOLEY_ELEMENTS] - status: pending - reactions: 0 - has_handler: 0 - handled_hint: 0 - is_silent: 0 - properties: 0x21e000002251 <FixedArray[0]> - All own properties (excluding elements): {} 0x21e0002830b1: [Map] - type: JS_PROMISE_TYPE - instance size: 20 - inobject properties: 0 - elements kind: HOLEY_ELEMENTS - unused property fields: 0 - enum length: invalid - stable_map - back pointer: 0x21e0000023d9 <undefined> - prototype_validity cell: 0x21e0001c4461 <Cell value= 1> - instance descriptors (own) #0: 0x21e0000021e5 <Other heap object (STRONG_DESCRIPTOR_ARRAY_TYPE)> - prototype: 0x21e000249ffd <Object map = 0x21e0002830d9> - constructor: 0x21e000249ea1 <JSFunction Promise (sfi = 0x21e0001df8e5)> - dependent code: 0x21e0000021d9 <Other heap object (WEAK_ARRAY_LIST_TYPE)> - construction counter: 0 ``` |
2
nitmali 2022-08-12 10:52:38 +08:00 2
chrome 中 console.log 打印出来的是引用的“快照”,点开时会根据引用地址再去获取,就和“快照”不一样了。
|
3
tutou 2022-08-12 11:24:33 +08:00
就是 Promise 对象啊,你调用 JSON.stringify 干嘛
|
4
zhaol 2022-08-12 11:36:56 +08:00
你打印的时候打开对象没发现后面会有的小的感叹号(好像是 i,不确定了)吗,那个就是告诉你为什么点开看跟不点开看数据不一样的原因。
|
5
Danswerme 2022-08-12 13:25:10 +08:00 via iPhone
p 是一个 Promise ,你想拿到数据可以用 p.then(res => console.log(res))
|
6
renmu 2022-08-12 13:30:42 +08:00 via Android
因为就是一个 promise ,log 时做了优化
|