Browse Source

Merge branches 'gin-vue-admin-develop' and 'master' of https://github.com/piexlmax/QMPlus

 Conflicts:
	QMPlusVuePage/package.json
	QMPlusVuePage/src/view/superAdmin/api/api.vue
main
pixel 5 years ago
parent
commit
96c9e44e64
  1. 32
      QMPlusVuePage/src/view/superAdmin/api/api.vue

32
QMPlusVuePage/src/view/superAdmin/api/api.vue

@ -21,7 +21,15 @@
<el-table-column label="请求" min-width="150" prop="method"> <el-table-column label="请求" min-width="150" prop="method">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
{{scope.row.method|methodFiletr}}
{{scope.row.method}}
<el-tag
:key="scope.row.methodFiletr"
:type="scope.row.method|tagTypeFiletr"
size="mini"
effect="dark">
{{scope.row.method|methodFiletr}}
</el-tag>
<!-- {{scope.row.method|methodFiletr}} -->
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -93,19 +101,23 @@ import infoList from '@/components/mixins/infoList'
const methodOptions = [ const methodOptions = [
{ {
value: 'POST', value: 'POST',
label: '创建'
label: '创建',
type:'success'
}, },
{ {
value: 'GET', value: 'GET',
label: '查看'
label: '查看',
type:''
}, },
{ {
value: 'PUT', value: 'PUT',
label: '更新'
label: '更新',
type:'warning'
}, },
{ {
value: 'DELETE', value: 'DELETE',
label: '删除'
label: '删除',
type:'danger'
} }
] ]
@ -223,7 +235,12 @@ export default {
filters:{ filters:{
methodFiletr(value){ methodFiletr(value){
const target = methodOptions.filter(item=>item.value === value)[0] const target = methodOptions.filter(item=>item.value === value)[0]
return target && `${target.label}(${target.value})`
// return target && `${target.label}(${target.value})`
return target && `${target.label}`
},
tagTypeFiletr(value){
const target = methodOptions.filter(item=>item.value === value)[0]
return target && `${target.type}`
} }
} }
} }
@ -235,6 +252,9 @@ export default {
float: right; float: right;
} }
} }
.el-tag--mini{
margin-left: 5px;
}
.warning { .warning {
color: #DC143C; color: #DC143C;
} }
Loading…
Cancel
Save