File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/renderer/views/homePage Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,10 @@ export default {
9595 }
9696 })
9797 if (path) {
98- fs .writeFile (` ${ path} ` , details .ruleConfig , () => {
98+ fs .writeFile (` ${ path} ` , JSON .stringify ({
99+ ruleConfig: details .ruleConfig ,
100+ type: app .type
101+ }), () => {
99102 remote .dialog .showMessageBox ({
100103 type: ' info' ,
101104 title: ' 导出结果' ,
@@ -175,10 +178,12 @@ export default {
175178 /* eslint-disable */
176179 fs .readFile (filePath[0 ], ' utf8' , (e , res ) => {
177180 if (e) throw e
181+ const data = JSON .parse (res)
178182 appCollection
179183 .insert ({
180184 appName: filePath[0 ].match (/ ([^ \.\/\\ ] + )\. ([a-z ] + )$ / i )[1 ],
181- ruleConfig: res
185+ ruleConfig: data .ruleConfig ,
186+ type: data .type
182187 })
183188 .write ()
184189 this .getAppList ()
You can’t perform that action at this time.
0 commit comments