mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Pre Merge pull request !28 from 麦客/v6
This commit is contained in:
commit
b66707ce3e
@ -604,7 +604,7 @@ $(function () {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/*! 上传多张图片 */
|
/*! 上传多张图片 */
|
||||||
$.fn.uploadMultipleImage = function () {
|
$.fn.uploadMultipleImage = function (num) {
|
||||||
return this.each(function () {
|
return this.each(function () {
|
||||||
if ($(this).data('inited')) return true; else $(this).data('inited', true);
|
if ($(this).data('inited')) return true; else $(this).data('inited', true);
|
||||||
var $in = $(this), $bt = $('<a data-file="mul" class="uploadimage"></a>'), imgs = this.value ? this.value.split('|') : []
|
var $in = $(this), $bt = $('<a data-file="mul" class="uploadimage"></a>'), imgs = this.value ? this.value.split('|') : []
|
||||||
@ -621,8 +621,10 @@ $(function () {
|
|||||||
imgs = [], $bt.prevAll('.uploadimage').map(function () {
|
imgs = [], $bt.prevAll('.uploadimage').map(function () {
|
||||||
imgs.push($(this).attr('data-tips-image'));
|
imgs.push($(this).attr('data-tips-image'));
|
||||||
});
|
});
|
||||||
|
if(num>0 && imgs.length<num) $bt.show();
|
||||||
imgs.reverse(), $in.val(imgs.join('|'));
|
imgs.reverse(), $in.val(imgs.join('|'));
|
||||||
}), $bt.before($image);
|
}), $bt.before($image);
|
||||||
|
if(num>0&&imgs.length>=num) $bt.hide();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user