Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit10961f8

Browse files
committed
tables: remove __id field, look like vuejs add this
1 parent4cace10 commit10961f8

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

‎uliweb_apijson/tables/templates/Tables/inc/table_config.html

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h3>table parameter</h3>
2525
</pre>
2626
<h3>example backend code</h3>
2727
<pre>
28-
table = functions.get_apijson_table("{table.model_name}", role="{table.role}", tableui_name="{table.tableui_name}")
28+
table = functions.get_apijson_table("{table.model_name}", role="{table.role}",request_tag="{table.request_tag}",tableui_name="{table.tableui_name}")
2929
</pre>
3030
<h3>example frontend code</h3>
3131
<pre>
@@ -57,16 +57,14 @@ <h3>settings.APIJSON_REQUESTS.{table.request_tag||table.model_name}</h3>
5757
return{
5858
current_menu_item:"table_param",
5959
table_param:{},
60-
tableui:{}
60+
tableui:{},
61+
tableui_json:""
6162
}
6263
},
6364
computed:{
6465
table_json:function(){
6566
returnJSON.stringify(this.table_param,null,2)
6667
},
67-
tableui_json:function(){
68-
returnJSON.stringify(this.tableui,null,2)
69-
},
7068
model_json:function(){
7169
returnJSON.stringify(this.model,null,2)
7270
},
@@ -82,7 +80,15 @@ <h3>settings.APIJSON_REQUESTS.{table.request_tag||table.model_name}</h3>
8280
mounted:function(){
8381
this.table_param=JSON.parse(JSON.stringify(this.table))
8482
deletethis.table_param.tableui
85-
this.tableui=this.table.tableui
83+
//remove __id field, look like vuejs add this
84+
vartableui=JSON.parse(JSON.stringify(this.table.tableui))
85+
if(tableui.table_fields!=null){
86+
for(letindex=0;index<tableui.table_fields.length;index++){
87+
if(tableui.table_fields[index].__id!=null)
88+
deletetableui.table_fields[index].__id
89+
}
90+
this.tableui_json=JSON.stringify(tableui,null,2)
91+
}
8692
}
8793
})
8894
</script>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp