Skip to content

Commit

Permalink
版本管理
Browse files Browse the repository at this point in the history
  • Loading branch information
xrkffgg committed May 23, 2019
1 parent 3285a5b commit d93c731
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 35 deletions.
4 changes: 2 additions & 2 deletions src/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
</template>

<script>
import mixinDateModule from '../mixins/date-module.js'
import mixinDate from '../mixins/date.js'
import mixinCommon from '../mixins/common'
import store from '../store'
export default {
mixins: [mixinDateModule,mixinCommon],
mixins: [mixinDate,mixinCommon],
name : 'headercom',
components: {
Expand Down
8 changes: 8 additions & 0 deletions src/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
border
height="550"
style="min-width:100%"
cell-class-name="cellname"
:data="$store.state.hisData">
<el-table-column type="expand">
<template slot-scope="s">
Expand Down Expand Up @@ -300,6 +301,13 @@
}
}
.cellname {
font-family: 'Roboto-Thin';
font-weight: bolder;
color: #000;
font-size: 15px;
}
</style>

<style scoped lang="scss">
Expand Down
20 changes: 20 additions & 0 deletions src/mixins/array.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
export default {
data() {
return {

}
},

methods: {
// arr 传入数组 key 判断字段
delArrHasObjSome(arr,key){
let obj = {}
let result = []
result = arr.reduce((item,next) =>{
obj[next[key]] ? '':obj[next[key]] = true && item.push(next)
return item
}, [])
return result
}
},
}
14 changes: 5 additions & 9 deletions src/mixins/common.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as array from './array'
export default {
data() {
return {
Expand Down Expand Up @@ -34,17 +35,17 @@ export default {
let i,t,o
switch (type){
case 'new':
i = '新增'
i = '新 增'
t = ''
o = 'el-icon-plus'
break;
case 'fix':
i = '修复'
i = '修 复'
t = 'success'
o = 'el-icon-check'
break;
case 'opt':
i = '优化'
i = '优 化'
t = 'warning'
o = 'el-icon-finished'
break;
Expand All @@ -62,12 +63,7 @@ export default {
let o = this.getHisIcon(it.type)
arr.push(o)
})
let h = {}
let i = arr.reduce((x,y) =>{
h[y.name]? '':arr[]
})
console.log(set)
return set
return array.default.methods.delArrHasObjSome(arr,'o')
},
},
}
File renamed without changes.
11 changes: 11 additions & 0 deletions src/mixins/temp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export default {
data() {
return {

}
},

methods: {

},
}
28 changes: 4 additions & 24 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,16 @@ export default new Vuex.Store({
hisData : [
{
time : '2019-05-23',
version : 'v0.8',
version : 'v0.1',
con : [
{
type : 'fix',
text : '修复ss'
},
{
type : 'fix',
text : '修复ss2'
},
{
type : 'new',
text : 'newss'
text : `Kvue项目初版主页完成,
包含有head、sider、main。
side联动、若干特效。Home图标、版本记录、3dcube。`
},
],
},
// {
// time : '2019-05-21',
// version : 'v0.7',
// con : [
// {
// type : 'opt',
// text : '优化ss'
// },
// {
// type : 'new',
// text : 'newss'
// },
// ],
// },
]
},
mutations: {
Expand Down

0 comments on commit d93c731

Please sign in to comment.