Skip to content
Merged

m2d #1444

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 13 additions & 14 deletions .vitepress/theme/components/SupportedVersions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ declare const __VITE_VERSION__: string
// Constants
const supportedVersionMessage = {
color: 'var(--vp-c-brand-1)',
text: 'supported',
text: '支持',
}
const notSupportedVersionMessage = {
color: 'var(--vp-c-danger-1)',
text: 'not supported',
text: '不支持',
}
const previousMajorLatestMinors: Record<string, string> = {
'2': '2.9',
Expand Down Expand Up @@ -90,7 +90,7 @@ function versionsToText(versions: string[]) {
if (versions.length === 0) return ''
if (versions.length === 1) return versions[0]
return (
versions.slice(0, -1).join(', ') + ' and ' + versions[versions.length - 1]
versions.slice(0, -1).join(', ') + ' ' + versions[versions.length - 1]
)
}

Expand All @@ -106,34 +106,33 @@ function isValidViteVersion(version: string) {
<div>
<ul>
<li v-if="supportInfo.regularPatches.length">
Regular patches are released for
<span v-html="versionsToText(supportInfo.regularPatches)"></span>.
定期发布补丁
<span v-html="versionsToText(supportInfo.regularPatches)"></span>
</li>
<li v-if="supportInfo.importantFixes.length">
Important fixes and security patches are backported to
<span v-html="versionsToText(supportInfo.importantFixes)"></span>.
重要的修复和安全补丁向后移植到
<span v-html="versionsToText(supportInfo.importantFixes)"></span>
</li>
<li v-if="supportInfo.securityPatches.length">
Security patches are also backported to
<span v-html="versionsToText(supportInfo.securityPatches)"></span>.
安全补丁也被向后移植到
<span v-html="versionsToText(supportInfo.securityPatches)"></span>
</li>
<li>
All versions before these are no longer supported. Users should upgrade
to receive updates.
之前的所有版本都不再支持。用户应升级,以获得更新。
</li>
</ul>
<p>
If you're using Vite
如果你使用的是 Vite
<input
class="checked-input"
type="text"
v-model="checkedVersion"
placeholder="0.0.0"
/>, it is
/>, 它是
<strong :style="{ color: checkedResult.color }">{{
checkedResult.text
}}</strong
>.
>
</p>
</div>
</template>
Expand Down
4 changes: 2 additions & 2 deletions config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '')
return {
define: {
// Provide an explicit app-level constant derived from an env var.
// 提供从 env var 派生的显式应用程序级常量。
__APP_ENV__: JSON.stringify(env.APP_ENV),
},
// Example: use an env var to set the dev server port conditionally.
// 例如:使用 env var 有条件地设置开发服务器端口。
server: {
port: env.APP_PORT ? Number(env.APP_PORT) : 5173,
},
Expand Down
2 changes: 1 addition & 1 deletion config/shared-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ declare const __APP_VERSION__: string
| ((name: string, filename: string, css: string) => string)
hashPrefix?: string
/**
* default: undefined
* 默认:undefined
*/
localsConvention?:
| 'camelCase'
Expand Down
Loading