From f49e7b77edc04ba8149d6d3eff408a6bca52a5b6 Mon Sep 17 00:00:00 2001 From: yangyongming Date: Sat, 12 Oct 2024 10:35:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=85=BC=E5=AE=B9=E6=8A=96=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-ui/package.json | 2 +- packages/taro-ui/src/components/accordion/index.tsx | 2 +- packages/taro-ui/src/components/swipe-action/index.tsx | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) 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