Skip to content

Commit

Permalink
fix(app): chooseLocation、openLocation i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
StrivingRabbit committed Jul 28, 2022
1 parent 98b1420 commit 9ed195e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import {
API_TYPE_CHOOSE_LOCATION,
defineAsyncApi,
ChooseLocationProtocol,
getLocale,
} from '@dcloudio/uni-api'
import { showPage } from '@dcloudio/uni-core'
import { getStatusBarStyle } from '../../../helpers/statusBar'
import { extend } from '@vue/shared'

export const chooseLocation = <API_TYPE_CHOOSE_LOCATION>defineAsyncApi(
API_CHOOSE_LOCATION,
Expand All @@ -16,7 +18,9 @@ export const chooseLocation = <API_TYPE_CHOOSE_LOCATION>defineAsyncApi(
let result: undefined | UniApp.ChooseLocationSuccess
const page = showPage({
url: '__uniappchooselocation',
data: options,
data: extend({}, options, {
locale: getLocale(),
}),
style: {
// @ts-expect-error
animationType: options.animationType || 'slide-in-bottom',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ import {
defineAsyncApi,
OpenLocationProtocol,
OpenLocationOptions,
getLocale,
} from '@dcloudio/uni-api'
import { showPage } from '@dcloudio/uni-core'
import { extend } from '@vue/shared'

export const openLocation = <API_TYPE_OPEN_LOCATION>defineAsyncApi(
API_OPEN_LOCATION,
(data, { resolve, reject }) => {
showPage({
url: '__uniappopenlocation',
data,
data: extend({}, data, {
locale: getLocale(),
}),
style: {
titleNView: {
type: 'transparent',
Expand Down

0 comments on commit 9ed195e

Please sign in to comment.