chore: bump prettier v3 and format all code (#12111)

* chore: bump prettier v3 and format all code

* chore: mjs config

* chore: revert

* chore: revert

* chore: update lock
This commit is contained in:
neverland
2023-07-22 14:14:14 +08:00
committed by GitHub
parent b601ca1e0b
commit 3dcc92a5c0
209 changed files with 565 additions and 543 deletions

View File

@@ -40,7 +40,7 @@ export function syncPathToParent() {
type: 'replacePath',
value: getCurrentDir(),
},
'*'
'*',
);
}
@@ -53,7 +53,7 @@ export function syncPathToChild() {
type: 'replacePath',
value: getCurrentDir(),
},
'*'
'*',
);
});
}
@@ -68,7 +68,7 @@ export function syncThemeToChild(theme) {
type: 'updateTheme',
value: theme,
},
'*'
'*',
);
});
}

View File

@@ -6,9 +6,20 @@ body {
overflow-x: auto;
color: var(--van-doc-text-color-2);
font-size: 16px;
font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Helvetica Neue',
Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui',
'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
font-family:
'Open Sans',
-apple-system,
BlinkMacSystemFont,
'Helvetica Neue',
Helvetica,
Segoe UI,
Arial,
Roboto,
'PingFang SC',
'miui',
'Hiragino Sans GB',
'Microsoft Yahei',
sans-serif;
background-color: var(--van-doc-background);
-webkit-font-smoothing: antialiased;
}

View File

@@ -107,11 +107,11 @@ export default {
const navItems = this.config.nav.reduce(
(result, nav) => [...result, ...nav.items],
[]
[],
);
const current = navItems.find(
(item) => item.path === this.$route.meta.name
(item) => item.path === this.$route.meta.name,
);
if (current && current.title) {

View File

@@ -108,7 +108,9 @@ export default {
cursor: pointer;
opacity: 0.6;
outline: none;
transition: opacity 0.2s, background 0.2s;
transition:
opacity 0.2s,
background 0.2s;
// expand click area
&::after {

View File

@@ -142,7 +142,7 @@ export default {
const action = val ? 'add' : 'remove';
document.body[`${action}EventListener`](
'click',
this.checkHideVersionPop
this.checkHideVersionPop,
);
this.showVersionPop = val;

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
@@ -15,10 +15,7 @@
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<% if (headHtml) { %>
<%= headHtml %>
<% } %>
<% if (baiduAnalytics) { %>
<% if (headHtml) { %> <%= headHtml %> <% } %> <% if (baiduAnalytics) { %>
<script>
var _hmt = _hmt || [];
(function () {

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
@@ -15,16 +15,12 @@
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<% if (headHtml) { %>
<%= headHtml %>
<% } %>
<% if (enableVConsole) { %>
<% if (headHtml) { %> <%= headHtml %> <% } %> <% if (enableVConsole) { %>
<script src="https://unpkg.com/vconsole/dist/vconsole.min.js"></script>
<script>
var vConsole = new window.VConsole();
</script>
<% } %>
<% if (baiduAnalytics) { %>
<% } %> <% if (baiduAnalytics) { %>
<script>
// avoid to load analytics in iframe
if (window.top === window) {

View File

@@ -31,17 +31,17 @@ export default {
if (darkModeClass) {
document.documentElement.classList.toggle(
darkModeClass,
newVal === 'dark'
newVal === 'dark',
);
}
if (lightModeClass) {
document.documentElement.classList.toggle(
lightModeClass,
newVal === 'light'
newVal === 'light',
);
}
},
{ immediate: true }
{ immediate: true },
);
},
};