function removePrefixSort (sortArr) {
// 在内部排序规则中调用去前缀方法 以实现具体的排序
return sortArr.sort((a, b) => delPrefix(a) > delPrefix(b) ? 1 : -1)
}
// 返回去除指定前缀后的字符串
function delPrefix (item) {
return item.replace(/^(xtt|code|js)-/, '')
}
removePrefixSort( ['xtt-sort', 'code-clear', 'js-array', 'node','code-echo', 'js-symbol', 'css', 'xtt-romove'])
// ['js-array', 'code-clear', 'css', 'code-echo', 'node', 'xtt-romove', 'xtt-sort', 'js-symbol']