(js)字符串截取最后一个斜杠之后的字符

效果
在这里插入图片描述

congsole.log(n)
const spliceLength2 = n.lastIndexOf("/");
this.pathType = n.slice(spliceLength2 + 1);
congsole.log(this.pathType)
Logo

基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。

更多推荐