Skip to content

Commit 6f295fa

Browse files
committed
[Feature][Engine UI] format string
1 parent 0fb5d9b commit 6f295fa

File tree

1 file changed

+8
-1
lines changed
  • seatunnel-engine/seatunnel-engine-ui/src/components/configuration

1 file changed

+8
-1
lines changed

seatunnel-engine/seatunnel-engine-ui/src/components/configuration/index.tsx

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,18 @@ export default defineComponent({
99
}
1010
},
1111
setup(props) {
12+
const format = (value: any) => {
13+
value = JSON.stringify(value)
14+
if (value) {
15+
value = value.replace(/^\"(.*)\"$/, '$1')
16+
}
17+
return value || ''
18+
}
1219
return () => (
1320
<NDescriptions label-placement="left" bordered column={1}>
1421
{props.data &&
1522
Object.entries(props.data).map(([key, value]) => (
16-
<NDescriptionsItem label={key}>{JSON.stringify(value)}</NDescriptionsItem>
23+
<NDescriptionsItem label={key}>{format(value)}</NDescriptionsItem>
1724
))}
1825
</NDescriptions>
1926
)

0 commit comments

Comments
 (0)