【类 型】:test
【原 因】: 【过 程】: 【影 响】: # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
d157f16dfb
commit
e45f370794
@ -9,8 +9,8 @@ import store from '../store/index.js'
|
|||||||
* @returns {string} 截取完的内容最后加省略号
|
* @returns {string} 截取完的内容最后加省略号
|
||||||
*/
|
*/
|
||||||
export function truncate(value, length = 5) {
|
export function truncate(value, length = 5) {
|
||||||
if (!value) return '';
|
if (!value) return ''
|
||||||
return value.length > length ? value.slice(0, length) + '...' : value;
|
return value.length > length ? value.slice(0, length) + '...' : value
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Parse the time to string
|
* Parse the time to string
|
||||||
|
Loading…
Reference in New Issue
Block a user