Repository navigation
v3.10.0
EN:
In this version, we refactored a lot of core logic, and used Svelte as the rendering engine for all views.
So there are some breaking changes, a small number of methods and properties are not forward compatible.
If you are a vConsole plugin developer, you should pay attention to these changes.
Breaking Changes:
Refactor(Core|Log|Network|Element)Rebuild all views by using Svelte as template engine.Refactor(Core)RemovevConsole.(tabList | activedTab | $dom)properties.Refactor(Plugin)RenamevConsole.showTab(pluginID)tovConsole.showPlugin(pluginID).Refactor(Plugin)Change callback option{ data, onClick }of plugin eventaddTopBar:onClickmethod will receive 2 arguments (which was 0 before):(event: Event, data?: any) => boolean, whichdatais the above option'sdatafield.Feat(Core)Remove helper functionsvConsole.toolandvConsole.$.
Common Updates:
Feat(Log)Support object'sSymbolkeys.Feat(Log)Support multi-level keyword hint in Log's command line input.Feat(Log)Support string formatting%s, %d, %o, and better%cCSS styling formatting.Feat(Log)Add pagination to objects or arrays to improve rendering performance, with 50 key-values per page.Feat(Network)Add copy buttons to request attributes.Feat(Element)Improve UX, selected node will be highlighted and applied to Expand/Collapse action.Feat(Style)Style tags will be loaded into<head>after vConsole initialization, and removed after destruction.Refactor(Storage)Improve UX.Fix(Network)Throw error whenFetchget an error. (issue #458)
CN:
这个版本中,我们重构了大部分核心逻辑,并且使用 Svelte 作为所有面板的视图层模板引擎。
这带来了一些重大变化(Breaking changes),少数属性和方法无法保证向下兼容。
如果你是 vConsole 插件开发者,应该关注这些变化。
Breaking Changes:
Refactor(Core|Log|Network|Element)使用 Svelte 作为所有视图的模板引擎。Refactor(Core)删除vConsole.(tabList | activedTab | $dom)属性。Refactor(Plugin)重命名vConsole.showTab(pluginID)为vConsole.showPlugin(pluginID)。Refactor(Plugin)更新插件事件addTopBar的配置参数{ data, onClick }:onClick会接收 2 个参数(之前是 0 个):(event: Event, data?: any) => boolean,其中data为上述配置参数的data字段。Feat(Core)删除辅助函数vConsole.tool和vConsole.$。
Common Updates:
Feat(Log)支持展示对象键值为Symbol类型的键值对。Feat(Log)命令行支持多级关键字提示。Feat(Log)支持使用%s, %d, %o来格式化展示字符串,并且优化了%c的 CSS 样式逻辑。Feat(Log)对存在大量键值的对象或数组,加入翻页逻辑以提升渲染性能,每 50 一页。Feat(Network)Request 的属性值支持复制。Feat(Element)提升交互体验,选中的节点将会被高亮,并且展开/收起(Expand/Coolapse)基于选中的节点来进行。Feat(Style)样式标签会在 vConsole 初始化后才注入<head>中,并在 vConsole 销毁后会自动移除。Refactor(Storage)优化了部分交互体验。Fix(Network)当Fetch发生 Error 时,会 throw 到外部,以符合标准实现。 (issue #458)