提交 c368eea7 编写于 作者: D DCloud_LXH

fix(App): chooseLocation、Picker

上级 addaa7b6
import { extend } from '@vue/shared'
declare interface BroadcastChannel {
new (id: string): BroadcastChannel
name: string
......@@ -126,9 +128,9 @@ export function showPage({
titleSize: '17px',
}
const pageId = `page${Date.now()}`
style = Object.assign({}, style)
style = extend({}, style)
if (style.titleNView !== false && style.titleNView !== 'none') {
style.titleNView = Object.assign(titleNView, style.titleNView)
style.titleNView = extend(titleNView, style.titleNView)
}
const defaultStyle = {
top: 0,
......@@ -149,7 +151,7 @@ export function showPage({
viewport: plus_.screen.resolutionWidth,
},
}
style = Object.assign(defaultStyle, style)
style = extend(defaultStyle, style)
const page = plus_.webview.create('', pageId, style, {
extras: {
from: getPageId(),
......
......@@ -18,9 +18,10 @@ export const chooseLocation = <API_TYPE_CHOOSE_LOCATION>defineAsyncApi(
url: '__uniappchooselocation',
data: options,
style: {
// @ts-ignore
// @ts-expect-error
animationType: options.animationType || 'slide-in-bottom',
titleNView: undefined,
// @ts-expect-error
titleNView: false,
popGesture: 'close',
scrollIndicator: 'none',
},
......
......@@ -177,8 +177,8 @@ function createNVueVm(
if (index > -1) {
pages.splice(index, 1, vm)
}
if ((webview as any).__preload__) {
;(webview as any).__page__ = vm
if ((webview as PreloadWebviewObject).__preload__) {
;(webview as PreloadWebviewObject).__page__ = vm
}
},
$getAppWebview() {
......
......@@ -194,7 +194,8 @@ export default /*#__PURE__*/ defineBuiltInComponent({
url: '__uniapppicker',
data,
style: {
titleNView: undefined,
// @ts-expect-error
titleNView: false,
animationType: 'none',
animationDuration: 0,
background: 'rgba(0,0,0,0)',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册