diff --git a/packages/taro-ui/package.json b/packages/taro-ui/package.json index e734414e..a176ac25 100644 --- a/packages/taro-ui/package.json +++ b/packages/taro-ui/package.json @@ -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", diff --git a/packages/taro-ui/src/components/accordion/index.tsx b/packages/taro-ui/src/components/accordion/index.tsx index fc8e5089..5359d1e0 100644 --- a/packages/taro-ui/src/components/accordion/index.tsx +++ b/packages/taro-ui/src/components/accordion/index.tsx @@ -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 { diff --git a/packages/taro-ui/src/components/swipe-action/index.tsx b/packages/taro-ui/src/components/swipe-action/index.tsx index 844127e1..805e9776 100644 --- a/packages/taro-ui/src/components/swipe-action/index.tsx +++ b/packages/taro-ui/src/components/swipe-action/index.tsx @@ -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}` } /** @@ -94,7 +94,7 @@ export default class AtSwipeAction extends React.Component< */ private async getMaxOffsetSize(): Promise { const actionOptionsRect = await delayGetClientRect({ - selectorStr: this.getSelectorStr('swipeActionOptions') + selectorStr: this.getSelectorStr('swipeActionOptions'), }) const maxOffsetSize = actionOptionsRect[0].width