Skip to content

Commit b214b38

Browse files
authored
fix(input): modify mobile problem (#2671)
1 parent 53b3d56 commit b214b38

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

packages/mobile/components/input/src/renderless/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,9 @@ export const handlePasswordVisible =
391391
}
392392

393393
export const getSuffixVisible =
394-
({ parent, props, state }: Pick<IInputRenderlessParams, 'parent' | 'props' | 'state'>) =>
394+
({ vm, props, state }: Pick<IInputRenderlessParams, 'vm' | 'props' | 'state'>) =>
395395
(): boolean =>
396-
parent.$slots.suffix ||
396+
vm.$slots.suffix ||
397397
props.suffixIcon ||
398398
state.showClear ||
399399
props.showPassword ||

packages/mobile/components/input/src/renderless/vue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ const initApi = ({
202202
handleChange: handleChange(emit),
203203
watchFormSelect: watchFormSelect({ emit, props, state }),
204204
calcIconOffset: calcIconOffset({ CLASS_PREFIX, parent }),
205-
getSuffixVisible: getSuffixVisible({ parent, props, state }),
205+
getSuffixVisible: getSuffixVisible({ vm, props, state }),
206206
calculateNodeStyling: calculateNodeStyling(),
207207
handleCompositionStart: handleCompositionStart(state),
208208
handleCompositionUpdate: handleCompositionUpdate(state),

packages/theme-mobile/src/input/index.less

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,17 @@
2424
.component-css-vars-input();
2525

2626
position: relative;
27-
display: inline-block;
2827

2928
&__inner {
30-
height: var(--ti-mobile-textarea-height);
3129
padding: var(--ti-mobile-textarea-padding-vertical) var(--ti-mobile-textarea-padding-horizontal);
3230
font-size: var(--ti-mobile-textarea-inner-font-size, 16px);
3331
font-family: var(--ti-mobile-input-font-family);
3432
color: var(--ti-mobile-textarea-inner-text-color);
3533
display: block;
36-
resize: none;
34+
resize: vertical;
3735
box-sizing: border-box;
38-
border: none;
36+
border: 1px solid #c2c2c2;
37+
border-radius: 8px;
3938
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
4039
line-height: var(--ti-mobile-input-line-height);
4140

0 commit comments

Comments
 (0)