diff --git a/docs/component/curtain.md b/docs/component/curtain.md index 1fde99e6..5dd4caf4 100644 --- a/docs/component/curtain.md +++ b/docs/component/curtain.md @@ -96,6 +96,8 @@ function handleClick() { | hide-when-close | 是否当关闭时将弹出层隐藏(display: none) | boolean | - | true | - | | z-index | 设置层级 | number | - | 10 | 1.4.0 | | root-portal | 是否从页面中脱离出来,用于解决各种 fixed 失效问题 | boolean | - | false | 1.11.0 | +| show-menu-by-longpress | 开启长按图片显示识别小程序码菜单,仅微信小程序支持 | boolean | - | false | $LOWEST_VERSION$ | +| close-on-click | 是否在点击图片时关闭幕帘,默认为 true | boolean | - | ture | $LOWEST_VERSION$ | ## Events diff --git a/docs/en-US/component/curtain.md b/docs/en-US/component/curtain.md index bac117ed..2eae7672 100644 --- a/docs/en-US/component/curtain.md +++ b/docs/en-US/component/curtain.md @@ -96,6 +96,8 @@ function handleClick() { | hide-when-close | Hide popup layer when closed (display: none) | boolean | - | true | - | | z-index | Set layer level | number | - | 10 | 1.4.0 | | root-portal | Whether to detach from the page, used to solve various fixed positioning issues | boolean | - | false | 1.11.0 | +| show-menu-by-longpress | Enable long press image to show Mini Program code recognition menu, only supported in WeChat Mini Program | boolean | - | false | $LOWEST_VERSION$ | +| close-on-click | Whether clicking the image should close the curtain. Defaults to true. | boolean | - | ture | $LOWEST_VERSION$ | ## Events diff --git a/src/uni_modules/wot-design-uni/components/wd-curtain/types.ts b/src/uni_modules/wot-design-uni/components/wd-curtain/types.ts index f94e00da..ce12a8d5 100644 --- a/src/uni_modules/wot-design-uni/components/wd-curtain/types.ts +++ b/src/uni_modules/wot-design-uni/components/wd-curtain/types.ts @@ -1,8 +1,8 @@ /* * @Author: weisheng * @Date: 2025-01-25 23:46:29 - * @LastEditTime: 2025-02-13 13:16:45 - * @LastEditors: weisheng + * @LastEditTime: 2025-09-09 10:00:00 + * @LastEditors: rusheng * @Description: * @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/wd-curtain/types.ts * 记得注释 @@ -68,7 +68,15 @@ export const curtainProps = { /** * 是否从页面中脱离出来,用于解决各种 fixed 失效问题 (H5: teleport, APP: renderjs, 小程序: root-portal) */ - rootPortal: makeBooleanProp(false) + rootPortal: makeBooleanProp(false), + /** + * 开启长按图片显示识别小程序码菜单,仅在微信小程序平台有效 + */ + showMenuByLongpress: makeBooleanProp(false), + /** + * 点击图片是否关闭幕帘,默认为 true + */ + closeOnClick: makeBooleanProp(true) } export type CurtainProps = ExtractPropTypes diff --git a/src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue b/src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue index 73181ca0..f6464203 100644 --- a/src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue +++ b/src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue @@ -20,7 +20,15 @@ :custom-style="customStyle" > - +