DropboxContent.tsx 911 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import React from 'react'
  2. import { DropboxType, IDataParamSource } from './'
  3. import ColorPanel from '../ColorPanel'
  4. import { Icon } from 'antd'
  5. const styles = require('../Workbench.less')
  6. interface IDropboxContentProps {
  7. title: string
  8. type: DropboxType
  9. }
  10. export class DropboxContent extends React.PureComponent<IDropboxContentProps, {}> {
  11. public render () {
  12. const { title, type } = this.props
  13. let typeInPlaceholder
  14. switch (type) {
  15. case 'category':
  16. typeInPlaceholder = '分类型'
  17. break
  18. case 'value':
  19. typeInPlaceholder = '数值型'
  20. break
  21. default:
  22. typeInPlaceholder = '任意'
  23. break
  24. }
  25. return (
  26. <p className={styles.dropboxContent}>
  27. <Icon type="arrow-right" />
  28. <span>
  29. 拖拽<b>{typeInPlaceholder}</b>字段{title}
  30. </span>
  31. </p>
  32. )
  33. }
  34. }
  35. export default DropboxContent