This is an automated email from the ASF dual-hosted git repository.
caishunfeng pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new f4a8502 Fixed error reporting for component JsonHighlight (#8061)
f4a8502 is described below
commit f4a8502d436ef7c6beff3b5290d7daf93a092318
Author: labbomb <[email protected]>
AuthorDate: Sat Jan 15 21:05:01 2022 +0800
Fixed error reporting for component JsonHighlight (#8061)
---
.../src/views/datasource/datasource-list/json-highlight.tsx | 10 +++++-----
.../src/views/datasource/datasource-list/use-columns.ts | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git
a/dolphinscheduler-ui-next/src/views/datasource/datasource-list/json-highlight.tsx
b/dolphinscheduler-ui-next/src/views/datasource/datasource-list/json-highlight.tsx
index 474e3ca..0dbf5fc 100644
---
a/dolphinscheduler-ui-next/src/views/datasource/datasource-list/json-highlight.tsx
+++
b/dolphinscheduler-ui-next/src/views/datasource/datasource-list/json-highlight.tsx
@@ -21,18 +21,18 @@ import { isBoolean, isNumber, isPlainObject } from 'lodash'
import styles from './json-highlight.module.scss'
const props = {
- json: {
- type: String as PropType<string>,
- default: ''
+ rowData: {
+ type: Object as PropType<object>,
+ default: {}
}
}
const JsonHighlight = defineComponent({
name: 'JsonHighlight',
props,
- render() {
+ render(props: { rowData: { connectionParams: string } }) {
return (
- <pre class={styles['json-highlight']}>{syntaxHighlight(this.json)}</pre>
+ <pre
class={styles['json-highlight']}>{syntaxHighlight(props.rowData.connectionParams)}</pre>
)
}
})
diff --git
a/dolphinscheduler-ui-next/src/views/datasource/datasource-list/use-columns.ts
b/dolphinscheduler-ui-next/src/views/datasource/datasource-list/use-columns.ts
index 57ec39c..a78c038 100644
---
a/dolphinscheduler-ui-next/src/views/datasource/datasource-list/use-columns.ts
+++
b/dolphinscheduler-ui-next/src/views/datasource/datasource-list/use-columns.ts
@@ -64,7 +64,7 @@ export function useColumns(onCallback: Function) {
}
),
default: () =>
- h(JsonHighlight, { json: rowData.connectionParams }, null)
+ h(JsonHighlight, { rowData })
}
)
}