File tree Expand file tree Collapse file tree
dolphinscheduler-ui/src/views/security/worker-group-manage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,15 +47,6 @@ export function useModal(
4747 return new Error ( t ( 'security.worker_group.group_name_tips' ) )
4848 }
4949 }
50- } ,
51- addrList : {
52- required : true ,
53- trigger : [ 'input' , 'blur' ] ,
54- validator ( ) {
55- if ( variables . model . addrList . length < 1 ) {
56- return new Error ( t ( 'security.worker_group.worker_addresses_tips' ) )
57- }
58- }
5950 }
6051 }
6152 } )
Original file line number Diff line number Diff line change @@ -78,7 +78,9 @@ const WorkerGroupModal = defineComponent({
7878 } else {
7979 variables . model . id = props . row . id
8080 variables . model . name = props . row . name
81- variables . model . addrList = props . row . addrList . split ( ',' )
81+ variables . model . addrList = props . row . addrList
82+ ? props . row . addrList . split ( ',' )
83+ : [ ]
8284 }
8385 }
8486 )
@@ -88,7 +90,9 @@ const WorkerGroupModal = defineComponent({
8890 ( ) => {
8991 variables . model . id = props . row . id
9092 variables . model . name = props . row . name
91- variables . model . addrList = props . row . addrList . split ( ',' )
93+ variables . model . addrList = props . row . addrList
94+ ? props . row . addrList . split ( ',' )
95+ : [ ]
9296 }
9397 )
9498
@@ -107,7 +111,7 @@ const WorkerGroupModal = defineComponent({
107111 show = { this . showModalRef }
108112 onCancel = { this . cancelModal }
109113 onConfirm = { this . confirmModal }
110- confirmDisabled = { ! this . model . name || this . model . addrList . length < 1 }
114+ confirmDisabled = { ! this . model . name }
111115 confirmClassName = 'btn-submit'
112116 cancelClassName = 'btn-cancel'
113117 confirmLoading = { this . saving }
Original file line number Diff line number Diff line change @@ -55,16 +55,18 @@ export function useTable() {
5555 key : 'addrList' ,
5656 render : ( row : WorkerGroupItem ) =>
5757 h ( NSpace , null , {
58- default : ( ) =>
59- row . addrList
60- . split ( ',' )
61- . map ( ( item : string ) =>
62- h (
63- NTag ,
64- { type : 'success' , size : 'small' } ,
65- { default : ( ) => item }
58+ default : ( ) => {
59+ const addrList = row . addrList ? row . addrList . split ( ',' ) : [ ]
60+ return addrList . length
61+ ? addrList . map ( ( item : string ) =>
62+ h (
63+ NTag ,
64+ { type : 'success' , size : 'small' } ,
65+ { default : ( ) => item }
66+ )
6667 )
67- )
68+ : h ( 'span' , { style : { color : '#999' } } , '-' )
69+ }
6870 } )
6971 } ,
7072 {
You can’t perform that action at this time.
0 commit comments