💄 grid视图下文件名过长时改为中间省略
This commit is contained in:
parent
79b04d52f7
commit
9bf8efc853
@ -804,14 +804,14 @@ export default {
|
|||||||
]),
|
]),
|
||||||
gridFilename() {
|
gridFilename() {
|
||||||
return function (item) {
|
return function (item) {
|
||||||
|
let filename = item.name
|
||||||
if (item.folder) {
|
if (item.folder) {
|
||||||
return filename
|
return filename
|
||||||
}
|
}
|
||||||
let filename = item.name
|
let sliceLength = 9
|
||||||
let sliceLength = 10
|
|
||||||
let chineseLength = 0
|
let chineseLength = 0
|
||||||
for (var i = 0; i < 10; i++) {
|
for (let i = 0; i < 9; i++) {
|
||||||
var code = filename.charCodeAt(i);
|
let code = filename.charCodeAt(i);
|
||||||
if (code > 255) {
|
if (code > 255) {
|
||||||
// 如果编码大于255,说明是中文
|
// 如果编码大于255,说明是中文
|
||||||
chineseLength++
|
chineseLength++
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user