File tree Expand file tree Collapse file tree 1 file changed +19
-15
lines changed
uliweb_apijson/apijson/templates/vue Expand file tree Collapse file tree 1 file changed +19
-15
lines changed Original file line number Diff line number Diff line change 38
38
"action" : {
39
39
title : 'Action' ,
40
40
width : 140 ,
41
- render : ( h , params ) => {
42
- return h ( 'div' , [
41
+ render : function ( h , params ) {
42
+ var delete_button = h ( 'Button' , {
43
+ props : {
44
+ type : 'error' ,
45
+ size : 'small'
46
+ } ,
47
+ on : {
48
+ click : function ( ) {
49
+ thisp . remove ( params )
50
+ }
51
+ }
52
+ } , 'Delete' )
53
+ var buttons = [
43
54
h ( 'Button' , {
44
55
props : {
45
56
type : 'primary' ,
53
64
thisp . show ( params )
54
65
}
55
66
}
56
- } , this . viewedit_label ) ,
57
- h ( 'Button' , {
58
- props : {
59
- type : 'error' ,
60
- size : 'small'
61
- } ,
62
- on : {
63
- click : function ( ) {
64
- thisp . remove ( params )
65
- }
66
- }
67
- } , 'Delete' )
68
- ] ) ;
67
+ } , thisp . viewedit_label )
68
+ ]
69
+ if ( thisp . config_editable ) {
70
+ buttons . push ( delete_button )
71
+ }
72
+ return h ( 'div' , buttons ) ;
69
73
}
70
74
}
71
75
} ,
You can’t perform that action at this time.
0 commit comments