Skip to content

Commit

Permalink
fix: 兼容抖音
Browse files Browse the repository at this point in the history
  • Loading branch information
yangyongming committed Oct 12, 2024
1 parent 75a3783 commit f49e7b7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/taro-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "taro-ui3",
"version": "3.3.1-beta.2",
"version": "3.3.1-beta.3",
"description": "UI KIT for Taro",
"module": "dist/index.esm.js",
"main": "dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/taro-ui/src/components/accordion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class AtAccordion extends React.Component<
private getSelectorStr(type: string): string {
const { componentId } = this.state
const { parentSelector } = this.props
return (parentSelector && process.env.TARO_ENV === 'weapp' ? `${parentSelector} >>> ` : '') + `#${type}-${componentId}`
return (parentSelector && (process.env.TARO_ENV === 'weapp' || process.env.TARO_ENV === 'tt') ? `${parentSelector} >>> ` : '') + `#${type}-${componentId}`
}

private toggleWithAnimation(): void {
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-ui/src/components/swipe-action/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class AtSwipeAction extends React.Component<
private getSelectorStr(type: string): string {
const { componentId } = this.state
const { parentSelector } = this.props
return (parentSelector && process.env.TARO_ENV === 'weapp' ? `${parentSelector} >>> ` : '') + `#${type}-${componentId}`
return (parentSelector && (process.env.TARO_ENV === 'weapp' || process.env.TARO_ENV === 'tt') ? `${parentSelector} >>> ` : '') + `#${type}-${componentId}`
}

/**
Expand Down Expand Up @@ -94,7 +94,7 @@ export default class AtSwipeAction extends React.Component<
*/
private async getMaxOffsetSize(): Promise<void> {
const actionOptionsRect = await delayGetClientRect({
selectorStr: this.getSelectorStr('swipeActionOptions')
selectorStr: this.getSelectorStr('swipeActionOptions'),
})

const maxOffsetSize = actionOptionsRect[0].width
Expand Down

0 comments on commit f49e7b7

Please sign in to comment.