浏览代码

Update data.md (#1753)

Fix the `x-show` variable in the second example in the `Single-element components` section.
fgb4101 4 年之前
父节点
当前提交
b2cd84c25b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/docs/src/en/directives/data.md

+ 1 - 1
packages/docs/src/en/directives/data.md

@@ -133,7 +133,7 @@ Sometimes you may only have a single element inside your Alpine component, like
 In these cases, you can declare `x-data` directly on that single element:
 
 ```html
-<button x-data="{ open: true }" @click="open = false" x-show="show">
+<button x-data="{ open: true }" @click="open = false" x-show="open">
     Hide Me
 </button>
 ```