Fixed: Risk Asset And Node Detail

This commit is contained in:
zhaojisen 2025-03-13 15:04:38 +08:00 committed by ZhaoJiSen
parent 367320eef9
commit aaad6b8380
3 changed files with 19 additions and 17 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<DetailFormatter :col="col" :row="row"> <DetailFormatter :col="col" :row="row" :prevant-click="formatterArgs.prevantClick">
<template> <template>
<el-popover <el-popover
:disabled="!showItems" :disabled="!showItems"
@ -42,7 +42,8 @@ export default {
}, },
async: false, async: false,
ajax: {}, ajax: {},
title: '' title: '',
prevantClick: false
} }
} }
} }

View File

@ -55,6 +55,10 @@ export default {
} }
} }
} }
},
prevantClick: {
type: Boolean,
default: false
} }
}, },
data() { data() {
@ -172,14 +176,19 @@ export default {
if (this.formatterArgs.beforeClick) { if (this.formatterArgs.beforeClick) {
this.formatterArgs.beforeClick(this.callbackArgs) this.formatterArgs.beforeClick(this.callbackArgs)
} }
if (this.formatterArgs.onClick) { if (this.formatterArgs.onClick) {
this.formatterArgs.onClick(this.callbackArgs) return this.formatterArgs.onClick(this.callbackArgs)
return
} }
if (this.formatterArgs.drawer) { if (this.formatterArgs.drawer) {
this.showDrawer() return this.showDrawer()
}
if (this.prevantClick) {
return return
} }
this.goDetail() this.goDetail()
}, },
getDetailRoute() { getDetailRoute() {

View File

@ -43,24 +43,16 @@ export default {
formatter: AmountFormatter, formatter: AmountFormatter,
formatterArgs: { formatterArgs: {
async: false, async: false,
drawer: true, drawer: false,
getTitle: ({ row }) => row.assets[0].name, prevantClick: true
getRoute: ({ row }) => ({
name: 'AssetDetail',
params: { id: row.assets[0].id }
})
} }
}, },
nodes: { nodes: {
formatter: AmountFormatter, formatter: AmountFormatter,
formatterArgs: { formatterArgs: {
async: false, async: false,
drawer: true, drawer: false,
getRoute: ({ row }) => ({ prevantClick: true
name: 'AssetDetail',
query: { tab: 'Basic' },
params: { id: row.assets[0].id }
})
} }
}, },
secret_strategy: { secret_strategy: {