File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -165,12 +165,9 @@ export default {
165165 return option .label ;
166166 },
167167 sizeDialog () {
168- const dialogs = document .getElementsByClassName (' modal-container' );
169- const width = this .showDiff ? ' 85%' : ' 600px' ;
168+ const modalWidth = this .showDiff ? ' 85%' : ' 600px' ;
170169
171- if (dialogs .length === 1 ) {
172- dialogs[0 ].style .setProperty (' width' , width);
173- }
170+ this .$store .commit (' action-menu/updateModalData' , [{ key: ' modalWidth' , value: modalWidth }]);
174171 },
175172 sanitizeYaml (obj , path = ' ' ) {
176173 const res = {};
Original file line number Diff line number Diff line change @@ -111,6 +111,14 @@ export const mutations = {
111111 state . modalData = data ;
112112 } ,
113113
114+ updateModalData ( state , data ) {
115+ state . modalData = state . modalData || { } ;
116+
117+ data . forEach ( ( { key, value } ) => {
118+ state . modalData [ key ] = value ;
119+ } ) ;
120+ } ,
121+
114122 clearCallbackData ( state ) {
115123 state . performCallbackData = undefined ;
116124 } ,
You can’t perform that action at this time.
0 commit comments