File tree 4 files changed +17
-2
lines changed
4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ var form = new seeditForm({
94
94
+ onSuccess: ` function ` 提交资料失败回调
95
95
+ onClose: ` function ` 返回按钮的回调事件
96
96
+ onSubmit: ` function ` 提交按钮的回调事件
97
+ + editJson: ` function ` 外部修改提交的json
97
98
98
99
## 初始化参数的` list ` 下的` name ` 值介绍
99
100
+ ` realname ` 真实姓名
Original file line number Diff line number Diff line change @@ -67,6 +67,9 @@ form = new seeditForm({
67
67
},
68
68
onSuccess : function (data ){
69
69
70
+ },
71
+ editJson : function (json ){
72
+ json .add = " 222" ;
70
73
}
71
74
});
72
75
document .querySelector (' #btn' ).addEventListener (' click' , function (){
@@ -133,6 +136,9 @@ form = new seeditForm({
133
136
},
134
137
formatValue : function (json ){
135
138
console .log (json);return json;
139
+ },
140
+ editJson : function (json ){
141
+ json .add = " 222" ;
136
142
}
137
143
});
138
144
document .querySelector (' #btn' ).addEventListener (' click' , function (){
Original file line number Diff line number Diff line change @@ -121,6 +121,10 @@ seeditForm.prototype.format = function(options){
121
121
this . btn . close = options . onClose || function ( ) {
122
122
_this . close ( ) ;
123
123
} ;
124
+ //外部修改提交数据
125
+ this . editJson = options . editJson || function ( ) {
126
+
127
+ }
124
128
// 程序异常回调
125
129
this . onEventError = options . onEventError || function ( ) {
126
130
@@ -556,6 +560,8 @@ seeditForm.prototype.submit = function(num){
556
560
} else json [ this . params . list [ i ] . name ] = document . querySelector ( '#' + this . params . id + ' input[name="' + this . params . list [ i ] . name + '"]' ) . value ;
557
561
}
558
562
}
563
+ // 外部修改json
564
+ this . editJson ( json ) ;
559
565
// 格式化数据
560
566
json = this . params . formatValue ( json ) ;
561
567
if ( ! ! this . params . unionid ) json . unionid = this . params . unionid ;
Original file line number Diff line number Diff line change 63
63
}
64
64
.personal-info-list {
65
65
background : # fff ;
66
- border -top: 1 px solid # D4D4D4 ;
66
+ margin -top: 0.625 em ;
67
67
}
68
68
.personal-info-list li {
69
69
padding : 0 5% ;
72
72
border-bottom : 1px solid # D4D4D4 ;
73
73
font-size : 1em ;
74
74
}
75
+ .personal-info-list li : first-child {
76
+ border-top : 1px solid # D4D4D4 ;
77
+ }
75
78
.personal-info-list li span {
76
79
float : left;
77
80
width : 4.625em ;
@@ -165,7 +168,6 @@ span{
165
168
}
166
169
.user-info {
167
170
background : # fff ;
168
- margin-bottom : 0.625em ;
169
171
padding : 0.2em 5% ;
170
172
font-size : 1em ;
171
173
line-height : 2em ;
You can’t perform that action at this time.
0 commit comments