3lang3 / react-vant

React mobile UI Components base on Vant
https://react-vant.3lang.dev
MIT License
1.31k stars 186 forks source link

🐛 [Bug]: Cell 与 Field 的 children 不显示数字 0 #660

Closed tanukihee closed 1 year ago

tanukihee commented 1 year ago

Which React Vant packages are impacted?

What version of React Vant are you using?

3.3.1

Reproduce live demo(codesandebox or stackblitz)?

https://codesandbox.io/s/cell-field-number-0-test-2sc4vk?file=/src/App.tsx

Descripition

Cell 组件与 Field 组件的 children 不显示数字 0

import { Cell, Field } from "react-vant";

export default function App() {
  return (
    <div className="App">
      <Cell title="title" value={0} />
      <Cell title="title">{0}</Cell>
      <Cell title="title" children={"0"} />
      <Field label="field">{0}</Field>
      <Field label="field">{"0"}</Field>
    </div>
  );
}

效果图 image