Commit 2de7ef32 authored by huai.li's avatar huai.li

修改

parent 15d6dbcc
......@@ -5,11 +5,15 @@ import {
export default {
data () {
return {
createdByArray: []
retNewArray: []
}
},
computed: {
createdByArray () {
let ret = this.retNewArray.find(item => item.key === this.selectKeyFormat('created_by'))
return ret && [].concat(ret.value)
}
},
methods: {
......@@ -27,10 +31,7 @@ export default {
getNewArray () {
requestWithJsonAPI(api.getSaveNew)
.then((res) => {
return res.options
}).then((opt) => {
let ret = opt.find(item => item.key === this.selectKeyFormat('created_by'))
this.createdByArray = ret && [].concat(ret.value)
this.retNewArray = res.options
})
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment