Skip to content

Commit a66de9f

Browse files
committed
can now upload images
1 parent d41b1aa commit a66de9f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/store/mutations.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,9 @@ const mutations = {
416416
*/
417417
[types.IMPORT_IMAGE]: (state, payload) => {
418418
console.log(`import image invoked. image: ${payload.img} ${payload.route}`)
419-
state.imagePath = { ...state.imagePath, [payload.route]: payload.img }
419+
420+
console.log(payload.img.replace(/\\/g,"/"))
421+
state.imagePath = { ...state.imagePath, [payload.route]: payload.img.replace(/\\/g,"/") }
420422
// state.imagePath[payload.route] = payload.img
421423
},
422424
[types.CLEAR_IMAGE]: (state, payload) => {

0 commit comments

Comments
 (0)