Browse Source

DEC-5709 文件toast提示修改

es6
qcc 6 years ago
parent
commit
62f556d3fe
  1. 4
      dist/base.js
  2. 4
      dist/bundle.ie.js
  3. 4
      dist/bundle.js
  4. 26
      dist/demo.js
  5. 4
      dist/fineui.ie.js
  6. 4
      dist/fineui.js
  7. 4
      src/base/single/input/file.js

4
dist/base.js vendored

@ -9805,14 +9805,14 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
size = item.fileSize || item.size; size = item.fileSize || item.size;
if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) { if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) {
// 文件类型不支持 // 文件类型不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 0, errorType: 0,
file: item file: item
}); });
} else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) { } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) {
// 文件大小不支持 // 文件大小不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 1, errorType: 1,
file: item file: item

4
dist/bundle.ie.js vendored

@ -44891,14 +44891,14 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
size = item.fileSize || item.size; size = item.fileSize || item.size;
if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) { if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) {
// 文件类型不支持 // 文件类型不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 0, errorType: 0,
file: item file: item
}); });
} else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) { } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) {
// 文件大小不支持 // 文件大小不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 1, errorType: 1,
file: item file: item

4
dist/bundle.js vendored

@ -45295,14 +45295,14 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
size = item.fileSize || item.size; size = item.fileSize || item.size;
if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) { if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) {
// 文件类型不支持 // 文件类型不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 0, errorType: 0,
file: item file: item
}); });
} else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) { } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) {
// 文件大小不支持 // 文件大小不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 1, errorType: 1,
file: item file: item

26
dist/demo.js vendored

@ -726,6 +726,7 @@ BI.shortcut("demo.editor", Demo.Editor);Demo.CodeEditor = BI.inherit(BI.Widget,
cls: "layout-bg1", cls: "layout-bg1",
items: [{ items: [{
type: "bi.multifile_editor", type: "bi.multifile_editor",
accept: "*.zip;",
width: 400, width: 400,
height: 300 height: 300
}], }],
@ -6126,30 +6127,7 @@ Demo.HtapeLayout = BI.inherit(BI.Widget, {
}; };
} }
}); });
BI.shortcut("demo.htape", Demo.HtapeLayout);Demo.InlineVerticalLayout = BI.inherit(BI.Widget, { BI.shortcut("demo.htape", Demo.HtapeLayout);/**
props: {
baseCls: "demo-absolute"
},
render: function () {
return {
type: "bi.inline_vertical_adapt",
items: [{
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 200
}, {
type: "bi.label",
text: "绝对布局",
cls: "layout-bg1",
width: 300,
height: 100
}]
};
}
});
BI.shortcut("demo.inline_vertical", Demo.InlineVerticalLayout);/**
* Created by User on 2017/3/22. * Created by User on 2017/3/22.
*/ */
Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, { Demo.LeftRightVerticalAdaptLayout = BI.inherit(BI.Widget, {

4
dist/fineui.ie.js vendored

@ -45133,14 +45133,14 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
size = item.fileSize || item.size; size = item.fileSize || item.size;
if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) { if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) {
// 文件类型不支持 // 文件类型不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 0, errorType: 0,
file: item file: item
}); });
} else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) { } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) {
// 文件大小不支持 // 文件大小不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 1, errorType: 1,
file: item file: item

4
dist/fineui.js vendored

@ -45537,14 +45537,14 @@ BI.shortcut("bi.checkbox", BI.Checkbox);/**
size = item.fileSize || item.size; size = item.fileSize || item.size;
if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) { if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) {
// 文件类型不支持 // 文件类型不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 0, errorType: 0,
file: item file: item
}); });
} else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) { } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) {
// 文件大小不支持 // 文件大小不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 1, errorType: 1,
file: item file: item

4
src/base/single/input/file.js

@ -496,14 +496,14 @@
size = item.fileSize || item.size; size = item.fileSize || item.size;
if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) { if (wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)) {
// 文件类型不支持 // 文件类型不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Type_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 0, errorType: 0,
file: item file: item
}); });
} else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) { } else if (wrap.maxSize !== -1 && size && wrap.maxSize < size) {
// 文件大小不支持 // 文件大小不支持
BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error")); BI.Msg.toast(BI.i18nText("BI-Upload_File_Size_Error"), {level: "error"});
self.fireEvent(BI.File.EVENT_ERROR, { self.fireEvent(BI.File.EVENT_ERROR, {
errorType: 1, errorType: 1,
file: item file: item

Loading…
Cancel
Save