Skip to content

Commit f4a6efd

Browse files
authored
Merge branch 'zhangchunlin:master' into master
2 parents 387fa4f + c55212a commit f4a6efd

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

uliweb_apijson/apijson/templates/vue/inc_apijson_table.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@
196196
if (data.code==200) {
197197
var arr = data["[]"]
198198
for (var i=0;i<arr.length;i++) {
199-
arr[i] = arr[i][thisp.table.model_name]
199+
var o = JSON.parse(JSON.stringify(arr[i][thisp.table.model_name]))
200+
o._fields = JSON.parse(JSON.stringify(arr[i]))
201+
arr[i] = o
200202
}
201203

202204
if (!thisp.tcolumns_init) {

uliweb_apijson/apijson/templates/vue/inc_apijson_viewedit.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
"table",
66
"id",
77
"hook_init",
8-
"hook_ajax_params"
8+
"hook_ajax_params",
9+
"hook_ajax_post_result"
10+
911
],
1012
template: `<div>
1113
<Spin size="large" fix v-if="loading"></Spin>
@@ -111,12 +113,19 @@
111113
title: 'success update #'+thisp.row.id+' in table '+thisp.table.model_name,
112114
desc: data.msg
113115
})
116+
if(thisp.hook_ajax_post_result){
117+
thisp.hook_ajax_post_result(true, params, thisp.row_saved)
118+
}
114119
}
115120
else {
116121
thisp.$Notice.error({
117122
title: 'error when update #'+thisp.row.id+' in table '+thisp.table.model_name,
118123
desc: data.msg
119124
})
125+
if(thisp.hook_ajax_post_result){
126+
thisp.hook_ajax_post_result(false, params, thisp.row_saved)
127+
}
128+
120129
}
121130
}
122131
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy