docs: 新增 hooks 文档
This commit is contained in:
parent
daf314ff0c
commit
f4182b4b2a
@ -2,14 +2,12 @@
|
||||
:::
|
||||
|
||||
```html
|
||||
<div ref='dropdownRef'></div>
|
||||
<div ref="dropdownRef"></div>
|
||||
```
|
||||
|
||||
```javascript
|
||||
const dropdownRef = ref<null | HTMLElement>(null)
|
||||
const dropdownRef = (ref < null) | (HTMLElement > null)
|
||||
const isClickOutside = useClickOutside(dropdownRef)
|
||||
|
||||
watch(isClickOutside, () => {
|
||||
|
||||
})
|
||||
```
|
||||
watch(isClickOutside, () => {})
|
||||
```
|
||||
|
@ -266,8 +266,9 @@ const zhCN = [
|
||||
component: () =>
|
||||
import('../../docs/zh-CN/hooks/useClickOutside.md'),
|
||||
meta: { title: 'useClickOutside' },
|
||||
}
|
||||
]}
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
@ -73,7 +73,7 @@ export default {
|
||||
title: 'useClickOutside',
|
||||
subTitle: '',
|
||||
path: '/zh-CN/hooks/useClickOutside',
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user