File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed
Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,8 @@ export namespace Container {
302302 name : string ;
303303 path : string ;
304304 content : string ;
305+ env : Array < string > ;
306+ createdBy : string ;
305307 }
306308
307309 export interface TemplateCreate {
Original file line number Diff line number Diff line change @@ -73,21 +73,19 @@ const onSubmitEdit = async () => {
7373 name: name .value ,
7474 path: path .value ,
7575 content: content .value ,
76- env: environmentStr .value ,
7776 createdBy: createdBy .value ,
77+ env: environmentStr .value ?.split (' \n ' ) || [],
7878 };
79- if (environmentStr .value != undefined ) {
80- param .env = environmentStr .value .split (' \n ' );
81- emit (' search' );
82- }
8379 loading .value = true ;
8480 await composeUpdate (param )
8581 .then (() => {
86- loading .value = false ;
8782 MsgSuccess (i18n .global .t (' commons.msg.operationSuccess' ));
8883 composeVisible .value = false ;
84+ if (environmentStr .value ) {
85+ emit (' search' );
86+ }
8987 })
90- .catch (() => {
88+ .finally (() => {
9189 loading .value = false ;
9290 });
9391};
Original file line number Diff line number Diff line change 8585 </template >
8686 </LayoutContent >
8787
88- <EditDialog ref =" dialogEditRef" />
88+ <EditDialog ref =" dialogEditRef" @search = " search " />
8989 <CreateDialog @search =" search" ref =" dialogRef" />
9090 <DeleteDialog @search =" search" ref =" dialogDelRef" />
9191 </div >
@@ -190,6 +190,8 @@ const onEdit = async (row: Container.ComposeInfo) => {
190190 name: row .name ,
191191 path: row .path ,
192192 content: res .data ,
193+ env: row .env ,
194+ createdBy: row .createdBy ,
193195 };
194196 dialogEditRef .value ! .acceptParams (params );
195197};
You can’t perform that action at this time.
0 commit comments