chore: fix docs/play dev sass deprecation warning (#18427)

* chore: fix docs/play dev sass deprecation warning

* chore: update

* chore: update
This commit is contained in:
sea 2024-10-01 08:45:25 +08:00 committed by GitHub
parent ccc8bdcd35
commit da60940ae3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 18 deletions

View File

@ -58,6 +58,13 @@ const alias: AliasOptions = [
export const getViteConfig = ({ mode }: { mode: string }): ViteConfig => { export const getViteConfig = ({ mode }: { mode: string }): ViteConfig => {
const env = loadEnv(mode, process.cwd(), '') const env = loadEnv(mode, process.cwd(), '')
return { return {
css: {
preprocessorOptions: {
scss: {
silenceDeprecations: ['legacy-js-api'],
},
},
},
server: { server: {
host: true, host: true,
fs: { fs: {

View File

@ -194,6 +194,7 @@ function initialize(userOptions: any) {
--docsearch-modal-shadow: var(--el-box-shadow); --docsearch-modal-shadow: var(--el-box-shadow);
transition: background-color var(--el-transition-duration-fast); transition: background-color var(--el-transition-duration-fast);
background-color: transparent;
&.DocSearch-Container { &.DocSearch-Container {
z-index: 20000; z-index: 20000;
@ -231,8 +232,6 @@ function initialize(userOptions: any) {
} }
} }
background-color: transparent;
@include respond-to('md') { @include respond-to('md') {
background-color: var(--docsearch-searchbox-background); background-color: var(--docsearch-searchbox-background);
} }

View File

@ -39,15 +39,6 @@
/* Screen Size */ /* Screen Size */
--vp-screen-max-width: 1362px; --vp-screen-max-width: 1362px;
@include respond-to('xxl') {
--vp-sidebar-width-small: 234px;
}
@include respond-to('max') {
--vp-screen-max-width: 1482px;
--vp-sidebar-width-small: 290px;
}
// sidebar // sidebar
--vp-sidebar-width-mobile: 320px; --vp-sidebar-width-mobile: 320px;
--vp-sidebar-width-small: 266px; --vp-sidebar-width-small: 266px;
@ -79,6 +70,15 @@
// link // link
--link-active-bg-color: rgba(var(--el-color-primary-rgb), 0.1); --link-active-bg-color: rgba(var(--el-color-primary-rgb), 0.1);
@include respond-to('xxl') {
--vp-sidebar-width-small: 234px;
}
@include respond-to('max') {
--vp-screen-max-width: 1482px;
--vp-sidebar-width-small: 290px;
}
} }
.dark { .dark {

View File

@ -39,13 +39,14 @@ export default defineConfig(async ({ mode }) => {
) )
return { return {
// css: { css: {
// preprocessorOptions: { preprocessorOptions: {
// scss: { scss: {
// additionalData: `@use "/styles/custom.scss" as *;`, // additionalData: `@use "/styles/custom.scss" as *;`,
// }, silenceDeprecations: ['legacy-js-api'],
// }, },
// }, },
},
resolve: { resolve: {
alias: [ alias: [
{ {