提交 9ed195e7 编写于 作者: D DCloud_LXH

fix(app): chooseLocation、openLocation i18n

上级 98b1420c
...@@ -3,9 +3,11 @@ import { ...@@ -3,9 +3,11 @@ import {
API_TYPE_CHOOSE_LOCATION, API_TYPE_CHOOSE_LOCATION,
defineAsyncApi, defineAsyncApi,
ChooseLocationProtocol, ChooseLocationProtocol,
getLocale,
} from '@dcloudio/uni-api' } from '@dcloudio/uni-api'
import { showPage } from '@dcloudio/uni-core' import { showPage } from '@dcloudio/uni-core'
import { getStatusBarStyle } from '../../../helpers/statusBar' import { getStatusBarStyle } from '../../../helpers/statusBar'
import { extend } from '@vue/shared'
export const chooseLocation = <API_TYPE_CHOOSE_LOCATION>defineAsyncApi( export const chooseLocation = <API_TYPE_CHOOSE_LOCATION>defineAsyncApi(
API_CHOOSE_LOCATION, API_CHOOSE_LOCATION,
...@@ -16,7 +18,9 @@ export const chooseLocation = <API_TYPE_CHOOSE_LOCATION>defineAsyncApi( ...@@ -16,7 +18,9 @@ export const chooseLocation = <API_TYPE_CHOOSE_LOCATION>defineAsyncApi(
let result: undefined | UniApp.ChooseLocationSuccess let result: undefined | UniApp.ChooseLocationSuccess
const page = showPage({ const page = showPage({
url: '__uniappchooselocation', url: '__uniappchooselocation',
data: options, data: extend({}, options, {
locale: getLocale(),
}),
style: { style: {
// @ts-expect-error // @ts-expect-error
animationType: options.animationType || 'slide-in-bottom', animationType: options.animationType || 'slide-in-bottom',
......
...@@ -4,15 +4,19 @@ import { ...@@ -4,15 +4,19 @@ import {
defineAsyncApi, defineAsyncApi,
OpenLocationProtocol, OpenLocationProtocol,
OpenLocationOptions, OpenLocationOptions,
getLocale,
} from '@dcloudio/uni-api' } from '@dcloudio/uni-api'
import { showPage } from '@dcloudio/uni-core' import { showPage } from '@dcloudio/uni-core'
import { extend } from '@vue/shared'
export const openLocation = <API_TYPE_OPEN_LOCATION>defineAsyncApi( export const openLocation = <API_TYPE_OPEN_LOCATION>defineAsyncApi(
API_OPEN_LOCATION, API_OPEN_LOCATION,
(data, { resolve, reject }) => { (data, { resolve, reject }) => {
showPage({ showPage({
url: '__uniappopenlocation', url: '__uniappopenlocation',
data, data: extend({}, data, {
locale: getLocale(),
}),
style: { style: {
titleNView: { titleNView: {
type: 'transparent', type: 'transparent',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册