InteractList.jsx 956 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { View } from "@tarojs/components";
  2. import React, { Component } from "react";
  3. import { AtFloatLayout, AtTimeline } from "taro-ui";
  4. import 'taro-ui/dist/style/components/float-layout.scss';
  5. import 'taro-ui/dist/style/components/button.scss';
  6. import './index.less';
  7. class InteractList extends Component {
  8. constructor(props) {
  9. super(props);
  10. this.state = {
  11. }
  12. this.handleClose = this.handleClose.bind(this);
  13. }
  14. handleClose() {
  15. this.props.onClose();
  16. }
  17. render() {
  18. const hisItems = this.props.list.map(record => {
  19. return { title: record.createTime, content: [record[this.props.type] || '空'] }
  20. })
  21. return (
  22. <AtFloatLayout isOpened={this.props.isOpened} title={this.props.title} scrollY onClose={this.handleClose}>
  23. <AtTimeline
  24. pending
  25. items={hisItems}
  26. >
  27. </AtTimeline>
  28. </AtFloatLayout>
  29. )
  30. }
  31. }
  32. export default InteractList;