diff --git a/docs/components/forms/picker.md b/docs/components/forms/picker.md index 8255de59c36e..4bcae29a1188 100755 --- a/docs/components/forms/picker.md +++ b/docs/components/forms/picker.md @@ -166,6 +166,7 @@ export default class PagePicker extends Component { | 参数 | 类型 | 默认值 | 必填 | 说明 | | --- | --- | :---: | :---: | --- | +| headerText | `string` | | 否 | 选择器的标题,微信小程序中仅安卓可用 | | mode | `keyof Mode` | `"selector"` | 否 | 选择器类型,默认是普通选择器 | | disabled | `boolean` | `false` | 否 | 是否禁用 | | onCancel | `CommonEventFunction` | | 否 | 取消选择或点遮罩层收起 picker 时触发 | @@ -174,6 +175,7 @@ export default class PagePicker extends Component { | API | 微信小程序 | H5 | React Native | Harmony | | :---: | :---: | :---: | :---: | :---: | +| PickerStandardProps.headerText | ✔️ | | | | | PickerStandardProps.mode | ✔️ | ✔️ | ✔️ | | | PickerStandardProps.disabled | ✔️ | ✔️ | ✔️ | | | PickerStandardProps.onCancel | ✔️ | ✔️ | ✔️ | | diff --git a/docs/components/page-meta.md b/docs/components/page-meta.md index 0b03e3ae796b..7a6732593785 100644 --- a/docs/components/page-meta.md +++ b/docs/components/page-meta.md @@ -110,18 +110,21 @@ function Index () { ### onResizeEventDetail -| 参数 | 类型 | 说明 | -| --- | --- | --- | -| size | `resizeType` | 窗口尺寸 | +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| deviceOrientation | "portrait" or "landscape" | 否 | 设备方向 | +| size | `resizeType` | 是 | 窗口尺寸 | ### resizeType 窗口尺寸类型 -| 参数 | 类型 | 说明 | -| --- | --- | --- | -| windowWidth | `number` | 窗口宽度 | -| windowHeight | `number` | 窗口高度 | +| 参数 | 类型 | 必填 | 说明 | +| --- | --- | :---: | --- | +| windowWidth | `number` | 是 | 窗口宽度 | +| windowHeight | `number` | 是 | 窗口高度 | +| screenWidth | `number` | 否 | 屏幕宽度 | +| screenHeight | `number` | 否 | 屏幕高度 | ### onScrollEventDetail diff --git a/packages/taro-components/types/PageMeta.d.ts b/packages/taro-components/types/PageMeta.d.ts index 017badd09e76..72b44b73473d 100644 --- a/packages/taro-components/types/PageMeta.d.ts +++ b/packages/taro-components/types/PageMeta.d.ts @@ -64,6 +64,8 @@ interface PageMetaProps extends StandardProps { } declare namespace PageMetaProps { interface onResizeEventDetail { + /** 设备方向 */ + deviceOrientation?: 'portrait' | 'landscape' /** 窗口尺寸 */ size: resizeType } @@ -73,6 +75,10 @@ declare namespace PageMetaProps { windowWidth: number /** 窗口高度 */ windowHeight: number + /** 屏幕宽度 */ + screenWidth?: number + /** 屏幕高度 */ + screenHeight?: number } interface onScrollEventDetail { scrollTop: number diff --git a/packages/taro-components/types/Picker.d.ts b/packages/taro-components/types/Picker.d.ts index 8c2ac91766fb..a4e9af9f3679 100644 --- a/packages/taro-components/types/Picker.d.ts +++ b/packages/taro-components/types/Picker.d.ts @@ -3,6 +3,11 @@ import { StyleProp, TextStyle, ViewStyle } from 'react-native' import { StandardProps, CommonEventFunction, FormItemProps } from './common' /** 选择器通用参数 */ interface PickerStandardProps extends StandardProps, FormItemProps { + /** + * 选择器的标题,微信小程序中仅安卓可用 + * @supported weapp + */ + headerText?: string /** * 选择器类型,默认是普通选择器 * @default "selector" diff --git a/packages/taro/types/index.d.ts b/packages/taro/types/index.d.ts index 763a40b2d2d1..5623c3254ae0 100644 --- a/packages/taro/types/index.d.ts +++ b/packages/taro/types/index.d.ts @@ -191,6 +191,6 @@ declare namespace Taro { interface TaroStatic {} } declare global { - const defineAppConfig: (config: Taro.Config) => Taro.Config - const definePageConfig: (config: Taro.Config) => Taro.Config + const defineAppConfig: (config: Taro.AppConfig) => Taro.AppConfig + const definePageConfig: (config: Taro.PageConfig) => Taro.Config } diff --git a/packages/taro/types/taro.config.d.ts b/packages/taro/types/taro.config.d.ts index 38f64401926e..b9f3821ce16d 100644 --- a/packages/taro/types/taro.config.d.ts +++ b/packages/taro/types/taro.config.d.ts @@ -34,7 +34,7 @@ declare module './index' { backgroundColor?: string /** 下拉背景字体、loading 图的样式,仅支持 dark/light * 当 app.json 中配置 darkmode 为 true 时可通过变量的形式配置 - * @see: https://developers.weixin.qq.com/miniprogram/dev/framework/ability/darkmode.html + * @see: https://developers.weixin.qq.com/miniprogram/dev/framework/ability/darkmode.html * @default: "dark" */ backgroundTextStyle?: 'dark' | 'light' | string diff --git a/packages/taro/types/taro.lifecycle.d.ts b/packages/taro/types/taro.lifecycle.d.ts index b5bd97f3ee14..6d9f94eea0cd 100644 --- a/packages/taro/types/taro.lifecycle.d.ts +++ b/packages/taro/types/taro.lifecycle.d.ts @@ -56,9 +56,12 @@ declare module './index' { } interface PageResizeObject { + deviceOrientation?: 'portrait' | 'landscape' size: { windowWidth: number windowHeight: number + screenWidth?: number + screenHeight?: number } }