Skip to content

Commit b8134c8

Browse files
author
Maiz
committed
docs: update docs
1 parent ccfd7e5 commit b8134c8

11 files changed

+157
-726
lines changed

CHANGELOG.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
English | [简体中文](./CHANGELOG_CN.md)
22

3-
## 3.10.0-rc (2021-12-xx)
3+
## 3.10.0 (2021-12-17)
44

5-
>> In this version, we refactored a lot of core logic, and used Svelte as the rendering engine for all views.
6-
>> So there are some breaking changes, a small number of methods and properties are not forward compatible.
5+
> In this version, we refactored a lot of core logic, and used Svelte as the rendering engine for all views.
6+
> So there are some breaking changes, a small number of methods and properties are not forward compatible.
7+
> If you are a vConsole plugin developer, you should pay attention to these changes.
78
89
**Breaking Changes:**
910

1011
- `Refactor(Core|Log|Network|Element)` Rebuild all views by using Svelte as template engine.
11-
- `Refactor(Core)` *Remove* `vConsole.(tabList | activedTab | $dom)` properties.
12-
- `Refactor(Plugin)` *Rename* `vConsole.showTab(pluginID)` to `vConsole.showPlugin(pluginID)`.
13-
- `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.
14-
- `Feat(Core)`: Remove helper functions `vConsole.tool` and `vConsole.$`.
12+
- `Refactor(Core)` **Remove** `vConsole.(tabList | activedTab | $dom)` properties.
13+
- `Refactor(Plugin)` **Rename** `vConsole.showTab(pluginID)` to `vConsole.showPlugin(pluginID)`.
14+
- `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.
15+
- `Feat(Core)` **Remove** helper functions `vConsole.tool` and `vConsole.$`.
1516

1617
**Common Updates:**
1718

CHANGELOG_CN.md

+26
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
[English](./CHANGELOG.md) | 简体中文
22

3+
## 3.10.0 (2021-12-17)
4+
5+
> 这个版本中,我们重构了大部分核心逻辑,并且使用 Svelte 作为所有面板的视图层模板引擎。
6+
> 这带来了一些重大变化(Breaking changes),少数属性和方法无法保证向下兼容。
7+
> 如果你是 vConsole 插件开发者,应该关注这些变化。
8+
9+
**Breaking Changes:**
10+
11+
- `Refactor(Core|Log|Network|Element)` 使用 Svelte 作为所有视图的模板引擎。
12+
- `Refactor(Core)` **删除** `vConsole.(tabList | activedTab | $dom)` 属性。
13+
- `Refactor(Plugin)` **重命名** `vConsole.showTab(pluginID)``vConsole.showPlugin(pluginID)`
14+
- `Refactor(Plugin)` **更新**插件事件 `addTopBar` 的配置参数 `{ data, onClick }``onClick` 会接收 2 个参数(之前是 0 个): `(event: Event, data?: any) => boolean`,其中 `data` 为上述配置参数的 `data` 字段。
15+
- `Feat(Core)` **删除**辅助函数 `vConsole.tool``vConsole.$`
16+
17+
**Common Updates:**
18+
19+
- `Feat(Log)` 支持展示对象键值为 `Symbol` 类型的键值对。
20+
- `Feat(Log)` 命令行支持多级关键字提示。
21+
- `Feat(Log)` 支持使用 `%s, %d, %o` 来格式化展示字符串,并且优化了 `%c` 的 CSS 样式逻辑。
22+
- `Feat(Log)` 对存在大量键值的对象或数组,加入翻页逻辑以提升渲染性能,每 50 一页。
23+
- `Feat(Network)` Request 的属性值支持复制。
24+
- `Feat(Element)` 提升交互体验,选中的节点将会被高亮,并且展开/收起(Expand/Coolapse)基于选中的节点来进行。
25+
- `Feat(Style)` 样式标签会在 vConsole 初始化后才注入 `<head>` 中,并在 vConsole 销毁后会自动移除。
26+
- `Refactor(Storage)` 优化了部分交互体验。
27+
- `Fix(Network)``Fetch` 发生 Error 时,会 throw 到外部,以符合标准实现。 (issue #458)
28+
329
## 3.9.5 (2021-11-10)
430

531
- `Style(Log)` 支持 `BigInt` 类型并更新 `Symbol` 类型的样式。

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $ npm install vconsole
4343
```
4444

4545
```javascript
46-
import VConsole from 'vconsole';
46+
import { VConsole } from 'vconsole';
4747

4848
const vConsole = new VConsole();
4949
// or init with options
@@ -111,7 +111,6 @@ vConsole:
111111

112112
- [Tutorial](./doc/tutorial.md)
113113
- [Public Properties & Methods](./doc/public_properties_methods.md)
114-
- [Helper Functions](./doc/helper_functions.md)
115114

116115
Plugin:
117116

README_CN.md

+27-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ vConsole 是框架无关的,可以在 Vue、React 或其他任何框架中使
1818
- 手动执行 JS 命令行
1919
- 自定义插件
2020

21+
详情可参考下方的截图。
22+
2123

2224

2325
## 版本说明
@@ -43,7 +45,7 @@ $ npm install vconsole
4345
Import 并初始化后,即可使用 `console.log` 功能,如 Chrome devtools 上一样。
4446

4547
```javascript
46-
import VConsole from 'vconsole';
48+
import { VConsole } from 'vconsole';
4749

4850
const vConsole = new VConsole();
4951
// 或者使用配置参数来初始化,详情见文档
@@ -78,7 +80,30 @@ vConsole.destroy();
7880

7981
[http://wechatfe.github.io/vconsole/demo.html](http://wechatfe.github.io/vconsole/demo.html)
8082

81-
![](./doc/snapshot/panel_log.jpg) ![](./doc/snapshot/panel_network.jpg) ![](./doc/snapshot/panel_element.jpg) ![](./doc/snapshot/panel_storage.jpg)
83+
84+
85+
# 截图
86+
87+
| | |
88+
|---|---|
89+
| **概览**: | |
90+
| 浅色主题 | 暗色主题 |
91+
| ![](./doc/screenshot/overview_light.jpg) | ![](./doc/screenshot/overview_dark.jpg) |
92+
| **Log 面板**: | |
93+
| Log 样式 | 命令行 |
94+
| ![](./doc/screenshot/plugin_log_types.jpg) | ![](./doc/screenshot/plugin_log_command.jpg) |
95+
| **System 面板**: | |
96+
| Performance 信息 | 输出到不同的 log 面板 |
97+
| ![](./doc/screenshot/plugin_system.jpg) | `console.log('[system]', '输出到system面板')` |
98+
| **Network 面板**: | |
99+
| 请求、回包的详情 | |
100+
| ![](./doc/screenshot/plugin_network.jpg) | |
101+
| **Element 面板**: | |
102+
| 展示 HTML 对象结构 | |
103+
| ![](./doc/screenshot/plugin_element.jpg) | |
104+
| **Storage 面板**: | |
105+
| 添加、编辑、删除、复制 Cookies / LocalStorage / SessionStorage | |
106+
| ![](./doc/screenshot/plugin_storage.jpg) | |
82107

83108

84109

@@ -89,7 +114,6 @@ vConsole 本体:
89114

90115
- [使用教程](./doc/tutorial_CN.md)
91116
- [公共属性及方法](./doc/public_properties_methods_CN.md)
92-
- [辅助函数](./doc/helper_functions_CN.md)
93117

94118
插件:
95119

doc/a_doc_index.md

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Documentation Index
88

99
- [Tutorial](./tutorial.md)
1010
- [Public Properties & Methods](./public_properties_methods.md)
11-
- [Helper Functions](./helper_functions.md)
1211

1312

1413
## Plugin

doc/a_doc_index_CN.md

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
- [使用教程](./tutorial_CN.md)
1010
- [公共属性及方法](./public_properties_methods_CN.md)
11-
- [辅助函数](./helper_functions_CN.md)
1211

1312

1413
## Plugin 插件

0 commit comments

Comments
 (0)