提交 abbab5c9 编写于 作者: fxy060608's avatar fxy060608

chore: typo

上级 865fbb00
...@@ -18,7 +18,7 @@ export function uniOptions(): UniVitePlugin['uni'] { ...@@ -18,7 +18,7 @@ export function uniOptions(): UniVitePlugin['uni'] {
const isNVueCompiler = process.env.UNI_COMPILER === 'nvue' const isNVueCompiler = process.env.UNI_COMPILER === 'nvue'
return { return {
copyOptions() { copyOptions() {
const platfrom = process.env.UNI_PLATFORM const platform = process.env.UNI_PLATFORM
const inputDir = process.env.UNI_INPUT_DIR const inputDir = process.env.UNI_INPUT_DIR
const outputDir = process.env.UNI_OUTPUT_DIR const outputDir = process.env.UNI_OUTPUT_DIR
const targets: UniViteCopyPluginOptions['targets'] = [] const targets: UniViteCopyPluginOptions['targets'] = []
...@@ -28,7 +28,7 @@ export function uniOptions(): UniVitePlugin['uni'] { ...@@ -28,7 +28,7 @@ export function uniOptions(): UniVitePlugin['uni'] {
src: 'androidPrivacy.json', src: 'androidPrivacy.json',
dest: outputDir, dest: outputDir,
transform(source) { transform(source) {
const options = initI18nOptions(platfrom, inputDir, false, true) const options = initI18nOptions(platform, inputDir, false, true)
if (!options) { if (!options) {
return return
} }
......
...@@ -88,7 +88,7 @@ export function initLocales(dir: string, withMessages: boolean = true) { ...@@ -88,7 +88,7 @@ export function initLocales(dir: string, withMessages: boolean = true) {
} }
export function resolveI18nLocale( export function resolveI18nLocale(
platfrom: UniApp.PLATFORM, platform: UniApp.PLATFORM,
locales: string[], locales: string[],
locale?: string locale?: string
) { ) {
...@@ -96,7 +96,7 @@ export function resolveI18nLocale( ...@@ -96,7 +96,7 @@ export function resolveI18nLocale(
return locale return locale
} }
const defaultLocales = ['zh-Hans', 'zh-Hant'] const defaultLocales = ['zh-Hans', 'zh-Hant']
if (platfrom === 'app' || platfrom === 'h5') { if (platform === 'app' || platform === 'h5') {
defaultLocales.unshift('en') defaultLocales.unshift('en')
} else { } else {
// 小程序 // 小程序
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册