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

Commitb4e35fc

Browse files
authored
Merge pull request#37 from zhangchunlin/master
apijson-table: add hook_add, for customizing the add action in apijso…
2 parents4c0d60f +2bcdb73 commitb4e35fc

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎uliweb_apijson/apijson/templates/vue/inc_apijson_table.html

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
"request_tag",//apijson request tag, default will be same with model name
77
"config",
88
"custom_tcolumns_render_generator",
9-
"hook_init",
10-
"hook_ajax_params"
9+
"hook_init",//hook_init(vm), will invoke in mounted()
10+
"hook_ajax_params",//hook_ajax_params(method,action,params), will invoke before ajax action
11+
"hook_add"//hook_add(vm), customize the add action
1112
],
1213
template:`<div>
1314
<div v-if="config_editable && config_add_fields!=null"><i-button type="primary" @click="add">Add</i-button> <br><br> </div>
@@ -415,7 +416,12 @@
415416
d.value=null
416417
d.component=d.component||"input"
417418
}
418-
this.modal_add=true
419+
if(this.hook_add!=null){
420+
this.hook_add(this)
421+
}
422+
else{
423+
this.modal_add=true
424+
}
419425
},
420426
real_add:function(){
421427
thisp=this

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp