浏览代码

$router.is checking multiple routes at the same time

Shaun Li 2 年之前
父节点
当前提交
905b75008b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      README.md

+ 1 - 1
README.md

@@ -255,7 +255,7 @@ Declare routes by creating a template tag with `x-route` attribute.
 
 <!-- Check if the route matches the current location -->
 <div x-show="$router.is('/path/to/route')">You can see me</div>
-<template x-if="$router.is('/path/to/route')">You can see me</template>
+<template x-if="$router.is('/path/to/route1', '/path/to/route2', ...)">You can see me</template>
 ```
 
 ## License