Skip to content

Commit 9dab1f4

Browse files
fix(typography): fix custom text copy(#5977)
* fix: custom copy text * chore: stash changelog [ci skip] --------- Co-authored-by: tdesign-bot <[email protected]>
1 parent 53db535 commit 9dab1f4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

packages/components/typography/text.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ export default defineComponent({
9393
};
9494

9595
const getChildrenText = () => {
96+
const { copyable } = props;
97+
if (typeof copyable === 'object' && copyable?.text) {
98+
return copyable.text;
99+
}
96100
if (typeof content.value === 'string') {
97101
return content.value;
98102
} else if (Array.isArray(content.value)) {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
pr_number: 5977
3+
contributor: Wesley-0808
4+
---
5+
6+
- fix(Typography): 修复自定义复制内容无效的问题 @Wesley-0808 ([#5977](https://github.com/Tencent/tdesign-vue-next/pull/5977))

0 commit comments

Comments
 (0)