Skip to content

Commit

Permalink
feat(Loading): add fullscreen props (#518)
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao authored Jan 8, 2025
1 parent e654da5 commit 8347de2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 3 deletions.
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ style | Object | - | CSS(Cascading Style Sheets) | N
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
delay | Number | 0 | \- | N
duration | Number | 800 | \- | N
fullscreen | Boolean | false | `1.8.5` | N
indicator | Boolean / Slot | true | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
inherit-color | Boolean | false | \- | N
layout | String | horizontal | options: horizontal/vertical | N
Expand All @@ -20,6 +21,7 @@ reverse | Boolean | - | \- | N
size | String | '20px' | \- | N
text | String / Slot | - | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
theme | String | circular | options: circular/spinner/dots | N

### Loading External Classes

className | Description
Expand Down
2 changes: 2 additions & 0 deletions packages/products/tdesign-miniprogram/src/loading/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
delay | Number | 0 | 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 | N
duration | Number | 800 | 加载动画执行完成一次的时间,单位:毫秒 | N
fullscreen | Boolean | false | `1.8.5`。是否显示为全屏加载 | N
indicator | Boolean / Slot | true | 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
inherit-color | Boolean | false | 是否继承父元素颜色 | N
layout | String | horizontal | 对齐方式。可选项:horizontal/vertical | N
Expand All @@ -20,6 +21,7 @@ reverse | Boolean | - | 加载动画是否反向 | N
size | String | '20px' | 尺寸,示例:20px | N
text | String / Slot | - | 加载提示文案。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N
theme | String | circular | 加载组件类型。可选项:circular/spinner/dots | N

### Loading External Classes

类名 | 描述
Expand Down
5 changes: 5 additions & 0 deletions packages/products/tdesign-miniprogram/src/loading/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ const props: TdLoadingProps = {
externalClasses: {
type: Array,
},
/** 是否显示为全屏加载 */
fullscreen: {
type: Boolean,
value: false,
},
/** 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符 */
indicator: {
type: Boolean,
Expand Down
8 changes: 8 additions & 0 deletions packages/products/tdesign-miniprogram/src/loading/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ export interface TdLoadingProps {
type: ArrayConstructor;
value?: ['t-class', 't-class-text', 't-class-indicator'];
};
/**
* 是否显示为全屏加载
* @default false
*/
fullscreen?: {
type: BooleanConstructor;
value?: boolean;
};
/**
* 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符
* @default true
Expand Down
8 changes: 5 additions & 3 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -71477,7 +71477,8 @@
"2",
"4",
"8",
"16"
"16",
"64"
],
"component": "Loading",
"field_category": 1,
Expand All @@ -71500,7 +71501,7 @@
"html_attribute": 0,
"trigger_elements": "",
"deprecated": 0,
"version": null,
"version": "{\"Miniprogram\": \"1.8.5\"}",
"test_description": null,
"support_default_value": 0,
"field_category_text": "Props",
Expand All @@ -71509,7 +71510,8 @@
"React(PC)",
"Angular(PC)",
"Vue(Mobile)",
"React(Mobile)"
"React(Mobile)",
"Miniprogram"
],
"field_type_text": [
"Boolean"
Expand Down

0 comments on commit 8347de2

Please sign in to comment.