File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
src/pages/components/ScriptStorage Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,15 @@ const ScriptStorage: React.FC<{
108
108
case "string" :
109
109
return col ;
110
110
default :
111
- return JSON . stringify ( col ) ;
111
+ return (
112
+ < span
113
+ style = { {
114
+ whiteSpace : "break-spaces" ,
115
+ } }
116
+ >
117
+ { JSON . stringify ( col , null , 2 ) }
118
+ </ span >
119
+ ) ;
112
120
}
113
121
} ,
114
122
} ,
@@ -211,6 +219,7 @@ const ScriptStorage: React.FC<{
211
219
key : value . key ,
212
220
value : value . value ,
213
221
createtime : Date . now ( ) ,
222
+ updatetime : 0 ,
214
223
} ,
215
224
...data ,
216
225
] ) ;
@@ -228,15 +237,18 @@ const ScriptStorage: React.FC<{
228
237
value :
229
238
typeof currentValue ?. value === "string"
230
239
? currentValue ?. value
231
- : JSON . stringify ( currentValue ?. value ) ,
240
+ : JSON . stringify ( currentValue ?. value , null , 2 ) ,
232
241
type : valueType ( currentValue ?. value || "string" ) ,
233
242
} }
234
243
>
235
244
< FormItem label = "Key" field = "key" rules = { [ { required : true } ] } >
236
245
< Input placeholder = "key" disabled = { ! ! currentValue } />
237
246
</ FormItem >
238
247
< FormItem label = "Value" field = "value" rules = { [ { required : true } ] } >
239
- < Input placeholder = "当类型为object时,请输入可以JSON解析的数据" />
248
+ < Input . TextArea
249
+ rows = { 6 }
250
+ placeholder = "当类型为object时,请输入可以JSON解析的数据"
251
+ />
240
252
</ FormItem >
241
253
< FormItem label = "类型" field = "type" rules = { [ { required : true } ] } >
242
254
< Select >
You can’t perform that action at this time.
0 commit comments