mirror of
https://github.com/youzan/vant.git
synced 2025-10-18 17:51:54 +00:00
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:
@@ -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,
|
||||
},
|
||||
'*'
|
||||
'*',
|
||||
);
|
||||
});
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
@@ -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 {
|
||||
|
@@ -142,7 +142,7 @@ export default {
|
||||
const action = val ? 'add' : 'remove';
|
||||
document.body[`${action}EventListener`](
|
||||
'click',
|
||||
this.checkHideVersionPop
|
||||
this.checkHideVersionPop,
|
||||
);
|
||||
|
||||
this.showVersionPop = val;
|
||||
|
@@ -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 () {
|
||||
|
@@ -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) {
|
||||
|
@@ -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 },
|
||||
);
|
||||
},
|
||||
};
|
||||
|
Reference in New Issue
Block a user