diff --git a/packages/taro-components/package.json b/packages/taro-components/package.json index 310d9f1d333a..282aeaae2356 100644 --- a/packages/taro-components/package.json +++ b/packages/taro-components/package.json @@ -63,7 +63,7 @@ "jquery": "^3.4.1", "karmatic": "^2.1.0", "lodash": "^4.17.21", - "miniapp-types": "1.1.21", + "miniapp-types": "1.4.1", "simulant": "^0.2.2", "style-loader": "1.3.0", "ts-node": "^10.9.1", diff --git a/packages/taro-components/types/Button.d.ts b/packages/taro-components/types/Button.d.ts index 666803cae461..f659c4d528e0 100644 --- a/packages/taro-components/types/Button.d.ts +++ b/packages/taro-components/types/Button.d.ts @@ -526,7 +526,7 @@ declare namespace ButtonProps { /** 按钮 * @classification forms - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class PageButton extends Component { diff --git a/packages/taro-components/types/Camera.d.ts b/packages/taro-components/types/Camera.d.ts index e0630a2b8f1e..18576b58d863 100644 --- a/packages/taro-components/types/Camera.d.ts +++ b/packages/taro-components/types/Camera.d.ts @@ -149,7 +149,7 @@ declare namespace CameraProps { /** 系统相机 * @classification media - * @supported weapp, alipay, swan, tt, qq, jd, rn + * @supported weapp, alipay, swan, tt, qq, jd, rn, harmony * @see https://developers.weixin.qq.com/miniprogram/dev/component/camera.html */ declare const Camera: ComponentType diff --git a/packages/taro-components/types/ChannelLive.d.ts b/packages/taro-components/types/ChannelLive.d.ts new file mode 100644 index 000000000000..aad2af883acd --- /dev/null +++ b/packages/taro-components/types/ChannelLive.d.ts @@ -0,0 +1,22 @@ +import { ComponentType } from 'react' +import { StandardProps } from './common' +interface ChannelLiveProps extends StandardProps { + /** 视频 feedId + * @supported weapp + */ + feedId: string + + /** 视频号 id,以“sph”开头的id,可在视频号助手获取。视频号必须与当前小程序相同主体。 + * @supported weapp + */ + finderUserName: string +} + +/** + * 小程序内嵌视频号直播组件,展示视频号直播状态和封面,并无弹窗跳转至视频号。注意:使用该组件打开的视频号视频需要与小程序的主体一致。 + * @classification media + * @supported weapp + * @see https://developers.weixin.qq.com/miniprogram/dev/component/channel-live.html + */ +declare const ChannelLive: ComponentType +export { ChannelLive, ChannelLiveProps } diff --git a/packages/taro-components/types/Checkbox.d.ts b/packages/taro-components/types/Checkbox.d.ts index e4479723c7e0..bf82d200e79a 100644 --- a/packages/taro-components/types/Checkbox.d.ts +++ b/packages/taro-components/types/Checkbox.d.ts @@ -43,7 +43,7 @@ interface CheckboxProps extends StandardProps { /** 多选项目 * @classification forms - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class PageCheckbox extends Component { diff --git a/packages/taro-components/types/CheckboxGroup.d.ts b/packages/taro-components/types/CheckboxGroup.d.ts index f98c44080964..3262a99e606d 100644 --- a/packages/taro-components/types/CheckboxGroup.d.ts +++ b/packages/taro-components/types/CheckboxGroup.d.ts @@ -16,7 +16,7 @@ interface CheckboxGroupProps extends StandardProps, FormItemProps { /** 多项选择器,内部由多个checkbox组成 * @classification forms - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example * ```tsx * export default class PageCheckbox extends Component { diff --git a/packages/taro-components/types/CoverImage.d.ts b/packages/taro-components/types/CoverImage.d.ts index 5d3c5b4e9861..498ca1bf374f 100644 --- a/packages/taro-components/types/CoverImage.d.ts +++ b/packages/taro-components/types/CoverImage.d.ts @@ -2,7 +2,7 @@ import { ComponentType } from 'react' import { StandardProps, CommonEventFunction } from './common' interface CoverImageProps extends StandardProps { /** 图标路径,支持临时路径、网络地址、云文件ID。暂不支持base64格式。 - * @supported weapp, alipay, swan, qq, h5 + * @supported weapp, alipay, swan, qq, jd, h5 */ src: string @@ -42,12 +42,12 @@ interface CoverImageProps extends StandardProps { ariaLabel?: string /** 图片加载成功时触发 - * @supported weapp, swan, qq, h5 + * @supported weapp, swan, qq, jd, h5 */ onLoad?: CommonEventFunction /** 图片加载失败时触发 - * @supported weapp, swan, qq, h5 + * @supported weapp, swan, qq, jd, h5 */ onError?: CommonEventFunction @@ -59,7 +59,7 @@ interface CoverImageProps extends StandardProps { /** 覆盖在原生组件之上的图片视图。可覆盖的原生组件同cover-view,支持嵌套在cover-view里。 * @classification viewContainer - * @supported weapp, alipay, swan, qq, h5 + * @supported weapp, alipay, swan, qq, jd, h5, harmony * @example_react * ```tsx * // js diff --git a/packages/taro-components/types/CoverView.d.ts b/packages/taro-components/types/CoverView.d.ts index 7d883191578c..25b0d45781d7 100644 --- a/packages/taro-components/types/CoverView.d.ts +++ b/packages/taro-components/types/CoverView.d.ts @@ -3,7 +3,7 @@ import { CommonEventFunction } from './common' import { ViewProps } from './View' interface CoverViewProps extends ViewProps { /** 设置顶部滚动偏移量,仅在设置了 overflow-y: scroll 成为滚动元素后生效 - * @supported weapp, alipay, swan, qq + * @supported weapp, alipay, swan, qq, jd */ scrollTop?: number @@ -143,7 +143,7 @@ interface CoverViewProps extends ViewProps { /** 覆盖在原生组件之上的文本视图。可覆盖的原生组件包括 map、video、canvas、camera、live-player、live-pusher 只支持嵌套 cover-view、cover-image,可在 cover-view 中使用 button。 * @classification viewContainer - * @supported weapp, alipay, swan, qq, h5 + * @supported weapp, alipay, swan, qq, jd, h5 * @example_react * ```tsx * // js diff --git a/packages/taro-components/types/CustomWrapper.d.ts b/packages/taro-components/types/CustomWrapper.d.ts index 9d352abdb433..b60ffd045d00 100644 --- a/packages/taro-components/types/CustomWrapper.d.ts +++ b/packages/taro-components/types/CustomWrapper.d.ts @@ -6,6 +6,7 @@ interface CustomWrapperProps extends StandardProps { /** custom-wrapper 自定义组件包裹器 * 当数据更新层级较深时,可用此组件将需要更新的区域包裹起来,这样更新层级将大大减少 + * @classification viewContainer * @supported weapp, swan, alipay, tt, jd, qq, h5 * @example * ```tsx diff --git a/packages/taro-components/types/Form.d.ts b/packages/taro-components/types/Form.d.ts index 83f1d9f0e677..8de5a952939d 100644 --- a/packages/taro-components/types/Form.d.ts +++ b/packages/taro-components/types/Form.d.ts @@ -66,7 +66,7 @@ declare namespace FormProps { * * 当点击 form 表单中 form-type 为 submit 的 button 组件时,会将表单组件中的 value 值进行提交,需要在表单组件中加上 name 来作为 key。 * @classification forms - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * class App extends Component { diff --git a/packages/taro-components/types/Icon.d.ts b/packages/taro-components/types/Icon.d.ts index 116d80c992ba..042bcd900684 100644 --- a/packages/taro-components/types/Icon.d.ts +++ b/packages/taro-components/types/Icon.d.ts @@ -62,7 +62,7 @@ declare namespace IconProps { /** 图标。组件属性的长度单位默认为 px * @classification base - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class PageView extends Component { diff --git a/packages/taro-components/types/Image.d.ts b/packages/taro-components/types/Image.d.ts index c75d80ed809f..f531d043c469 100644 --- a/packages/taro-components/types/Image.d.ts +++ b/packages/taro-components/types/Image.d.ts @@ -155,7 +155,7 @@ declare namespace ImageProps { * * **Note:** 为实现小程序的 `mode` 特性,在 H5 组件中使用一个 `div` 容器来对内部的 `img` 进行展示区域的裁剪,因此请勿使用元素选择器来重置 `img` 的样式! * @classification media - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class PageView extends Component { diff --git a/packages/taro-components/types/Input.d.ts b/packages/taro-components/types/Input.d.ts index f2c14f14cc54..ea8cb40e6307 100644 --- a/packages/taro-components/types/Input.d.ts +++ b/packages/taro-components/types/Input.d.ts @@ -187,17 +187,17 @@ interface InputProps extends StandardProps, FormItemProps { */ alwaysSystem?: boolean - /** 使用原生键盘 - * @default true - * @supported alipay - */ - enableNative?: boolean - /** 无障碍访问,(属性)元素的额外描述 * @supported qq */ ariaLabel?: string + /** 是否启用原生键盘。 + * @supported alipay + * @default true + */ + enableNative?: boolean + /** 当键盘输入时,触发input事件,event.detail = {value, cursor, keyCode},处理函数可以直接 return 一个字符串,将替换输入框的内容。 * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ @@ -223,6 +223,11 @@ interface InputProps extends StandardProps, FormItemProps { * @supported weapp, qq */ onKeyboardHeightChange?: CommonEventFunction + + /** 用户昵称审核完毕后触发,仅在 type 为 "nickname" 时有效,event.detail = { pass, timeout } + * @supported weapp + */ + onNickNameReview?: CommonEventFunction } declare namespace InputProps { /** Input 类型 */ @@ -231,52 +236,66 @@ declare namespace InputProps { * @supported weapp, alipay, h5, rn */ text + /** 数字输入键盘 * @supported weapp, alipay, h5, rn */ number + /** 身份证输入键盘 *@supported weapp, alipay, rn */ idcard + /** 带小数点的数字键盘 * @supported weapp, alipay, h5, rn */ digit + /** 密码安全输入键盘[指引](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/safe-password.html) * @supported weapp, alipay */ 'safe-password' + /** 昵称输入键盘 * @supported weapp, alipay */ nickname + /** 数字输入键盘 * @supported alipay */ numberpad + /** 带小数点的数字键盘 * @supported alipay */ digitpad + /** 身份证输入键盘 * @supported alipay */ idcardpad } + /** Confirm 类型 */ interface ConfirmType { /** 右下角按钮为“发送” */ send + /** 右下角按钮为“搜索” */ search + /** 右下角按钮为“下一个” */ next + /** 右下角按钮为“前往” */ go + /** 右下角按钮为“完成” */ done } + /** > 注意:React-Native 端 `inputEventDetail` 仅实现参数 `value`,若需实时获取光标位置则可通过 [`onSelectionChange`](https://reactnative.dev/docs/textinput#onselectionchange) 实现。 */ interface inputEventDetail { /** 输入值 */ @@ -310,7 +329,7 @@ declare namespace InputProps { /** 输入框。该组件是原生组件,使用时请注意相关限制 * @classification forms - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * class App extends Component { diff --git a/packages/taro-components/types/Label.d.ts b/packages/taro-components/types/Label.d.ts index b93d388b82e7..46bbfd02f2bb 100644 --- a/packages/taro-components/types/Label.d.ts +++ b/packages/taro-components/types/Label.d.ts @@ -9,7 +9,7 @@ interface LabelProps extends StandardProps { * * 使用for属性找到对应的id,或者将控件放在该标签下,当点击时,就会触发对应的控件。 for优先级高于内部控件,内部有多个控件的时候默认触发第一个控件。 目前可以绑定的控件有:button, checkbox, radio, switch。 * @classification forms - * @supported weapp, swan, alipay, tt, h5, rn + * @supported weapp, swan, alipay, tt, h5, rn, harmony * @example_react * ```tsx * class App extends Components { diff --git a/packages/taro-components/types/LivePusher.d.ts b/packages/taro-components/types/LivePusher.d.ts index 6ca12d7be77f..28a544db4398 100644 --- a/packages/taro-components/types/LivePusher.d.ts +++ b/packages/taro-components/types/LivePusher.d.ts @@ -23,6 +23,12 @@ interface LivePusherProps extends StandardProps { */ autopush?: boolean + /** 自定义渲染,允许开发者自行处理所采集的视频帧 + * @default false + * @supported weapp + */ + enableVideoCustomRender?: boolean + /** 是否静音。即将废弃,可用 enable-mic 替代 * @default false * @deprecated @@ -191,6 +197,36 @@ interface LivePusherProps extends StandardProps { */ pictureInPictureMode?: string | any[] + /** 是否启动自定义特效,设定后不能更改 + * @supported weapp + * @default false + */ + customEffect?: boolean + + /** 自定义特效美白效果,取值 0~1。需要开启 custom-effect + * @supported weapp + * @default 0 + */ + skinWhiteness?: number + + /** 自定义特效磨皮效果,取值 0~1。需要开启 custom-effect + * @supported weapp + * @default 0 + */ + skinSmoothness?: number + + /** 自定义特效瘦脸效果,取值 0~1。需要开启 custom-effect + * @supported weapp + * @default 0 + */ + faceThinness?: number + + /** 自定义特效大眼效果,取值 0~1。需要开启 custom-effect + * @supported weapp + * @default 0 + */ + eyeBigness?: number + /** 状态变化事件,detail = {code} * @supported weapp, qq */ @@ -287,6 +323,9 @@ declare namespace LivePusherProps { /** audioVolumeType 的合法值 */ interface AudioVolumeType { + /** 自动 */ + auto + /** 媒体音量 */ media diff --git a/packages/taro-components/types/Map.d.ts b/packages/taro-components/types/Map.d.ts index d96872b7c562..8a1625cb2cf1 100644 --- a/packages/taro-components/types/Map.d.ts +++ b/packages/taro-components/types/Map.d.ts @@ -208,6 +208,12 @@ interface MapProps extends StandardProps { */ optimize?: string + /** 开启最大俯视角,俯视角度从 45 度拓展到 75 度 + * @supported weapp + * @default false + */ + enableAutoMaxOverlooking?: boolean + /** 展示3D楼块 * @supported weapp, swan, tt, qq * @default false diff --git a/packages/taro-components/types/MovableArea.d.ts b/packages/taro-components/types/MovableArea.d.ts index ea31dbd88451..1551811ec5f3 100644 --- a/packages/taro-components/types/MovableArea.d.ts +++ b/packages/taro-components/types/MovableArea.d.ts @@ -3,14 +3,14 @@ import { StandardProps } from './common' interface MovableAreaProps extends StandardProps { /** 当里面的 movable-view 设置为支持双指缩放时,设置此值可将缩放手势生效区域修改为整个 movable-area * @default false - * @supported weapp, alipay, swan, tt, qq, h5 + * @supported weapp, alipay, swan, tt, qq, jd, h5 */ scaleArea?: boolean } /** movable-view 的可移动区域 * @classification viewContainer - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn * @example_react * ```tsx * class App extends Components { diff --git a/packages/taro-components/types/NativeSlot.d.ts b/packages/taro-components/types/NativeSlot.d.ts index 294826bb6be5..6f21df1d2221 100644 --- a/packages/taro-components/types/NativeSlot.d.ts +++ b/packages/taro-components/types/NativeSlot.d.ts @@ -9,6 +9,7 @@ interface NativeSlotProps { } /** 编译的原生组件支持使用 slot 插槽 + * @classification viewContainer * @supported weapp, swan, alipay, tt, jd, qq * @version 3.5.7+ * @example diff --git a/packages/taro-components/types/NavigationBar.d.ts b/packages/taro-components/types/NavigationBar.d.ts index 5d969da7a08a..4a32f05777e1 100644 --- a/packages/taro-components/types/NavigationBar.d.ts +++ b/packages/taro-components/types/NavigationBar.d.ts @@ -36,7 +36,8 @@ interface NavigationBarProps extends StandardProps { /** 页面导航条配置节点,用于指定导航栏的一些属性。只能是 PageMeta 组件内的第一个节点,需要配合它一同使用。 * 通过这个节点可以获得类似于调用 Taro.setNavigationBarTitle Taro.setNavigationBarColor 等接口调用的效果。 - * @supported weapp + * @classification navig + * @supported weapp, harmony * @see https://developers.weixin.qq.com/miniprogram/dev/component/navigation-bar.html */ declare const NavigationBar: ComponentType diff --git a/packages/taro-components/types/Navigator.d.ts b/packages/taro-components/types/Navigator.d.ts index 3fed5ba17260..a3e8e25609f3 100644 --- a/packages/taro-components/types/Navigator.d.ts +++ b/packages/taro-components/types/Navigator.d.ts @@ -138,7 +138,7 @@ declare namespace NavigatorProps { /** 页面链接 * @classification navig - * @supported weapp, alipay, swan, tt, qq, jd + * @supported weapp, alipay, swan, tt, qq, jd, harmony * @see https://developers.weixin.qq.com/miniprogram/dev/component/navigator.html */ declare const Navigator: ComponentType diff --git a/packages/taro-components/types/Picker.d.ts b/packages/taro-components/types/Picker.d.ts index 54da4059538e..7e62063d8df3 100644 --- a/packages/taro-components/types/Picker.d.ts +++ b/packages/taro-components/types/Picker.d.ts @@ -302,7 +302,7 @@ declare namespace PickerRegionProps { /** * 从底部弹起的滚动选择器 * @classification forms - * @supported weapp, swan, alipay, tt, h5, rn + * @supported weapp, swan, alipay, tt, h5, rn, harmony * @example_react * ```tsx * export default class PagePicker extends Component { diff --git a/packages/taro-components/types/PickerView.d.ts b/packages/taro-components/types/PickerView.d.ts index a223ecc56556..7d00f07ba6aa 100644 --- a/packages/taro-components/types/PickerView.d.ts +++ b/packages/taro-components/types/PickerView.d.ts @@ -66,7 +66,7 @@ declare namespace PickerViewProps { /** 嵌入页面的滚动选择器 * 其中只可放置 picker-view-column 组件,其它节点不会显示 * @classification forms - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class Picks extends Component { diff --git a/packages/taro-components/types/PickerViewColumn.d.ts b/packages/taro-components/types/PickerViewColumn.d.ts index 2d53485e2cb7..098b21a1dc1f 100644 --- a/packages/taro-components/types/PickerViewColumn.d.ts +++ b/packages/taro-components/types/PickerViewColumn.d.ts @@ -5,7 +5,7 @@ type PickerViewColumnProps = StandardProps /** 滚动选择器子项 * 仅可放置于 `` 中,其孩子节点的高度会自动设置成与 picker-view 的选中框的高度一致 * @classification forms - * @supported weapp, swan, alipay, tt, h5, rn + * @supported weapp, swan, alipay, tt, h5, rn, harmony * @see https://developers.weixin.qq.com/miniprogram/dev/component/picker-view-column.html */ declare const PickerViewColumn: ComponentType diff --git a/packages/taro-components/types/Progress.d.ts b/packages/taro-components/types/Progress.d.ts index ffdf10b38667..28cc6b4247fc 100644 --- a/packages/taro-components/types/Progress.d.ts +++ b/packages/taro-components/types/Progress.d.ts @@ -81,7 +81,7 @@ interface ProgressProps extends StandardProps { /** 进度条。组件属性的长度单位默认为 px * @classification base - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class PageView extends Component { diff --git a/packages/taro-components/types/Radio.d.ts b/packages/taro-components/types/Radio.d.ts index 6486c217da29..fa09099ff7be 100644 --- a/packages/taro-components/types/Radio.d.ts +++ b/packages/taro-components/types/Radio.d.ts @@ -2,25 +2,25 @@ import { ComponentType } from 'react' import { StandardProps, CommonEventFunction, FormItemProps } from './common' interface RadioProps extends StandardProps { /** `` 标识。当该`` 选中时,``的 change 事件会携带``的 value - * @supported weapp, alipay, swan, tt, qq, rn + * @supported weapp, alipay, swan, tt, qq, jd, rn */ value?: string /** 当前是否选中 * @default false - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ checked?: boolean /** 是否禁用 * @default false - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ disabled?: boolean /** Radio 的颜色,同 css 的 color * @default "#09BB07" - * @supported weapp, alipay, swan, tt, qq, rn + * @supported weapp, alipay, swan, tt, qq, jd, rn */ color?: string @@ -34,8 +34,8 @@ interface RadioProps extends StandardProps { */ ariaLabel?: string - /** 中的选中项发生变化时触发 change 事件,event.detail = {value: 选中项radio的value} - * @supported jd + /** 中的选中项发生变化时触发 change 事件 + * @supported h5, rn */ onChange?: CommonEventFunction<{ value?: string @@ -44,7 +44,7 @@ interface RadioProps extends StandardProps { /** 单选项目 * @classification forms - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, h5, rn, harmony * @example_react * ```tsx * export default class PageRadio extends Component { diff --git a/packages/taro-components/types/RadioGroup.d.ts b/packages/taro-components/types/RadioGroup.d.ts index bb880bfea177..bf2483795c32 100644 --- a/packages/taro-components/types/RadioGroup.d.ts +++ b/packages/taro-components/types/RadioGroup.d.ts @@ -7,7 +7,7 @@ interface RadioGroupProps extends StandardProps, FormItemProps { name?: string /** RadioGroup 中选中项发生改变时触发 change 事件,detail = {value:[选中的radio的value的数组]} - * @supported weapp, alipay, swan, tt, qq, h5 + * @supported weapp, alipay, swan, tt, qq, jd, h5 */ onChange?: CommonEventFunction } @@ -19,7 +19,7 @@ declare namespace RadioGroupProps { /** 单项选择器,内部由多个 Radio 组成。 * @classification forms - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @see https://developers.weixin.qq.com/miniprogram/dev/component/radio-group.html */ declare const RadioGroup: ComponentType diff --git a/packages/taro-components/types/RichText.d.ts b/packages/taro-components/types/RichText.d.ts index 26453e92a364..6aa0d30ec9b6 100644 --- a/packages/taro-components/types/RichText.d.ts +++ b/packages/taro-components/types/RichText.d.ts @@ -118,7 +118,7 @@ declare namespace RichTextProps { /** 富文本 * @classification base - * @supported weapp, swan, alipay, tt, h5, rn + * @supported weapp, swan, alipay, tt, h5, rn, harmony * @example_react * ```tsx * class App extends Components { diff --git a/packages/taro-components/types/RootPortal.d.ts b/packages/taro-components/types/RootPortal.d.ts index e7fe523e86f6..871e9244910f 100644 --- a/packages/taro-components/types/RootPortal.d.ts +++ b/packages/taro-components/types/RootPortal.d.ts @@ -38,5 +38,4 @@ interface RootPortalProps extends StandardProps { * ``` */ declare const RootPortal: ComponentType - export { RootPortal, RootPortalProps } diff --git a/packages/taro-components/types/ScrollView.d.ts b/packages/taro-components/types/ScrollView.d.ts index 11ea4504a2b8..16466eb20d73 100644 --- a/packages/taro-components/types/ScrollView.d.ts +++ b/packages/taro-components/types/ScrollView.d.ts @@ -55,7 +55,7 @@ interface ScrollViewProps extends StandardProps { enableBackToTop?: boolean /** 启用 flexbox 布局。开启后,当前节点声明了 `display: flex` 就会成为 flex container,并作用于其孩子节点。 - * @supported weapp, jd + * @supported weapp * @default false */ enableFlex?: boolean @@ -262,7 +262,7 @@ declare namespace ScrollViewProps { * H5 中 ScrollView 组件是通过一个高度(或宽度)固定的容器内部滚动来实现的,因此务必正确的设置容器的高度。例如: 如果 ScrollView 的高度将 body 撑开,就会同时存在两个滚动条(body 下的滚动条,以及 ScrollView 的滚动条)。 * 微信小程序 中 ScrollView 组件如果设置 scrollX 横向滚动时,并且子元素为多个时(单个子元素时设置固定宽度则可以正常横向滚动),需要通过 WXSS 设置 `white-space: nowrap` 来保证元素不换行,并对 ScrollView 内部元素设置 `display: inline-block` 来使其能够横向滚动。 * @classification viewContainer - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class PageView extends Component { diff --git a/packages/taro-components/types/ShareElement.d.ts b/packages/taro-components/types/ShareElement.d.ts index 278cd5bc7ff2..e6509082f994 100644 --- a/packages/taro-components/types/ShareElement.d.ts +++ b/packages/taro-components/types/ShareElement.d.ts @@ -2,17 +2,12 @@ import { ComponentType } from 'react' import { StandardProps, CommonEventFunction } from './common' interface ShareElementProps extends StandardProps { /** 映射标记 - * @supported weapp + * @supported weapp */ key?: string /** 映射标记 - * @supported weapp - */ - mapkey?: string - - /** 映射标记 - * @supported alipay + * @supported alipay */ name?: string diff --git a/packages/taro-components/types/Slider.d.ts b/packages/taro-components/types/Slider.d.ts index 4c9a29e453e0..7d6f882b0d4f 100644 --- a/packages/taro-components/types/Slider.d.ts +++ b/packages/taro-components/types/Slider.d.ts @@ -118,7 +118,7 @@ declare namespace SliderProps { /** 滑动选择器 * @classification forms - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class PageView extends Component { diff --git a/packages/taro-components/types/Slot.d.ts b/packages/taro-components/types/Slot.d.ts index fdfb95c8b48c..3544445e093d 100644 --- a/packages/taro-components/types/Slot.d.ts +++ b/packages/taro-components/types/Slot.d.ts @@ -14,7 +14,8 @@ interface SlotProps { } /** slot 插槽 - * @supported weapp, swan, alipay, tt, jd, qq + * @classification viewContainer + * @supported weapp, swan, alipay, tt, jd, qq, harmony * @example * ```tsx * import { Slot, View, Text } from '@tarojs/components' diff --git a/packages/taro-components/types/Swiper.d.ts b/packages/taro-components/types/Swiper.d.ts index 667c5bb25e6a..f5515ebe9928 100644 --- a/packages/taro-components/types/Swiper.d.ts +++ b/packages/taro-components/types/Swiper.d.ts @@ -75,7 +75,7 @@ interface SwiperProps extends StandardProps { /** * 当 swiper-item 的个数大于等于 2,关闭 circular 并且开启 previous-margin 或 next-margin 的时候,可以指定这个边距是否应用到第一个、最后一个元素 * @default false - * @supported weapp, alipay, jd + * @supported weapp, alipay */ snapToEdge?: boolean @@ -174,7 +174,7 @@ interface SwiperProps extends StandardProps { onChange?: CommonEventFunction /** swiper-item 的位置发生改变时会触发 transition 事件 - * @supported weapp, alipay, tt, qq, jd + * @supported weapp, alipay, tt, qq */ onTransition?: CommonEventFunction @@ -247,7 +247,7 @@ declare namespace SwiperProps { /** 滑块视图容器。其中只可放置 swiper-item 组件,否则会导致未定义的行为。 * > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147) * @classification viewContainer - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * class App extends Component { diff --git a/packages/taro-components/types/SwiperItem.d.ts b/packages/taro-components/types/SwiperItem.d.ts index a1e69a633345..84d0270e45de 100644 --- a/packages/taro-components/types/SwiperItem.d.ts +++ b/packages/taro-components/types/SwiperItem.d.ts @@ -16,7 +16,7 @@ interface SwiperItemProps extends StandardProps { /** 仅可放置在 swiper 组件中,宽高自动设置为100% * > 不要为 `SwiperItem` 设置 **style** 属性,可以通过 class 设置样式。[7147](https://github.com/NervJS/taro/issues/7147) * @classification viewContainer - * @supported weapp, alipay, swan, tt, jd, h5, rn + * @supported weapp, alipay, swan, tt, jd, h5, rn, harmony * @example_react * ```tsx * class App extends Component { diff --git a/packages/taro-components/types/Switch.d.ts b/packages/taro-components/types/Switch.d.ts index 91d0d44e2dc2..aad1cb125a35 100644 --- a/packages/taro-components/types/Switch.d.ts +++ b/packages/taro-components/types/Switch.d.ts @@ -93,7 +93,7 @@ declare namespace SwitchProps { * * * ``` - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @see https://developers.weixin.qq.com/miniprogram/dev/component/switch.html */ declare const Switch: ComponentType diff --git a/packages/taro-components/types/Textarea.d.ts b/packages/taro-components/types/Textarea.d.ts index 11d3cd50c687..eb785cdc8789 100644 --- a/packages/taro-components/types/Textarea.d.ts +++ b/packages/taro-components/types/Textarea.d.ts @@ -2,95 +2,95 @@ import { ComponentType } from 'react' import { StandardProps, CommonEventFunction, FormItemProps } from './common' interface TextareaProps extends StandardProps, FormItemProps { /** 输入框的内容 - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ value?: string /** 输入框为空时占位符 - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ placeholder?: string /** 指定 placeholder 的样式 - * @supported weapp, alipay, swan, tt, qq + * @supported weapp, alipay, swan, tt, qq, jd */ placeholderStyle?: string /** 指定 placeholder 的样式类 * @default "textarea-placeholder" - * @supported weapp, alipay, swan, tt, qq + * @supported weapp, alipay, swan, tt, qq, jd */ placeholderClass?: string /** 是否禁用 * @default false - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ disabled?: boolean /** 最大输入长度,设置为 -1 的时候不限制最大长度 * @default 140 - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ maxlength?: number /** 自动聚焦,拉起键盘 * @default false - * @supported weapp, swan, qq, h5 + * @supported weapp, swan, qq, jd, h5 */ autoFocus?: boolean /** 获取焦点 * @default false - * @supported weapp, alipay, swan, tt, qq, rn + * @supported weapp, alipay, swan, tt, qq, jd, rn */ focus?: boolean /** 是否自动增高,设置 autoHeight 时,style.height不生效 * @default false - * @supported weapp, alipay, swan, tt, qq, rn + * @supported weapp, alipay, swan, tt, qq, jd, rn */ autoHeight?: boolean /** 如果 Textarea 是在一个 `position:fixed` 的区域,需要显示指定属性 fixed 为 true * @default false - * @supported weapp, swan, qq + * @supported weapp, swan, qq, jd */ fixed?: boolean /** 指定光标与键盘的距离,单位 px 。取 Textarea 距离底部的距离和 cursorSpacing 指定的距离的最小值作为光标与键盘的距离 * @default 0 - * @supported weapp, swan, tt, qq + * @supported weapp, swan, tt, qq, jd */ cursorSpacing?: number /** 指定 focus 时的光标位置 * @default -1 - * @supported weapp, swan, tt, qq + * @supported weapp, swan, tt, qq, jd */ cursor?: number /** 是否显示键盘上方带有”完成“按钮那一栏 * @default true - * @supported weapp, swan, tt, qq + * @supported weapp, swan, tt, qq, jd */ showConfirmBar?: boolean /** 光标起始位置,自动聚集时有效,需与 selectionEnd 搭配使用 * @default -1 - * @supported weapp, swan, tt, qq, rn + * @supported weapp, swan, tt, qq, jd, rn */ selectionStart?: number /** 光标结束位置,自动聚集时有效,需与 selectionStart 搭配使用 * @default -1 - * @supported weapp, swan, tt, qq, rn + * @supported weapp, swan, tt, qq, jd, rn */ selectionEnd?: number /** 键盘弹起时,是否自动上推页面 * @default true - * @supported weapp, swan, tt, qq + * @supported weapp, swan, tt, qq, jd */ adjustPosition?: boolean @@ -136,41 +136,35 @@ interface TextareaProps extends StandardProps, FormItemProps { */ controlled?: string - /** 使用原生键盘 - * @default false - * @supported alipay - */ - enableNative?: boolean - /** 无障碍访问,(属性)元素的额外描述 * @supported qq */ ariaLabel?: string /** 输入框聚焦时触发 - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ onFocus?: CommonEventFunction /** 输入框失去焦点时触发 - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ onBlur?: CommonEventFunction /** 输入框行数变化时调用 - * @supported weapp, swan, tt, qq, rn + * @supported weapp, swan, tt, qq, jd, rn */ onLineChange?: CommonEventFunction /** 当键盘输入时,触发 input 事件 * * **onInput 处理函数的返回值并不会反映到 textarea 上** - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ onInput?: CommonEventFunction /** 点击完成时, 触发 confirm 事件 - * @supported weapp, alipay, swan, tt, qq, rn + * @supported weapp, alipay, swan, tt, qq, jd, rn */ onConfirm?: CommonEventFunction @@ -224,7 +218,7 @@ declare namespace TextareaProps { /** 多行输入框。该组件是原生组件,使用时请注意相关限制 * @classification forms - * @supported weapp, alipay, swan, tt, qq, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class PageView extends Component { diff --git a/packages/taro-components/types/Video.d.ts b/packages/taro-components/types/Video.d.ts index 8f27aea058b4..5a53ce323c5e 100644 --- a/packages/taro-components/types/Video.d.ts +++ b/packages/taro-components/types/Video.d.ts @@ -53,7 +53,7 @@ interface VideoProps extends StandardProps { muted?: boolean /** 指定视频初始播放位置 - * @supported weapp, alipay, swan, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ initialTime?: number @@ -199,7 +199,7 @@ interface VideoProps extends StandardProps { /** * 是否显示锁屏按钮,仅在全屏时显示,锁屏后控制栏的操作 - * @supported weapp + * @supported weapp, tt */ showScreenLockButton?: boolean @@ -282,12 +282,6 @@ interface VideoProps extends StandardProps { */ mobilenetHintType?: string - /** 使用原生 - * @default true - * @supported alipay - */ - enableNative?: boolean - /** 浮窗设置。暂时不支持全局浮窗。 * 可选值: * @@ -352,6 +346,16 @@ interface VideoProps extends StandardProps { */ preferredPeakBitRate?: number + /** 是否为直播源 + * @supported weapp + */ + isLive?: boolean + + /** 清晰度,设置清晰度列表和默认播放的清晰度。切换清晰度按钮仅在全屏时展示,属性说明详见 Definition 类型说明。需要保证 src 和 definition 中有一个为必填,若同时设置了 src 和 definition,definition 优先级高于 src + * @supported tt + */ + definition?: string + /** 当开始/继续播放时触发 play 事件 * @supported weapp, alipay, swan, tt, qq, jd, h5, rn */ @@ -423,7 +427,7 @@ interface VideoProps extends StandardProps { onFullScreenChange?: CommonEventFunction /** 切换 controls 显示隐藏时触发。 - * @supported weapp + * @supported weapp, swan */ onControlsToggle?: CommonEventFunction @@ -643,7 +647,7 @@ declare namespace VideoProps { /** 视频。相关api:Taro.createVideoContext * @classification media - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class PageView extends Component { diff --git a/packages/taro-components/types/View.d.ts b/packages/taro-components/types/View.d.ts index 77c698b1797c..f53208b01e78 100644 --- a/packages/taro-components/types/View.d.ts +++ b/packages/taro-components/types/View.d.ts @@ -142,7 +142,7 @@ interface ViewProps extends StandardProps { /** 视图容器 * @classification viewContainer - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * export default class PageView extends Component { diff --git a/packages/taro-components/types/VoipRoom.d.ts b/packages/taro-components/types/VoipRoom.d.ts index 76951bdc7d69..d1a836486175 100644 --- a/packages/taro-components/types/VoipRoom.d.ts +++ b/packages/taro-components/types/VoipRoom.d.ts @@ -19,6 +19,12 @@ interface VoipRoomProps extends StandardProps { */ openId?: string + /** 画面与容器比例不一致时,画面的表现形式 + * @supported weapp + * @default "fill" + */ + objectFit?: 'fill' | 'contain' | 'cover' + /** 创建对话窗口失败时触发 * @supported weapp */ diff --git a/packages/taro-components/types/WebView.d.ts b/packages/taro-components/types/WebView.d.ts index ad33a98b1485..900fb0c83b32 100644 --- a/packages/taro-components/types/WebView.d.ts +++ b/packages/taro-components/types/WebView.d.ts @@ -49,7 +49,7 @@ declare namespace WebViewProps { /** web-view 组件是一个可以用来承载网页的容器,会自动铺满整个小程序页面。个人类型与海外类型的小程序暂不支持使用。 * @classification open - * @supported weapp, alipay, swan, tt, qq, jd, h5, rn + * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony * @example_react * ```tsx * class App extends Component { diff --git a/packages/taro-components/types/index.d.ts b/packages/taro-components/types/index.d.ts index cf8ce3d5ccd3..3b27682a767d 100644 --- a/packages/taro-components/types/index.d.ts +++ b/packages/taro-components/types/index.d.ts @@ -51,6 +51,7 @@ export { NavigationBar } from './NavigationBar' /** 媒体组件 */ export { Audio } from './Audio' export { Camera } from './Camera' +export { ChannelLive } from './ChannelLive' export { Image } from './Image' export { LivePlayer } from './LivePlayer' export { LivePusher } from './LivePusher' diff --git a/packages/taro-components/types/index.vue3.d.ts b/packages/taro-components/types/index.vue3.d.ts index 071de67b6d46..bfa19f2ca352 100644 --- a/packages/taro-components/types/index.vue3.d.ts +++ b/packages/taro-components/types/index.vue3.d.ts @@ -84,8 +84,8 @@ interface SlimProps { } /** 转换 react 的类型到 vue */ -type RemoveReactAttribute = 'className' | 'style' | 'key' | 'ref' | 'dangerouslySetInnerHTML' -type TransformReact2VueType

> = DistributiveOmit & SlimProps +export type RemoveReactAttribute = 'className' | 'style' | 'key' | 'ref' | 'dangerouslySetInnerHTML' +export type TransformReact2VueType

> = DistributiveOmit & SlimProps export type VueComponentType

> = DefineComponent> export * from './common' @@ -156,14 +156,14 @@ export declare const PageMeta: VueComponentType export declare const CustomWrapper: VueComponentType export declare const Slot: VueComponentType -type ReservedProps = { +export type ReservedProps = { key?: string | number | symbol ref?: VNodeRef ref_for?: boolean ref_key?: string } -type ElementAttrs = T & ReservedProps +export type ElementAttrs = T & ReservedProps declare global { namespace JSX { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe6542e91b4f..ecb197d11a55 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -571,7 +571,7 @@ importers: jquery: ^3.4.1 karmatic: ^2.1.0 lodash: ^4.17.21 - miniapp-types: 1.1.21 + miniapp-types: 1.4.1 resolve-pathname: ^3.0.0 simulant: ^0.2.2 style-loader: 1.3.0 @@ -604,7 +604,7 @@ importers: jquery: registry.npmjs.org/jquery/3.6.0 karmatic: registry.npmjs.org/karmatic/2.1.0_webpack@4.46.0 lodash: registry.npmjs.org/lodash/4.17.21 - miniapp-types: registry.npmjs.org/miniapp-types/1.1.21 + miniapp-types: registry.npmjs.org/miniapp-types/1.4.1 simulant: registry.npmjs.org/simulant/0.2.2 style-loader: registry.npmjs.org/style-loader/1.3.0_webpack@4.46.0 ts-node: registry.npmjs.org/ts-node/10.9.1_ah2igguqgj6e7ik4ubgohitm4e @@ -25162,10 +25162,10 @@ packages: webpack: registry.npmjs.org/webpack/5.69.0_esbuild@0.14.47 dev: false - registry.npmjs.org/miniapp-types/1.1.21: - resolution: {integrity: sha512-nhAgQjIYEPSO1VvAAvRxZOwvH/gEykbcMZdSGIG9HBE73bCE+I4IOdUt1O/CPjodH5C8husNGr3vTGq7JnfwVQ==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/miniapp-types/-/miniapp-types-1.1.21.tgz} + registry.npmjs.org/miniapp-types/1.4.1: + resolution: {integrity: sha512-giXqW/IU6hJ7pJBd3lipMOhO8dr9ks1juJVlEFNlLdRpBpVFtapsBRlO/zlQj9fjpN9AnSZi5H4GcwEf8xuUmw==, registry: https://registry.yarnpkg.com/, tarball: https://registry.npmjs.org/miniapp-types/-/miniapp-types-1.4.1.tgz} name: miniapp-types - version: 1.1.21 + version: 1.4.1 dev: true registry.npmjs.org/minimalistic-assert/1.0.1: