Skip to content

Commit

Permalink
fix: 修复动态路由源服务匹配类型为变量时仍然显示值的问题 (#279)
Browse files Browse the repository at this point in the history
* fix: 修复动态路由源服务匹配类型为变量时仍然显示值的问题

* recover package-lock.json
  • Loading branch information
WTIFS authored May 7, 2024
1 parent c5704fd commit a45741c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import insertCSS from '@src/polaris/common/helpers/insertCSS'
import PageDuck from './PageDuck'
import { Values } from '../operations/CreateDuck'
import { RouteArgumentTextMap, RouteLabelTextMap } from '../types'
import { RouteArgumentTextMap, RouteLabelTextMap, RoutingValueType } from '../types'
import { getLabelTag } from '../operations/Create'

insertCSS(
Expand Down Expand Up @@ -197,12 +197,13 @@ export default purify(function CustomRoutePage(props: DuckCmpProps<PageDuck>) {
},
{
key: 'value',
header: '值',
header: '值/变量',
render: item => {
const { value } = item
const { value, value_value_type } = item
const v = value_value_type === RoutingValueType.PARAMETER ? '变量' : value
return (
<Text reset overflow tooltip={value}>
{value}
<Text reset overflow tooltip={v}>
{v}
</Text>
)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export default class RouteDetailPageDuck extends DetailPage {
type: item.type,
key: item.key,
value_type: item.value.type,
value_value_type: item.value.value_type,
value: item.value.value,
})),
})),
Expand Down

0 comments on commit a45741c

Please sign in to comment.