mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-29 21:28:52 +00:00
perf: 优化名称显示
This commit is contained in:
@@ -43,7 +43,6 @@ export function getResourceNameByPath(path) {
|
||||
|
||||
export function getResourceFromApiUrl(apiUrl) {
|
||||
const re = new RegExp('/api/v1/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/.*')
|
||||
console.log('Api url: ', apiUrl)
|
||||
const matched = apiUrl.match(re)
|
||||
if (!matched) {
|
||||
return { path: '', app: '', resource: '' }
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<span>{{ scope.row.value }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-for="header in receiveBackends" :key="header.id" :label="header.name_display" width="120">
|
||||
<el-table-column v-for="header in receiveBackends" :key="header.id" :label="getNameDisplay(header)" width="80">
|
||||
<template v-slot="scope">
|
||||
<span v-if="!scope.row.children">
|
||||
<el-checkbox
|
||||
@@ -105,6 +105,13 @@ export default {
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
getNameDisplay(header) {
|
||||
const displayName = header['name_display']
|
||||
if (displayName === 'Site message') {
|
||||
return 'Inbox'
|
||||
}
|
||||
return displayName
|
||||
},
|
||||
onOpenDialog(sub) {
|
||||
this.currentEditSub = sub
|
||||
this.dialogSelectedUsers = sub.receivers
|
||||
|
||||
Reference in New Issue
Block a user