提交 c368eea7 编写于 作者: D DCloud_LXH

fix(App): chooseLocation、Picker

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