我正在使用带有Jquery UI的jquery fileupload插件。
https://github.com/blueimp/jQuery-File-Upload/wiki/Options
我希望覆盖掉小部件选项,例如maxUploadfilesize
如果我在主文件jquery.fileupload-ui.js
中覆盖设置,则目前它会起作用。var parentWidget = ($.blueimpFP || $.blueimp).fileupload;
$.widget('blueimpUI.fileupload', parentWidget, {
options: {
// By default, files added to the widget are uploaded as soon
// as the user clicks on the start buttons. To enable automatic
// uploads, set the following option to true:
autoUpload: true,
//sequentialUploads, true,
// The following option limits the number of files that are
// allowed to be uploaded using this widget:
maxNumberOfFiles: undefined,
// The maximum allowed file size:
maxFileSize: 20000000,
// The minimum allowed file size:
minFileSize: undefined,
有没有办法在我的HTML模板中覆盖它,以便我可以为不同的HTML页面进行不同的定制
我的意思是一些JavaScript代码,我可以将其放在模板中,覆盖默认设置