Skip to content

Commit

Permalink
feat(popup): popup对齐vue mobile (#362)
Browse files Browse the repository at this point in the history
* feat(popup): popup对齐vue mobile

* fix: docs

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: 黎伟杰 <674416404@qq.com>
  • Loading branch information
3 people authored Aug 12, 2024
1 parent 719497d commit 0840995
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 60 deletions.
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ overlayProps | Object | {} | Typescript:`OverlayProps`,[Overlay API Document
placement | String | top | options: top/left/right/bottom/center | N
preventScrollThrough | Boolean | true | \- | N
showOverlay | Boolean | true | \- | N
transitionName | String | - | \- | N
visible | Boolean | - | Typescript:`boolean` | N
zIndex | Number | - | \- | N
onClose | Function | | Typescript:`(context: { e: MouseEvent }) => void`<br/> | N
Expand Down
3 changes: 1 addition & 2 deletions packages/products/tdesign-mobile-react/src/popup/popup.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ closeOnOverlayClick | Boolean | true | 点击遮罩层是否关闭 | N
destroyOnClose | Boolean | false | 是否在关闭浮层时销毁浮层 | N
overlayProps | Object | {} | 遮罩层的属性,透传至 overlay。TS 类型:`OverlayProps`[Overlay API Documents](./overlay?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/popup/type.ts) | N
placement | String | top | 浮层出现位置。可选项:top/left/right/bottom/center | N
preventScrollThrough | Boolean | true | 防止滚动穿透 | N
preventScrollThrough | Boolean | true | 是否阻止背景滚动 | N
showOverlay | Boolean | true | 是否显示遮罩层 | N
transitionName | String | - | 弹出层内容区的动画名,等价于transition组件的name属性 | N
visible | Boolean | - | 是否显示浮层。TS 类型:`boolean` | N
zIndex | Number | - | 组件层级,Web 侧样式默认为 5500,移动端和小程序样式默认为 1500 | N
onClose | Function | | TS 类型:`(context: { e: MouseEvent }) => void`<br/>组件准备关闭时触发 | N
Expand Down
7 changes: 1 addition & 6 deletions packages/products/tdesign-mobile-react/src/popup/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface TdPopupProps {
*/
placement?: 'top' | 'left' | 'right' | 'bottom' | 'center';
/**
* 防止滚动穿透
* 是否阻止背景滚动
* @default true
*/
preventScrollThrough?: boolean;
Expand All @@ -52,11 +52,6 @@ export interface TdPopupProps {
* @default true
*/
showOverlay?: boolean;
/**
* 弹出层内容区的动画名,等价于transition组件的name属性
* @default ''
*/
transitionName?: string;
/**
* 是否显示浮层
*/
Expand Down
77 changes: 26 additions & 51 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -82317,7 +82317,8 @@
{
"id": 1712719525,
"platform_framework": [
"8"
"8",
"16"
],
"component": "Popup",
"field_category": 1,
Expand Down Expand Up @@ -82345,7 +82346,8 @@
"support_default_value": 0,
"field_category_text": "Props",
"platform_framework_text": [
"Vue(Mobile)"
"Vue(Mobile)",
"React(Mobile)"
],
"field_type_text": [
"Boolean"
Expand Down Expand Up @@ -82922,8 +82924,9 @@
]
},
{
"id": 3490,
"id": 1712719572,
"platform_framework": [
"8",
"16",
"32",
"64"
Expand All @@ -82936,45 +82939,6 @@
],
"field_default_value": "true",
"field_enum": "",
"field_desc_zh": "防止滚动穿透",
"field_desc_en": null,
"field_required": 0,
"event_input": "",
"create_time": "2023-05-16 12:22:49",
"update_time": "2023-05-16 12:22:49",
"event_output": null,
"custom_field_type": null,
"syntactic_sugar": null,
"readonly": 1,
"html_attribute": 0,
"trigger_elements": "",
"deprecated": 0,
"version": "",
"test_description": null,
"support_default_value": 0,
"field_category_text": "Props",
"platform_framework_text": [
"React(Mobile)",
"Angular(Mobile)",
"Miniprogram"
],
"field_type_text": [
"Boolean"
]
},
{
"id": 1712719572,
"platform_framework": [
"8"
],
"component": "Popup",
"field_category": 1,
"field_name": "preventScrollThrough",
"field_type": [
"4"
],
"field_default_value": "true",
"field_enum": "",
"field_desc_zh": "是否阻止背景滚动",
"field_desc_en": null,
"field_required": 0,
Expand All @@ -82993,7 +82957,10 @@
"support_default_value": 0,
"field_category_text": "Props",
"platform_framework_text": [
"Vue(Mobile)"
"Vue(Mobile)",
"React(Mobile)",
"Angular(Mobile)",
"Miniprogram"
],
"field_type_text": [
"Boolean"
Expand Down Expand Up @@ -83445,7 +83412,8 @@
{
"id": 1996,
"platform_framework": [
"8"
"8",
"16"
],
"component": "Popup",
"field_category": 2,
Expand Down Expand Up @@ -83473,7 +83441,8 @@
"support_default_value": 0,
"field_category_text": "Events",
"platform_framework_text": [
"Vue(Mobile)"
"Vue(Mobile)",
"React(Mobile)"
],
"field_type_text": [
"Function"
Expand All @@ -83482,7 +83451,8 @@
{
"id": 1997,
"platform_framework": [
"8"
"8",
"16"
],
"component": "Popup",
"field_category": 2,
Expand Down Expand Up @@ -83510,7 +83480,8 @@
"support_default_value": 0,
"field_category_text": "Events",
"platform_framework_text": [
"Vue(Mobile)"
"Vue(Mobile)",
"React(Mobile)"
],
"field_type_text": [
"Function"
Expand All @@ -83519,7 +83490,8 @@
{
"id": 1994,
"platform_framework": [
"8"
"8",
"16"
],
"component": "Popup",
"field_category": 2,
Expand Down Expand Up @@ -83547,7 +83519,8 @@
"support_default_value": 0,
"field_category_text": "Events",
"platform_framework_text": [
"Vue(Mobile)"
"Vue(Mobile)",
"React(Mobile)"
],
"field_type_text": [
"Function"
Expand All @@ -83556,7 +83529,8 @@
{
"id": 1995,
"platform_framework": [
"8"
"8",
"16"
],
"component": "Popup",
"field_category": 2,
Expand Down Expand Up @@ -83584,7 +83558,8 @@
"support_default_value": 0,
"field_category_text": "Events",
"platform_framework_text": [
"Vue(Mobile)"
"Vue(Mobile)",
"React(Mobile)"
],
"field_type_text": [
"Function"
Expand Down

0 comments on commit 0840995

Please sign in to comment.