Skip to content

v3.10.0

Choose a tag to compare

@Maizify Maizify released this 17 Dec 08:25
· 172 commits to master since this release
011e607

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) Remove vConsole.(tabList | activedTab | $dom) properties.
  • Refactor(Plugin) Rename vConsole.showTab(pluginID) to vConsole.showPlugin(pluginID).
  • Refactor(Plugin) Change callback option { data, onClick } of plugin event addTopBar: onClick method will receive 2 arguments (which was 0 before): (event: Event, data?: any) => boolean, which data is the above option's data field.
  • Feat(Core) Remove helper functions vConsole.tool and vConsole.$.

Common Updates:

  • Feat(Log) Support object's Symbol keys.
  • Feat(Log) Support multi-level keyword hint in Log's command line input.
  • Feat(Log) Support string formatting %s, %d, %o, and better %c CSS 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 when Fetch get 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)