Ben Lin
2024-06-18 ebbd788fbb2c0b45d4473798efc57eec8ba74a25
src/views/demo/page/form/basic/data.ts
@@ -1,4 +1,4 @@
import { FormSchema } from '/@/components/Form';
import { FormSchema } from '@/components/Form';
const colProps = {
  span: 8,
@@ -40,8 +40,8 @@
    colProps,
    subLabel: '( 选填 )',
    componentProps: {
      formatter: (value: string) => (value ? `${value}%` : ''),
      parser: (value: string) => value.replace('%', ''),
      formatter: (value: string | number) => (value ? `${value}%` : ''),
      parser: (value: string) => Number(value.replace('%', '')),
      placeholder: '请输入',
    },
  },