@@ -54,7 +54,7 @@ layui.define(['layer', 'form'], function(exports){
|
||||
|
||||
var that = this
|
||||
,config = that.config
|
||||
,ELEM = 'layui-layedit', textArea = $('#'+id)
|
||||
,ELEM = 'layui-layedit', textArea = $(typeof(id)=='string'?'#'+id:id)
|
||||
,name = 'LAY_layedit_'+ (++that.index)
|
||||
,haveBuild = textArea.next('.'+ELEM)
|
||||
|
||||
|
||||
@@ -411,11 +411,18 @@ layui.define(['laytpl', 'laypage', 'layer', 'form'], function(exports){
|
||||
var params = {};
|
||||
params[request.pageName] = curr;
|
||||
params[request.limitName] = options.limit;
|
||||
|
||||
|
||||
var tmpdata = "";
|
||||
if(options.contenttype.indexOf("application/json") == 0){
|
||||
tmpdata = JSON.stringify($.extend(params, options.where));
|
||||
} else {
|
||||
tmpdata = $.extend(params, options.where);
|
||||
}
|
||||
$.ajax({
|
||||
type: options.method || 'get'
|
||||
,url: options.url
|
||||
,data: $.extend(params, options.where)
|
||||
,contentType: options.contenttype
|
||||
,data: tmpdata
|
||||
,dataType: 'json'
|
||||
,headers: options.headers || {}
|
||||
,success: function(res){
|
||||
|
||||
@@ -88,7 +88,7 @@ layui.define('layer' , function(exports){
|
||||
var that = this
|
||||
,options = that.config
|
||||
,elemFile = that.elemFile = $([
|
||||
'<input class="'+ ELEM_FILE +'" type="file" name="'+ options.field +'"'
|
||||
'<input class="'+ ELEM_FILE +'" type="file" accept="'+ options.domAccept +'" name="'+ options.field +'"'
|
||||
,(options.multiple ? ' multiple' : '')
|
||||
,'>'
|
||||
].join(''))
|
||||
|
||||
Reference in New Issue
Block a user