table.js 399 B

1234567891011121314151617181920
  1. import Mock from 'mockjs'
  2. export default {
  3. list: () => {
  4. const items = Mock.mock({
  5. 'items|30': [{
  6. id: '@id',
  7. title: '@sentence(10, 20)',
  8. 'status|1': ['published', 'draft', 'deleted'],
  9. author: 'name',
  10. display_time: '@datetime',
  11. pageviews: '@integer(300, 5000)'
  12. }]
  13. })
  14. return {
  15. code: 20000,
  16. data: items
  17. }
  18. }
  19. }