|
@@ -305,6 +305,7 @@ import Cocoa
|
|
|
var fileSize: Double = 0
|
|
|
var filePaths: [String] = []
|
|
|
var showFileSizeLimit = false
|
|
|
+ var showFileCountLimit = false
|
|
|
for (i, fileP) in self.filePaths_.enumerated() {
|
|
|
let model = KMUserFbListModel()
|
|
|
model.filePath = fileP
|
|
@@ -320,6 +321,7 @@ import Cocoa
|
|
|
continue
|
|
|
}
|
|
|
if i >= 10 {
|
|
|
+ showFileCountLimit = true
|
|
|
break
|
|
|
}
|
|
|
|
|
@@ -330,8 +332,10 @@ import Cocoa
|
|
|
}
|
|
|
self.filePaths_ = filePaths
|
|
|
|
|
|
- if showFileSizeLimit {
|
|
|
- self.listItemView_?.showTip()
|
|
|
+ if showFileCountLimit {
|
|
|
+ self.listItemView_?.showTip(tip: NSLocalizedString("添加失败:文件不能超过10", comment: ""))
|
|
|
+ } else if showFileSizeLimit {
|
|
|
+ self.listItemView_?.showTip(tip: NSLocalizedString("添加失败:附件大小不能超过20M", comment: ""))
|
|
|
}
|
|
|
|
|
|
if datas.count >= 10 {
|