true如果location.pathname在 ES6 中找到這些字符串,我如何返回? const noActionMenuRoutes = [ '/master/employees', '/employees/dashboard', '/employees/requests', '/projects/myprojects', ]; const noActionMenus = () => { if (location.pathname.some(noActionMenuRoutes)) { return true; } else { return false; } };
ES6 中如果包含在字符串中則返回 True
幕布斯6054654
2023-08-18 16:54:17