vConsole icon indicating copy to clipboard operation
vConsole copied to clipboard

请问一下最新版本的这两个属性是否能读取?

Open xubillde opened this issue 3 years ago • 4 comments

vConsole Version:3.11.2

requestList属性无法读取

3.9.5版本 请求 const { reqList } = vConsole.pluginList.network 日志 pluginList.default.$tabbox.innerText

xubillde avatar Jan 25 '22 07:01 xubillde

不可以了。当前版本已重构了代码,不存在 reqList$tabbox 这些对象了。 并且也不推荐直接读取 vConsole.pluginList 里的插件原始对象,因为并非公开接口,里头的实现是可能会被修改的。

目前可通过 vConsole.network 来操作 Network 的公开接口,3.11.2 版本支持 add, update, clear 方法。 不妨说说你想要实现的需求?

Maizify avatar Jan 25 '22 09:01 Maizify

看到这篇文章,做了类似的功能。方便测试和开发反馈时提供数据。所以想提取所有的请求和打印的日志https://juejin.cn/post/7047729931303780388

xubillde avatar Jan 26 '22 00:01 xubillde

明白了。我评估一下吧,后续可以考虑在 vConsole.network 上暴露其他标准接口,来实现上述玩法。当然,vConsole.pluginList 这种内部写法就还是不要用了。

Maizify avatar Feb 16 '22 06:02 Maizify

明白了。我评估一下吧,后续可以考虑在 vConsole.network 上暴露其他标准接口,来实现上述玩法。当然,vConsole.pluginList 这种内部写法就还是不要用了。

目前还没有实现 vConsole.network 诸如 get 的方法么?

eiriksgata avatar Sep 28 '22 08:09 eiriksgata