Skip to content

Commit d20c614

Browse files
committed
fix(Form): 调整组件样式
1 parent d82a2b2 commit d20c614

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

packages/core/src/Form/formList.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ const FormList = ({
9191

9292
const _render = (index: number) => {
9393
return items.map((v: Omit<FormItemsProps, 'validate' | 'required'>, i: number) => {
94-
const last = items.length - 1 === i;
9594
if (v.hide) {
9695
return null;
9796
}
@@ -100,7 +99,7 @@ const FormList = ({
10099
}
101100
return (
102101
<View key={i} style={styles.form_items_container}>
103-
<View style={[styles.form_items, last && styles.border_none]}>
102+
<View style={[styles.form_items]}>
104103
<Label v={v} />
105104
{_renderComponent(v, index)}
106105
<Tip v={v} />

packages/core/src/Form/formchildItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const formchildItem = (props: Partial<FormItemsProps> & { field: string; childre
3535
return (
3636
<Container mode={mode}>
3737
<View style={styles.form_items_container}>
38-
<View style={[styles.form_items, styles.border_none]}>
38+
<View style={[styles.form_items]}>
3939
<Label v={{ name: name, required: required }} />
4040
{_renderComponent(children)}
4141
<Tip v={{ validate: validate, field: field }} />

packages/core/src/Form/styles.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ const styles = StyleSheet.create({
1111
textAlign: 'center',
1212
margin: 10,
1313
borderBottomWidth: 0.5,
14-
borderBottomColor: '#eee',
15-
},
16-
border_none: {
17-
borderBottomWidth: 0,
14+
borderBottomColor: '#ccc',
1815
},
1916
});
2017

0 commit comments

Comments
 (0)