Skip to content

Commit f135386

Browse files
committed
fix(RnText):update tooltipProps props
1 parent cf9b04d commit f135386

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

example/examples/src/routes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export const stackPageData: Routes[] = [
235235
component: require('./routes/Typography').default,
236236
params: {
237237
title: 'Typography 排版',
238-
description: '包含 H1~H6,<U>,<S>,<P>等,类似于 HTML 中的标签。',
238+
description: '包含 H1~H6,<U>,<S>,<P>,<RnText>等,类似于 HTML 中的标签。',
239239
},
240240
},
241241
{

example/examples/src/routes/Typography/index.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ export default class TypographyView extends React.Component<TypographyViewProps>
7777
<Card title="可高亮文字<RnText />">
7878
<RnText type="header" label="react-native-uiw" />
7979
<RnText type="title" label="react-native-uiw" />
80-
<RnText
81-
type="label"
82-
label="文字过长"
83-
tooltipProps={{number: 4, content: 'react-native-uiw'}}
84-
/>
8580
<RnText type="subLabel" label="react-native-uiw" />
8681
<RnText
8782
type="header"
@@ -90,6 +85,15 @@ export default class TypographyView extends React.Component<TypographyViewProps>
9085
highlightText="native"
9186
highlightTextStyle={{fontSize: 24, color: 'red'}}
9287
/>
88+
<RnText
89+
style={{fontSize: 14}}
90+
type="label"
91+
label="这一段可以截取并且,支持toopTip的文本"
92+
tooltipProps={{
93+
number: 5,
94+
content: '这一段可以截取并且,支持toopTip的文本',
95+
}}
96+
/>
9397
</Card>
9498
</Body>
9599
<Footer />

packages/core/src/SwipeAction/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class SwipeActionView extends Component<SwipeActionProps> {
2020
render() {
2121
const right = [
2222
{
23-
text: '查看备注',
23+
text: '查看',
2424
color: 'orange',
2525
x: 250,
2626
onPress: () => {

packages/core/src/utils/rn-text.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,5 @@ export const getTextPartsByHighlight = (targetString = '', highlightText = '') =
8282
* @returns
8383
*/
8484
export function sliceText(text = '', length: number) {
85-
return text.slice(0, length) + '...';
85+
return text.substr(0, length) + '...';
8686
}

0 commit comments

Comments
 (0)