docs(@vant/use): add vuepress

This commit is contained in:
chenjiahan
2020-10-04 19:42:44 +08:00
parent 79493de49d
commit ca860fda5f
14 changed files with 7349 additions and 112 deletions
+7
View File
@@ -0,0 +1,7 @@
{
"private": true,
"license": "MIT",
"devDependencies": {
"vue": "^3.0.0"
}
}
@@ -70,11 +70,11 @@ type Options = {
## 参数
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| target | 绑定事件的元素 | \_Element | Ref<Element>\_ | - |
| listener | 点击外部时触发的回调函数 | _EventListener_ | - |
| options | 可选的配置项 | _Options_ | `{ eventName: 'click' }` |
| 参数 | 说明 | 类型 | 默认值 |
| -------- | ------------------------ | -------------------------- | ------ |
| target | 绑定事件的元素 | _Element \| Ref\<Element>_ | - |
| listener | 点击外部时触发的回调函数 | _EventListener_ | - |
| options | 可选的配置项 | _Options_ | 见下表 |
## Options
@@ -58,6 +58,6 @@ type Options = {
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| target | 绑定事件的元素 | \_EventTarget | Ref<EventTarget>\_ | `window` |
| target | 绑定事件的元素 | _EventTarget \| Ref\<EventTarget>_ | `window` |
| capture | 是否在事件捕获阶段触发 | _boolean_ | `false` |
| passive | 设置为 `true` 时,表示 `listener` 永远不会调用 `preventDefault` | _boolean_ | `false` |
@@ -33,4 +33,4 @@ type VisibilityState = 'visible' | 'hidden';
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| visibilityState | 页面当前的可见状态,`visible` 为可见,`hidden` 为隐藏 | _Ref<VisibilityState>_ | - |
| visibilityState | 页面当前的可见状态,`visible` 为可见,`hidden` 为隐藏 | _Ref\<VisibilityState>_ | - |
@@ -40,12 +40,12 @@ function useScrollParent(element: Ref<Element>): Ref<Element>;
## 参数
| 参数 | 说明 | 类型 | 默认值 |
| ------- | -------- | -------------- | ------ |
| element | 当前元素 | _Ref<Element>_ | - |
| 参数 | 说明 | 类型 | 默认值 |
| ------- | -------- | --------------- | ------ |
| element | 当前元素 | _Ref\<Element>_ | - |
## 返回值
| 参数 | 说明 | 类型 | 默认值 |
| ------------ | ------------------ | -------------- | ------ |
| scrollParent | 最近的可滚动父元素 | _Ref<Element>_ | - |
| 参数 | 说明 | 类型 | 默认值 |
| ------------ | ------------------ | --------------- | ------ |
| scrollParent | 最近的可滚动父元素 | _Ref\<Element>_ | - |
+104
View File
@@ -0,0 +1,104 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@babel/helper-validator-identifier@^7.10.4":
version "7.10.4"
resolved "https://registry.npm.taobao.org/@babel/helper-validator-identifier/download/@babel/helper-validator-identifier-7.10.4.tgz?cache=0&sync_timestamp=1593522720715&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fhelper-validator-identifier%2Fdownload%2F%40babel%2Fhelper-validator-identifier-7.10.4.tgz#a78c7a7251e01f616512d31b10adcf52ada5e0d2"
integrity sha1-p4x6clHgH2FlEtMbEK3PUq2l4NI=
"@babel/parser@^7.11.5":
version "7.11.5"
resolved "https://registry.npm.taobao.org/@babel/parser/download/@babel/parser-7.11.5.tgz#c7ff6303df71080ec7a4f5b8c003c58f1cf51037"
integrity sha1-x/9jA99xCA7HpPW4wAPFjxz1EDc=
"@babel/types@^7.11.5":
version "7.11.5"
resolved "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.11.5.tgz#d9de577d01252d77c6800cee039ee64faf75662d"
integrity sha1-2d5XfQElLXfGgAzuA57mT691Zi0=
dependencies:
"@babel/helper-validator-identifier" "^7.10.4"
lodash "^4.17.19"
to-fast-properties "^2.0.0"
"@vue/compiler-core@3.0.0":
version "3.0.0"
resolved "https://registry.npm.taobao.org/@vue/compiler-core/download/@vue/compiler-core-3.0.0.tgz#25e4f079cf6c39f83bad23700f814c619105a0f2"
integrity sha1-JeTwec9sOfg7rSNwD4FMYZEFoPI=
dependencies:
"@babel/parser" "^7.11.5"
"@babel/types" "^7.11.5"
"@vue/shared" "3.0.0"
estree-walker "^2.0.1"
source-map "^0.6.1"
"@vue/compiler-dom@3.0.0":
version "3.0.0"
resolved "https://registry.npm.taobao.org/@vue/compiler-dom/download/@vue/compiler-dom-3.0.0.tgz#4cbb48fcf1f852daef2babcf9953b681ac463526"
integrity sha1-TLtI/PH4UtrvK6vPmVO2gaxGNSY=
dependencies:
"@vue/compiler-core" "3.0.0"
"@vue/shared" "3.0.0"
"@vue/reactivity@3.0.0":
version "3.0.0"
resolved "https://registry.npm.taobao.org/@vue/reactivity/download/@vue/reactivity-3.0.0.tgz#fd15632a608650ce2a969c721787e27e2c80aa6b"
integrity sha1-/RVjKmCGUM4qlpxyF4fifiyAqms=
dependencies:
"@vue/shared" "3.0.0"
"@vue/runtime-core@3.0.0":
version "3.0.0"
resolved "https://registry.npm.taobao.org/@vue/runtime-core/download/@vue/runtime-core-3.0.0.tgz#480febf1bfe32798b6abbd71a88f8e8b473a51c2"
integrity sha1-SA/r8b/jJ5i2q71xqI+Oi0c6UcI=
dependencies:
"@vue/reactivity" "3.0.0"
"@vue/shared" "3.0.0"
"@vue/runtime-dom@3.0.0":
version "3.0.0"
resolved "https://registry.npm.taobao.org/@vue/runtime-dom/download/@vue/runtime-dom-3.0.0.tgz#e0d1f7c7e22e1318696014cc3501e06b288c2e11"
integrity sha1-4NH3x+IuExhpYBTMNQHgayiMLhE=
dependencies:
"@vue/runtime-core" "3.0.0"
"@vue/shared" "3.0.0"
csstype "^2.6.8"
"@vue/shared@3.0.0":
version "3.0.0"
resolved "https://registry.npm.taobao.org/@vue/shared/download/@vue/shared-3.0.0.tgz#ec089236629ecc0f10346b92f101ff4339169f1a"
integrity sha1-7AiSNmKezA8QNGuS8QH/QzkWnxo=
csstype@^2.6.8:
version "2.6.13"
resolved "https://registry.npm.taobao.org/csstype/download/csstype-2.6.13.tgz?cache=0&sync_timestamp=1598348290847&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcsstype%2Fdownload%2Fcsstype-2.6.13.tgz#a6893015b90e84dd6e85d0e3b442a1e84f2dbe0f"
integrity sha1-pokwFbkOhN1uhdDjtEKh6E8tvg8=
estree-walker@^2.0.1:
version "2.0.1"
resolved "https://registry.npm.taobao.org/estree-walker/download/estree-walker-2.0.1.tgz#f8e030fb21cefa183b44b7ad516b747434e7a3e0"
integrity sha1-+OAw+yHO+hg7RLetUWt0dDTno+A=
lodash@^4.17.19:
version "4.17.20"
resolved "https://registry.npm.taobao.org/lodash/download/lodash-4.17.20.tgz?cache=0&sync_timestamp=1597336147792&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Flodash%2Fdownload%2Flodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
integrity sha1-tEqbYpe8tpjxxRo1RaKzs2jVnFI=
source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.npm.taobao.org/source-map/download/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha1-dHIq8y6WFOnCh6jQu95IteLxomM=
to-fast-properties@^2.0.0:
version "2.0.0"
resolved "https://registry.npm.taobao.org/to-fast-properties/download/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=
vue@^3.0.0:
version "3.0.0"
resolved "https://registry.npm.taobao.org/vue/download/vue-3.0.0.tgz#cfb5df5c34efce319b113a1667d12b74dcfd9c90"
integrity sha1-z7XfXDTvzjGbEToWZ9ErdNz9nJA=
dependencies:
"@vue/compiler-dom" "3.0.0"
"@vue/runtime-dom" "3.0.0"
"@vue/shared" "3.0.0"