File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,27 @@ Vue.use(VueAxe, {
19
19
To check manually, use [ $axe.run] ( /guide/api.html#run )
20
20
:::
21
21
22
+ ## allowConsoleClears
23
+
24
+ | Type | Default |
25
+ | -------- | -------- |
26
+ | Boolean | ` true ` |
27
+
28
+ If false, disables all console clears (overriding ` clearConsoleOnUpdate ` ).
29
+
30
+ ``` js
31
+ Vue .use (VueAxe, {
32
+ allowConsoleClears: false // disable all console clears
33
+ })
34
+ ```
35
+
22
36
## clearConsoleOnUpdate
23
37
24
38
| Type | Default |
25
39
| -------- | -------- |
26
40
| Boolean | ` false ` |
27
41
28
- If true, clean the console each time the component is updated.
42
+ If true, clean the console each time the component is updated. No effect if ` allowConsoleClears = false ` .
29
43
30
44
``` js
31
45
Vue .use (VueAxe, {
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ export const draf = (cb) => requestAnimationFrame(() => requestAnimationFrame(cb
4
4
5
5
export const defaultOptions = {
6
6
auto : true ,
7
+ allowConsoleClears : true ,
7
8
clearConsoleOnUpdate : false ,
8
9
delay : 500 ,
9
10
config : {
@@ -31,7 +32,9 @@ export const defaultOptions = {
31
32
export function clear ( forceClear = false , options ) {
32
33
resetCache ( )
33
34
if ( forceClear || options . clearConsoleOnUpdate ) {
34
- console . clear ( )
35
35
resetLastNotification ( )
36
+ if ( options . allowConsoleClears ) {
37
+ console . clear ( )
38
+ }
36
39
}
37
40
}
You can’t perform that action at this time.
0 commit comments