Skip to content

Commit 5425516

Browse files
committed
fix(Form): 去除最后一项不展示下划线
1 parent 8b89d66 commit 5425516

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

example/examples/src/routes/Form/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ const FormDemo = () => {
165165
return (
166166
<Container>
167167
<Layout>
168-
<Body>
168+
<Body style={{backgroundColor: '#fff'}}>
169169
<Form
170170
form={form}
171171
schema={schema}

packages/core/src/Form/formItems.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,12 @@ const FormItems = ({ schema = [] }: Pick<FormProps, 'schema'>) => {
4646

4747
const _render = () => {
4848
return schema.map((v: FormItemsProps, i: number) => {
49-
const last = schema.length - 1 === i;
5049
if (v.hide) {
5150
return null;
5251
}
5352
return (
5453
<View key={i} style={styles.form_items_container}>
55-
<View style={[styles.form_items, last && styles.border_none]}>
54+
<View style={[styles.form_items]}>
5655
<Label v={v} />
5756
{_renderComponent(v)}
5857
<Tip v={v} />

0 commit comments

Comments
 (0)