no message

Former-commit-id: 87f59633817f272a4d17bb2fec51bd0f909444fc
Former-commit-id: 6557f7815ec3984b06bd7ed80d59cb508869dff4
Former-commit-id: ecd31613c185c8192c90be07034f04e8cfb96397
This commit is contained in:
李杨
2018-03-30 08:01:14 +08:00
parent 99318d60b4
commit ee0172e70d

View File

@@ -33,6 +33,7 @@
<script> <script>
// import sleep from '@/utils/sleep.js' // import sleep from '@/utils/sleep.js'
import Mock from 'mockjs' import Mock from 'mockjs'
import _clonedeep from 'lodash.clonedeep'
export default { export default {
data () { data () {
return { return {
@@ -54,9 +55,12 @@ export default {
methods: { methods: {
// 请求数据 // 请求数据
async getData () { async getData () {
const dataOriginal = this.dataFilter(await this.dataMaker()) // 拿到数据
this.dataOriginal = dataOriginal const data = this.dataFilter(await this.dataMaker())
this.table.data = dataOriginal // 保存备份
this.dataOriginal = _clonedeep(data)
// 将值赋给表格
this.table.data = _clonedeep(data)
}, },
// 过滤数据部分 模拟过滤掉 star 字段 并且添加 __edit 字段 // 过滤数据部分 模拟过滤掉 star 字段 并且添加 __edit 字段
dataFilter (val) { dataFilter (val) {