index.jsx 838 B

1234567891011121314151617181920212223242526272829
  1. import {View, Text, Textarea} from '@tarojs/components';
  2. import {Switch} from '@antmjs/vantui';
  3. import classNames from 'classnames';
  4. export default function Exception({checked, onChange, note, onNoteChange}) {
  5. return (
  6. <>
  7. <View className='flex items-center'>
  8. <Switch
  9. activeColor='#58C6EA'
  10. checked={checked}
  11. onChange={e => onChange(e.detail)}
  12. size='20px'
  13. />
  14. <Text className='text-sm text-[#999] ml-2'>异常订单</Text>
  15. </View>
  16. <Textarea
  17. value={note}
  18. onInput={e => onNoteChange(e.detail.value)}
  19. className={classNames(
  20. 'border border-solid border-gray-200 rounded-md mt-3 w-[calc(100%-32px)] p-4 text-sm',
  21. {hidden: !checked},
  22. )}
  23. placeholder='请输入异常原因'
  24. />
  25. </>
  26. );
  27. }