123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import React, { Component } from 'react';
- import './index.less';
- import Page from '@src/containers/Page';
- import Assets from '@src/components/Assets';
- import Tag from '../../../components/Tag';
- class Item extends Component {
- constructor(props) {
- super(props);
- this.state = { show: false };
- }
- render() {
- const { show } = this.state;
- return (
- <div className="item">
- <div className="title">
- OG19 语法千行<span className="date">2019-08-11</span>
- </div>
- <div className="tip">
- <Tag className="new" size="small">
- NEW
- </Tag>
- 变更点:版本2
- </div>
- <div hidden={!show} className="desc">
- 删除“the number of wolf population 意思重复”删除“the number of wolf population 意思重复”删除“the number of
- wolf population 意思重复”
- </div>
- <Assets
- className="drop"
- name={!show ? 'drop_down1' : 'drop_up1'}
- onClick={() => this.setState({ show: !show })}
- />
- </div>
- );
- }
- }
- export default class extends Page {
- init() {}
- renderView() {
- const { list = [] } = this.state;
- return <div>{list.length > 0 ? this.renderList() : this.renderEmpty()}</div>;
- }
- renderList() {
- return (
- <div className="list">
- <Item />
- <Item />
- </div>
- );
- }
- renderEmpty() {
- return <div className="empty">还未购买或订阅资料</div>;
- }
- }
|