Skip to content

Commit 39f28a1

Browse files
committed
fix: 修复代码评审的问题
1 parent e6301ab commit 39f28a1

File tree

5 files changed

+16
-27
lines changed

5 files changed

+16
-27
lines changed

src/packages/input/input.taro.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,7 @@ import { useConfig, useRtl } from '@/packages/configprovider/index.taro'
1414
import { ComponentDefaults } from '@/utils/typings'
1515
import { usePropsValue } from '@/hooks/use-props-value'
1616
import { InputFormatTrigger, TaroInputProps } from '@/types'
17-
18-
const ENV_TYPE = {
19-
WEAPP: 'WEAPP',
20-
SWAN: 'SWAN',
21-
ALIPAY: 'ALIPAY',
22-
TT: 'TT',
23-
QQ: 'QQ',
24-
JD: 'JD',
25-
WEB: 'WEB',
26-
RN: 'RN',
27-
HARMONY: 'HARMONY',
28-
QUICKAPP: 'QUICKAPP',
29-
}
17+
import { ENV_TYPE } from '@/utils/taro/env-type'
3018

3119
const defaultProps = {
3220
...ComponentDefaults,

src/packages/popup/popup.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export const Popup: FunctionComponent<
190190
}
191191

192192
const renderTop = () => {
193-
if (!top) return null
193+
if (!top || position !== 'bottom') return null
194194
return (
195195
<div className={`${classPrefix}-bottom-top`} ref={topNodeRef}>
196196
{top}

src/packages/textarea/textarea.taro.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export const TextArea = forwardRef((props: Partial<TaroTextAreaProps>, ref) => {
139139
placeholder={
140140
placeholder !== undefined ? placeholder : locale.placeholder
141141
}
142+
showCount={showCount}
142143
/>
143144
{showCount && (
144145
<View

src/utils/taro/env-type.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export const ENV_TYPE = {
2+
WEAPP: 'WEAPP',
3+
SWAN: 'SWAN',
4+
ALIPAY: 'ALIPAY',
5+
TT: 'TT',
6+
QQ: 'QQ',
7+
JD: 'JD',
8+
WEB: 'WEB',
9+
RN: 'RN',
10+
HARMONY: 'HARMONY',
11+
QUICKAPP: 'QUICKAPP',
12+
}

src/utils/taro/get-rect-by-id.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
import Taro, { createSelectorQuery } from '@tarojs/taro'
2-
3-
const ENV_TYPE = {
4-
WEAPP: 'WEAPP',
5-
SWAN: 'SWAN',
6-
ALIPAY: 'ALIPAY',
7-
TT: 'TT',
8-
QQ: 'QQ',
9-
JD: 'JD',
10-
WEB: 'WEB',
11-
RN: 'RN',
12-
HARMONY: 'HARMONY',
13-
QUICKAPP: 'QUICKAPP',
14-
}
2+
import { ENV_TYPE } from './env-type'
153

164
export const getRectById = (id: string) => {
175
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)