Skip to content

Commit

Permalink
Merge branch 'master' into bugfix_klselect_isCaseSensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
nupthale authored Apr 10, 2018
2 parents badc3b6 + 1abedac commit a0e6c23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="m-file-unit">
<div class="m-file-unit {file.class}">
<div class="m-content">
{#if type === 'image'}
<div class="m-img-wrapper" on-click={this.onPreview($event)}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ const UploadBase = Component.extend({
flag: file.flag,
uid: file.uid,
status: 'success',
class: file.class || '',
};

if (fileunit.flag !== Config.flagMap.DELETED) {
Expand Down Expand Up @@ -560,7 +561,8 @@ const UploadBase = Component.extend({

Object.keys(typeMap).forEach((key) => {
const reg = new RegExp(`${key}$`);
if (reg.test(type) || (!type && reg.test(name))) {
// 名称后缀不区分大小写
if (reg.test(type) || (!type && reg.test(`${name}`.toLowerCase()))) {
typeStr = typeMap[key];
}
});
Expand Down
5 changes: 3 additions & 2 deletions src/js/components/form/KLUpload/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ var component = new NEKUI.Component({
template: template,
data: {
list: [{
name: 'Game.jpg',
url: 'http://haitao.nos.netease.com/906f417c7c964c0798adf9d0bf1b5c8c.jpg'
name: 'Game.JPG',
url: 'http://haitao.nos.netease.com/906f417c7c964c0798adf9d0bf1b5c8c.jpg',
class: 'my-img-test'
}, {
name: 'Kaola.jpg',
url: 'http://haitao.nos.netease.com/9b73692b3a6b46d2be1de7d3be893834.jpg'
Expand Down

0 comments on commit a0e6c23

Please sign in to comment.