Skip to content

Commit a3fd1b7

Browse files
MaizifyZippowxkzimvakai
authored
v3.5.0 (Tencent#382)
* chore: update plugins list * fix: Fix fetch lose `Status, Time` in Network && Fix fetch error for text reponse. * feat: copy log * chore: remove transitionEnd * docs: update changelog * chore: update NPM dependencies * docs: update doc * fix(log): do not sort array's keys * chore: update syntax * fix(network): Fix `disableLogScrolling` not working in Network panel. (issue Tencent#282, Tencent#379) * chore: add .npmignore * Perf(System): Rename "System" field to "Client", and add `MacOS` version. * style(log): fix copy style * perf(log): use localeCompare to sort keys * docs: update changelog Co-authored-by: 王鑫凯 <[email protected]> Co-authored-by: zimv <[email protected]> Co-authored-by: akai <[email protected]>
1 parent 30e1d23 commit a3fd1b7

File tree

18 files changed

+2156
-2020
lines changed

18 files changed

+2156
-2020
lines changed

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.babelrc
2+
webpack.config.js
3+
webpack.dev.config.js

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
English | [简体中文](./CHANGELOG_CN.md)
22

3+
#### 3.5.0 (2021-04-28)
4+
5+
- `Feature(Log)` Add ability to copy a single line of logs. (by @akai)
6+
- `Feature(Plugin)` New third-party plugin [vconsole-vue-devtools-plugin](https://github.com/Zippowxk/vue-vconsole-devtools). (by @Zippowxk)
7+
- `Perf(System)` Rename "System" field to "Client", and add `MacOS` version.
8+
- `Fix(Log)` Use natural sorting to sort object and array's keys. (issue #372)
9+
- `Fix(Network)` Fix JSON parse error when `contentType` is `text/html`. (by @zimv)
10+
- `Fix(Network)` Fix `disableLogScrolling` not working in Network panel. (issue #282, #379)
11+
12+
313
#### V3.4.1 (2021-04-09)
414

515
- `Feature(General)` Add `setSwitchPosition(x, y)` method to update the position of switch button, see [Public Properties & Methods](./doc/public_properties_methods.md) for more details.
@@ -19,7 +29,7 @@ English | [简体中文](./CHANGELOG_CN.md)
1929
- `Feature(Network)` Add `fetch` log in Network tab. (by @weiqian93)
2030
- `Feature(Network)` Add Request Headers to Network tab.
2131
- `Feature(Network)` Use short URL and display parameters in Network tab. (issue #291)
22-
- `Feature(Plugin)` New plugin [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats). (by @smackgg)
32+
- `Feature(Plugin)` New third-party plugin [vconsole-stats-plugin](https://github.com/smackgg/vConsole-Stats). (by @smackgg)
2333
- `Fix(General)` The position of the switch button will be reset by mistake when clicked.
2434
- `Fix(General)` Fix `document.documentElement.offsetHeight|offsetWidth` is unreliable in newer browsers. (by @littlee)
2535
- `Fix(General)` Prevent dispatchEvent for disabled or readOnly elements. (by @norux)

CHANGELOG_CN.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
[English](./CHANGELOG.md) | 简体中文
22

3+
#### 3.5.0 (2021-04-28)
4+
5+
- `Feature(Log)` 新增复制单行日志的能力。 (by @akai)
6+
- `Feature(Plugin)` 新第三方插件 [vconsole-vue-devtools-plugin](https://github.com/Zippowxk/vue-vconsole-devtools)。 (by @Zippowxk)
7+
- `Perf(System)` 将 "System" 字段改名为 "Client",并新增 `MacOS` 系统版本号。
8+
- `Fix(Log)` 使用自然排序来排序 object 和 array 的键值。 (issue #372)
9+
- `Fix(Network)` 修复当 `contentType``text/html` 时潜在的 JSON 错误。 (by @zimv)
10+
- `Fix(Network)` 修复 `disableLogScrolling` 参数在 Network 面板中不生效的问题。 (issue #282, #379)
11+
12+
313
#### V3.4.1 (2021-04-09)
414

515
- `Feature(General)` 新增 `setSwitchPosition(x, y)` 方法以更新开关按钮的位置,见 [Public Properties & Methods](./doc/public_properties_methods_CN.md)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Plugin:
7171
- [Plugin: Event List](./doc/plugin_event_list.md)
7272

7373

74-
## Plugins
74+
## Third-party Plugins
7575

7676
- [vConsole-sources](https://github.com/WechatFE/vConsole-sources)
7777
- [vconsole-webpack-plugin](https://github.com/diamont1001/vconsole-webpack-plugin)

README_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ vConsole 本体:
7474

7575

7676

77-
## 插件列表
77+
## 第三方插件列表
7878

7979
- [vConsole-sources](https://github.com/WechatFE/vConsole-sources)
8080
- [vconsole-webpack-plugin](https://github.com/diamont1001/vconsole-webpack-plugin)

dev/data/success.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ok

dev/log.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
}
3838
});
3939

40+
// setInterval(() => {
41+
// console.log(Math.random());
42+
// console.log('[system]', Math.random());
43+
// }, 300);
44+
4045
function formattedLog() {
4146
console.info('formattedLog() Start');
4247
console.log('[default]', 'This log should be shown in Log tab.');

dev/network.html

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,24 @@
1717
<a onclick="getFetchSimple()" href="javascript:;" class="weui_btn weui_btn_default">getFetch(simple)</a>
1818
<a onclick="postFetch()" href="javascript:;" class="weui_btn weui_btn_default">postFetch</a>
1919
<a onclick="postFetchByRequest()" href="javascript:;" class="weui_btn weui_btn_default">postFetchByRequest</a>
20+
<a onclick="getFetchText()" href="javascript:;" class="weui_btn weui_btn_default">getFetchText</a>
21+
<a onclick="getAjaxText()" href="javascript:;" class="weui_btn weui_btn_default">getAjaxText</a>
2022
</div>
2123
</body>
2224
</html>
2325

2426
<script>
25-
window.vConsole = new window.VConsole();
27+
window.vConsole = new window.VConsole({
28+
maxLogNumber: 1000,
29+
// disableLogScrolling: true,
30+
onReady: function() {
31+
console.log('vConsole is ready.');
32+
}
33+
});
34+
35+
// setInterval(() => {
36+
// postAjax();
37+
// }, 300);
2638

2739
function postAjax() {
2840
console.info('postAjax() Start, response should be logged after End');
@@ -130,4 +142,35 @@
130142
console.info('postFetchByRequest() End');
131143
}
132144

145+
146+
function getFetchText() {
147+
console.info('getFetchText() Start, response should be logged after End');
148+
window.fetch('./data/success.txt?type=fetch&id=' + Math.random(), {
149+
method: 'GET',
150+
headers: {
151+
'custom-header': 'foobar',
152+
'content-type': 'application/json'
153+
},
154+
}).then((data) => {
155+
return data.text();
156+
}).then((data) => {
157+
console.log('getFetchText Response:', data);
158+
});
159+
console.info('getFetchText() End');
160+
}
161+
162+
function getAjaxText() {
163+
console.info('getAjaxText() Start, response should be logged after End');
164+
const xhr = new XMLHttpRequest();
165+
xhr.open('GET', './data/success.txt?type=xhr&id=' + Math.random());
166+
xhr.setRequestHeader('custom-header', 'foobar');
167+
xhr.send();
168+
xhr.onload = () => {
169+
console.log('getAjaxText Response:', xhr.response);
170+
};
171+
xhr.onerror = () => {
172+
console.log('getAjaxText Error');
173+
};
174+
console.info('getAjaxText() End');
175+
}
133176
</script>

dist/vconsole.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)