提交 bf3845b6 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 c59e2f5f
{ {
"name": "@ezijing/vue-form", "name": "@ezijing/vue-form",
"version": "2.0.7", "version": "2.0.8",
"private": false, "private": false,
"description": "基于Vue Element-UI的表单", "description": "基于Vue Element-UI的表单",
"scripts": { "scripts": {
......
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
headers headers
}) })
.then(res => { .then(res => {
this.detail = res this.detail = JSON.parse(JSON.stringify(Object.assign({}, res)))
// 默认数据设置 // 默认数据设置
if (this.form.hasAdd && Array.isArray(res) && !res.length) { if (this.form.hasAdd && Array.isArray(res) && !res.length) {
res.push(Object.assign({}, this.form.defaultModel)) res.push(Object.assign({}, this.form.defaultModel))
...@@ -151,6 +151,7 @@ export default { ...@@ -151,6 +151,7 @@ export default {
res = callback.call(this, res) res = callback.call(this, res)
} }
this.model = res this.model = res
console.log(this.model)
}) })
.catch(error => { .catch(error => {
if (errorCallback) { if (errorCallback) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论