File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<el-table
3
- :data =" logReverse "
3
+ :data =" logReversed "
4
4
border
5
5
stripe
6
6
style =" width : 100% "
121
121
122
122
<script >
123
123
import { mapState } from ' vuex'
124
- import { get } from ' lodash'
124
+ import { get , cloneDeep } from ' lodash'
125
125
import ExpandItem from ' ./components/ExpandItem'
126
126
export default {
127
127
name: ' d2-error-log-list' ,
@@ -132,14 +132,8 @@ export default {
132
132
... mapState (' d2admin' , {
133
133
logList : state => state .log .list
134
134
}),
135
- logReverse () {
136
- // 直接 reverse 的话有点问题
137
- const res = []
138
- const loglength = this .logList .length
139
- this .logList .forEach ((log , index ) => {
140
- res .push (this .logList [loglength - 1 - index])
141
- })
142
- return res
135
+ logReversed () {
136
+ return cloneDeep (this .logList ).reverse ()
143
137
}
144
138
},
145
139
methods: {
You can’t perform that action at this time.
0 commit comments