perf[chore]: add mock.js to instead of easy-mock (#281)

This commit is contained in:
花裤衩
2019-02-20 13:16:24 +08:00
committed by GitHub
parent 01018ee1f9
commit 5d82985a76
7 changed files with 136 additions and 1 deletions

20
mock/table.js Normal file
View File

@@ -0,0 +1,20 @@
import Mock from 'mockjs'
export default {
list: () => {
const items = Mock.mock({
'items|30': [{
id: '@id',
title: '@sentence(10, 20)',
'status|1': ['published', 'draft', 'deleted'],
author: 'name',
display_time: '@datetime',
pageviews: '@integer(300, 5000)'
}]
})
return {
code: 20000,
data: items
}
}
}