import React, { useState } from 'react' import { View, Text } from '@tarojs/components' import { Checkbox } from '@nutui/nutui-react-taro' import styles from './index.module.scss' interface FormSwitchProps { value: boolean onChange: (checked: boolean) => void subTitle: string wechatId?: string } const FormSwitch: React.FC = ({ value, onChange, subTitle, wechatId }) => { return ( <> {subTitle} { wechatId && ( 微信号: {wechatId.replace(/(\d{3})(\d{4})(\d{4})/, '$1 $2 $3')} 修改 ) } ) } export default FormSwitch