提交 64f6bd8e 编写于 作者: U u013235949

Fri Jun 21 15:19:00 CST 2024 inscode

上级 a8d96bcd
......@@ -6,5 +6,8 @@ console.log("欢迎来到 InsCode");
// 我们可以在这里测试它的匹配情况.
// path-to-regexp 中有一个 match 函数.
// 比如我定义了一个 /about 路由, 可以测试它的匹配情况.
const fn = match("/about", { decode: decodeURIComponent });
console.log(fn('/about/')) // 可以匹配
console.log(fn('/about/1')) // false
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册