Skip to content

Commit

Permalink
fix(type): update params type of previewImage, add mapkey type for sh…
Browse files Browse the repository at this point in the history
…are-element

NervJS#14053
  • Loading branch information
TheKonka committed Jun 26, 2023
1 parent 10b66fc commit f929ba5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
5 changes: 5 additions & 0 deletions packages/taro-components/types/ShareElement.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ import { StandardProps, CommonEventFunction } from './common'
interface ShareElementProps extends StandardProps {
/** 映射标记
* @supported weapp
* @deprecated 使用mapkey替换key
*/
key?: string
/** 映射标记
* @supported weapp
*/
mapkey?: string
/** 映射标记
* @supported alipay
*/
Expand Down
22 changes: 17 additions & 5 deletions packages/taro/types/api/media/image.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,23 @@ declare module '../../index' {
interface Option {
/** 需要预览的图片链接列表。 */
urls: string[]
/** 当前显示图片的链接 */
current?: string
/** @support weapp 最低版本:2.13.0。是否显示长按菜单,默认值:true */
/**
* 微信端为当前显示图片的链接,支付宝端为当前显示图片的索引值
*/
current?: string | number
/**
* 是否支持长按下载图片
* @supported alipay 基础库: 1.13.0
*/
enablesavephoto?: boolean
/**
* 是否在右下角显示下载入口
* @supported alipay 基础库: 1.13.0
*/
enableShowPhotoDownload?: boolean
/** @supported weapp 最低版本:2.13.0。是否显示长按菜单,默认值:true */
showmenu?: boolean
/** @support weapp 最低版本:2.13.0。origin: 发送完整的referrer; no-referrer: 不发送。格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;默认值:no-referrer */
/** @supported weapp 最低版本:2.13.0。origin: 发送完整的referrer; no-referrer: 不发送。格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;默认值:no-referrer */
referrerPolicy?: string
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
complete?: (res: TaroGeneral.CallbackResult) => void
Expand All @@ -46,7 +58,7 @@ declare module '../../index' {
/** 需要预览的资源列表 */
sources: Sources[]
/** 当前显示的资源序号,默认值:0 */
current?: number
current?: number
/** 是否显示长按菜单 2.13.0,默认值:true */
showmenu?: boolean
/** origin: 发送完整的referrer; no-referrer: 不发送。格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;默认值:no-referrer */
Expand Down

0 comments on commit f929ba5

Please sign in to comment.