express-mongodb-node icon indicating copy to clipboard operation
express-mongodb-node copied to clipboard

新增数据后mongodb内数据都为空

Open doufighting opened this issue 5 years ago • 2 comments

您好,vue初学者,clone了您的工程在本地,开启mongodb ,node app.js 和 npm run dev后,打开浏览器通过登录界面可以进入到list界面,在list界面中,点击添加后,如下图: image 点击确定后,显示新增成功,但是在MongoDB内查询数据发现,插入的数据都为空: image 没有对代码进行任何修改,请问这是什么原因导致的呀,万分感谢!

doufighting avatar Aug 30 '19 08:08 doufighting

你好,出现这种情况,我觉得最好的方法是打断点进行调试。

脚踏实地、仰望天空的小小程序员。

在2019年08月30日 16:21,doufighting[email protected] 写道:

您好,vue初学者,clone了您的工程在本地,开启mongodb ,node app.js 和 npm run dev后,打开浏览器通过登录界面可以进入到list界面,在list界面中,点击添加后,如下图:

点击确定后,显示新增成功,但是在MongoDB内查询数据发现,插入的数据都为空:

没有对代码进行任何修改,请问这是什么原因导致的呀,万分感谢!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

weirui88888 avatar Aug 30 '19 09:08 weirui88888

您好,vue初学者,clone了您的工程在本地,开启mongodb ,node app.js 和 npm run dev后,打开浏览器通过登录界面可以进入到list界面,在list界面中,点击添加后,如下图: image 点击确定后,显示新增成功,但是在MongoDB内查询数据发现,插入的数据都为空: image 没有对代码进行任何修改,请问这是什么原因导致的呀,万分感谢!

你好,今天有时间看了下这个项目,确实存在你说的那个问题,那是因为我在保存后,会把addform dialog给关闭,这样的话就会清空表单里面的数据。你尝试着在List.vue中搜索下closeAdd你就明白了。

weirui88888 avatar Nov 12 '19 07:11 weirui88888