From bb99cf518732887c76caa6f55193fce4a6a5ad6c Mon Sep 17 00:00:00 2001
From: teacherding <1215184696@qq.com>
Date: Thu, 2 Jan 2025 20:37:19 +0800
Subject: [PATCH 1/8] feat: loading add fullscreen property
---
src/loading/README.en-US.md | 1 +
src/loading/README.md | 1 +
src/loading/loading.less | 15 +++++++++++++++
src/loading/loading.wxml | 2 +-
src/loading/props.ts | 5 +++++
src/loading/type.ts | 8 ++++++++
6 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/src/loading/README.en-US.md b/src/loading/README.en-US.md
index ac1e999f7..9c2650633 100644
--- a/src/loading/README.en-US.md
+++ b/src/loading/README.en-US.md
@@ -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 | true | \- | 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
diff --git a/src/loading/README.md b/src/loading/README.md
index 50dad4760..ab6ea837e 100644
--- a/src/loading/README.md
+++ b/src/loading/README.md
@@ -66,6 +66,7 @@ style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
delay | Number | 0 | 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 | N
duration | Number | 800 | 加载动画执行完成一次的时间,单位:毫秒 | N
+fullscreen | Boolean | true | 是否显示为全屏加载 | 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
diff --git a/src/loading/loading.less b/src/loading/loading.less
index 17ee52c18..84d128c8e 100644
--- a/src/loading/loading.less
+++ b/src/loading/loading.less
@@ -6,6 +6,7 @@
@loading-text-color: var(--td-loading-text-color, @text-color-primary);
@loading-text-font-size: var(--td-loading-text-font-size, 24rpx);
@loading-text-line-height: var(--td-loading-text-line-height, 40rpx);
+@loading-z-index: 999;
.@{loading} {
display: inline-flex;
@@ -13,6 +14,20 @@
justify-content: center;
font-size: 24rpx;
+ &--fullscreen {
+ position: fixed;
+ display: flex;
+ align-items: center;
+ vertical-align: middle;
+ justify-content: center;
+ top: 50%;
+ left: 50%;
+ width: 100%;
+ height: 100%;
+ transform: translate(-50%, -50%);
+ z-index: @loading-z-index;
+ }
+
&__spinner {
position: relative;
box-sizing: border-box;
diff --git a/src/loading/loading.wxml b/src/loading/loading.wxml
index 094ebf1ad..1bacbab7f 100644
--- a/src/loading/loading.wxml
+++ b/src/loading/loading.wxml
@@ -1,7 +1,7 @@
Date: Fri, 3 Jan 2025 11:17:09 +0800
Subject: [PATCH 2/8] feat: loading add fullscreen property
---
src/action-sheet/_example/list/index.wxml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/action-sheet/_example/list/index.wxml b/src/action-sheet/_example/list/index.wxml
index 0acff5f11..f21ac043a 100644
--- a/src/action-sheet/_example/list/index.wxml
+++ b/src/action-sheet/_example/list/index.wxml
@@ -1,4 +1,4 @@
-
+
列表型
From 5a1beb12b7393c94dd3b219f8eef35a6c7cd5c39 Mon Sep 17 00:00:00 2001
From: teacherding <1215184696@qq.com>
Date: Mon, 6 Jan 2025 10:38:26 +0800
Subject: [PATCH 3/8] fix: rebase
---
src/loading/props.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/loading/props.ts b/src/loading/props.ts
index c88d32612..0904c02c9 100644
--- a/src/loading/props.ts
+++ b/src/loading/props.ts
@@ -16,7 +16,7 @@ const props: TdLoadingProps = {
type: Number,
value: 800,
},
- /** 是否显示为全屏加载 */
+ /** 是否显示为全屏加载 */
fullscreen: {
type: Boolean,
value: false,
From 4506ad9d9d870396a88afdcad303288b60e6fc44 Mon Sep 17 00:00:00 2001
From: teacherding <1215184696@qq.com>
Date: Mon, 6 Jan 2025 10:45:43 +0800
Subject: [PATCH 4/8] feat: rebase
---
src/loading/props.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/loading/props.ts b/src/loading/props.ts
index 0904c02c9..c88d32612 100644
--- a/src/loading/props.ts
+++ b/src/loading/props.ts
@@ -16,7 +16,7 @@ const props: TdLoadingProps = {
type: Number,
value: 800,
},
- /** 是否显示为全屏加载 */
+ /** 是否显示为全屏加载 */
fullscreen: {
type: Boolean,
value: false,
From bfd3c0efcbc424f0b3c7e733f85f0462f652d44a Mon Sep 17 00:00:00 2001
From: teacherding <1215184696@qq.com>
Date: Tue, 7 Jan 2025 11:01:27 +0800
Subject: [PATCH 5/8] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E6=B5=8B=E8=AF=95?=
=?UTF-8?q?=E7=94=A8=E4=BE=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/action-sheet/__test__/__snapshots__/demo.test.js.snap | 1 +
src/image-viewer/__test__/__snapshots__/index.test.js.snap | 6 +++---
src/image/__test__/__snapshots__/index.test.js.snap | 2 +-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/action-sheet/__test__/__snapshots__/demo.test.js.snap b/src/action-sheet/__test__/__snapshots__/demo.test.js.snap
index 61fd32fea..dbc24757c 100644
--- a/src/action-sheet/__test__/__snapshots__/demo.test.js.snap
+++ b/src/action-sheet/__test__/__snapshots__/demo.test.js.snap
@@ -51,6 +51,7 @@ exports[`ActionSheet ActionSheet list demo works fine 1`] = `
diff --git a/src/image-viewer/__test__/__snapshots__/index.test.js.snap b/src/image-viewer/__test__/__snapshots__/index.test.js.snap
index b6c660d4d..93fc412ed 100644
--- a/src/image-viewer/__test__/__snapshots__/index.test.js.snap
+++ b/src/image-viewer/__test__/__snapshots__/index.test.js.snap
@@ -21,7 +21,7 @@ exports[`image-viewer :base 1`] = `
tClassText="t-image--loading-text"
>
Date: Wed, 8 Jan 2025 11:37:55 +0800
Subject: [PATCH 6/8] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=83=8C?=
=?UTF-8?q?=E6=99=AF=E8=89=B2=E5=92=8C=E5=B1=82=E7=BA=A7=E5=8F=98=E9=87=8F?=
=?UTF-8?q?=EF=BC=8C=E6=96=87=E6=A1=A3=E5=92=8C=E7=94=A8=E4=BE=8B=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/action-sheet/_example/list/index.wxml | 2 +-
src/loading/README.md | 2 +-
src/loading/loading.less | 4 +++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/action-sheet/_example/list/index.wxml b/src/action-sheet/_example/list/index.wxml
index f21ac043a..0acff5f11 100644
--- a/src/action-sheet/_example/list/index.wxml
+++ b/src/action-sheet/_example/list/index.wxml
@@ -1,4 +1,4 @@
-
+
列表型
diff --git a/src/loading/README.md b/src/loading/README.md
index ab6ea837e..90fdd848c 100644
--- a/src/loading/README.md
+++ b/src/loading/README.md
@@ -66,7 +66,7 @@ style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
delay | Number | 0 | 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 | N
duration | Number | 800 | 加载动画执行完成一次的时间,单位:毫秒 | N
-fullscreen | Boolean | true | 是否显示为全屏加载 | N
+fullscreen | Boolean | false | 是否显示为全屏加载 | 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
diff --git a/src/loading/loading.less b/src/loading/loading.less
index 84d128c8e..a9a85b4b7 100644
--- a/src/loading/loading.less
+++ b/src/loading/loading.less
@@ -6,7 +6,8 @@
@loading-text-color: var(--td-loading-text-color, @text-color-primary);
@loading-text-font-size: var(--td-loading-text-font-size, 24rpx);
@loading-text-line-height: var(--td-loading-text-line-height, 40rpx);
-@loading-z-index: 999;
+@loading-z-index: var(--td-loading-z-index, 3500);
+@loading-full-bg-color: var(--td-loading-full-bg-color, rgba(255, 255, 255, 0.6));
.@{loading} {
display: inline-flex;
@@ -26,6 +27,7 @@
height: 100%;
transform: translate(-50%, -50%);
z-index: @loading-z-index;
+ background-color: @loading-full-bg-color;
}
&__spinner {
From 77d2f5b374fb1e869cd55935a1ea044d5bfe81a3 Mon Sep 17 00:00:00 2001
From: anlyyao
Date: Wed, 8 Jan 2025 14:34:18 +0800
Subject: [PATCH 7/8] docs: sync api
---
.../__test__/__snapshots__/demo.test.js.snap | 1 -
src/loading/README.en-US.md | 5 +++--
src/loading/README.md | 5 +++--
src/loading/props.ts | 8 ++------
src/loading/type.ts | 11 ++---------
5 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/src/action-sheet/__test__/__snapshots__/demo.test.js.snap b/src/action-sheet/__test__/__snapshots__/demo.test.js.snap
index dbc24757c..61fd32fea 100644
--- a/src/action-sheet/__test__/__snapshots__/demo.test.js.snap
+++ b/src/action-sheet/__test__/__snapshots__/demo.test.js.snap
@@ -51,7 +51,6 @@ exports[`ActionSheet ActionSheet list demo works fine 1`] = `
diff --git a/src/loading/README.en-US.md b/src/loading/README.en-US.md
index 9c2650633..10f987e9c 100644
--- a/src/loading/README.en-US.md
+++ b/src/loading/README.en-US.md
@@ -10,7 +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 | true | \- | 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
@@ -18,9 +18,10 @@ loading | Boolean | true | \- | N
pause | Boolean | false | \- | N
progress | Number | - | \- | N
reverse | Boolean | - | \- | N
-size | String | '40rpx' | \- | 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
diff --git a/src/loading/README.md b/src/loading/README.md
index 90fdd848c..13be6196c 100644
--- a/src/loading/README.md
+++ b/src/loading/README.md
@@ -66,7 +66,7 @@ style | Object | - | 样式 | N
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
delay | Number | 0 | 延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒 | N
duration | Number | 800 | 加载动画执行完成一次的时间,单位:毫秒 | N
-fullscreen | Boolean | false | 是否显示为全屏加载 | 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
@@ -74,9 +74,10 @@ loading | Boolean | true | 是否处于加载状态 | N
pause | Boolean | false | 是否暂停动画 | N
progress | Number | - | 加载进度 | N
reverse | Boolean | - | 加载动画是否反向 | N
-size | String | '40rpx' | 尺寸,示例:40rpx/20px | 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,skyline 模式下暂不支持枚举值 circular | N
+
### Loading External Classes
类名 | 描述
diff --git a/src/loading/props.ts b/src/loading/props.ts
index c88d32612..69952a840 100644
--- a/src/loading/props.ts
+++ b/src/loading/props.ts
@@ -21,10 +21,6 @@ const props: TdLoadingProps = {
type: Boolean,
value: false,
},
- /** 组件类名,分别用于设置加载组件外层元素,加载组件文本,加载组件指示符,加载指示符内侧同心圆等元素类名 */
- externalClasses: {
- type: Array,
- },
/** 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符 */
indicator: {
type: Boolean,
@@ -58,10 +54,10 @@ const props: TdLoadingProps = {
reverse: {
type: Boolean,
},
- /** 尺寸,示例:40rpx/20px */
+ /** 尺寸,示例:20px */
size: {
type: String,
- value: '40rpx',
+ value: '20px',
},
/** 加载提示文案 */
text: {
diff --git a/src/loading/type.ts b/src/loading/type.ts
index e2c91684f..0a55d4592 100644
--- a/src/loading/type.ts
+++ b/src/loading/type.ts
@@ -29,13 +29,6 @@ export interface TdLoadingProps {
type: BooleanConstructor;
value?: boolean;
};
- /**
- * 组件类名,分别用于设置加载组件外层元素,加载组件文本,加载组件指示符,加载指示符内侧同心圆等元素类名
- */
- externalClasses?: {
- type: ArrayConstructor;
- value?: ['t-class', 't-class-text', 't-class-indicator'];
- };
/**
* 加载指示符,值为 true 显示默认指示符,值为 false 则不显示,也可以自定义指示符
* @default true
@@ -91,8 +84,8 @@ export interface TdLoadingProps {
value?: boolean;
};
/**
- * 尺寸,示例:40rpx/20px
- * @default '40rpx'
+ * 尺寸,示例:20px
+ * @default '20px'
*/
size?: {
type: StringConstructor;
From 4eeeb060b2aa3e038c7b07b44e9ec77b77b34dae Mon Sep 17 00:00:00 2001
From: anlyyao
Date: Wed, 8 Jan 2025 15:23:50 +0800
Subject: [PATCH 8/8] chore: optimize code
---
src/image-viewer/__test__/__snapshots__/index.test.js.snap | 6 +++---
src/image/__test__/__snapshots__/index.test.js.snap | 2 +-
src/loading/loading.less | 5 ++---
src/loading/loading.wxml | 2 +-
4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/image-viewer/__test__/__snapshots__/index.test.js.snap b/src/image-viewer/__test__/__snapshots__/index.test.js.snap
index 93fc412ed..4a3bf6359 100644
--- a/src/image-viewer/__test__/__snapshots__/index.test.js.snap
+++ b/src/image-viewer/__test__/__snapshots__/index.test.js.snap
@@ -22,7 +22,7 @@ exports[`image-viewer :base 1`] = `
>