index.js 494 B

123456789101112131415161718192021222324252627282930
  1. import { connect } from 'herculex';
  2. Component(connect({
  3. mapStateToProps: {
  4. userInfo: state => state.$global.userInfo || {}
  5. }
  6. })({
  7. props: {
  8. onClick: () => null,
  9. title: '信息',
  10. isEmpty: true,
  11. addressItem: null,
  12. emptyText: '暂无信息',
  13. isDeliver: false,
  14. showIcon: true
  15. },
  16. data: {},
  17. didMount() {
  18. console.log(this.props);
  19. },
  20. didUpdate() {},
  21. methods: {
  22. handleClick() {
  23. this.props.onClick && this.props.onClick();
  24. }
  25. }
  26. }));