From d2299808f252b4fc55a8acf809020c489ebb0563 Mon Sep 17 00:00:00 2001 From: tangwei Date: Fri, 17 Sep 2021 10:08:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[+]:=E4=BF=AE=E6=94=B9demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sites/components/anchor/index.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sites/components/anchor/index.md b/sites/components/anchor/index.md index 14444b88..df0756c2 100644 --- a/sites/components/anchor/index.md +++ b/sites/components/anchor/index.md @@ -44,14 +44,14 @@ # dAnchor 定义一个锚点。 -## dAnchor 参数 +### dAnchor 参数 | 参数 | 类型 | 默认 | 说明 | 跳转 Demo |全局配置项| | :----------------: | :----------: | :------: | :--: | :---------------------------------------------------: | ---------------------------- | | dAnchor | `string` | -- | 必选,设置一个锚点的名字 | [基本用法](demo#basic-usage) | | anchorActive | `string` | -- | 可选,锚点处于激活状态的时候,模块生效对应的 css 类名 | [基本用法](demo#basic-usage) | -## dAnchor 锚点激活事件 +### dAnchor 锚点激活事件 自动会给锚点加上以下类对应不同激活的对象。 @@ -66,7 +66,7 @@ 定义一个锚点的链接,点击链接会滑动到锚点,锚点处于页面顶部的时候也会激活链接的 class。 -## dAnchorLink 参数 +### dAnchorLink 参数 | 参数 | 类型 | 默认 | 说明 | 跳转 Demo |全局配置项| | :----------------: | :----------: | :------: | :--: | :---------------------------------------------------: | ---------------------------- | -- Gitee From a9a024439c1c2e6220b577dd4c6036d3773879b0 Mon Sep 17 00:00:00 2001 From: tangwei Date: Fri, 17 Sep 2021 10:10:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20demo=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sites/components/anchor/index.md | 34 ++++++++++---------------------- 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/sites/components/anchor/index.md b/sites/components/anchor/index.md index f6d10d2f..df0756c2 100644 --- a/sites/components/anchor/index.md +++ b/sites/components/anchor/index.md @@ -16,7 +16,7 @@ 在页面中使用: ```html - +
  • anchorlink-one
  • @@ -40,33 +40,16 @@
``` - -# v-d-anchor-box - -定义一个锚点。 -## v-d-anchor-box 参数 - -| 参数 | 类型 | 默认 | 说明 | 基本用法 |全局配置项| -| :----------------: | :----------: | :------: | :--: | :---------------------------------------------------: | ---------------------------- | -| className | `string` | -- | 可选,className为"scrollTarget"时,为局部滚动。默认全局滚动 | className="scrollTarget" | true - -# v-d-anchor - -定义一个锚点。 -## v-d-anchor 参数 - -| 参数 | 类型 | 默认 | 说明 | 基本用法 |全局配置项| -| :----------------: | :----------: | :------: | :--: | :---------------------------------------------------: | ---------------------------- | -| v-d-anchor | `string` | -- | 必选,设置锚点对应的跳转位置 | v-d-anchor="anchorlink-one" | true - -# v-d-anchor-link + +# dAnchor 定义一个锚点。 ### dAnchor 参数 -| 参数 | 类型 | 默认 | 说明 | 基本用法 |全局配置项| +| 参数 | 类型 | 默认 | 说明 | 跳转 Demo |全局配置项| | :----------------: | :----------: | :------: | :--: | :---------------------------------------------------: | ---------------------------- | -| v-d-anchor-link | `string` | -- | 必选,设置一个锚点的名字 | v-d-anchor-link="anchorlink-one" | true +| dAnchor | `string` | -- | 必选,设置一个锚点的名字 | [基本用法](demo#basic-usage) | +| anchorActive | `string` | -- | 可选,锚点处于激活状态的时候,模块生效对应的 css 类名 | [基本用法](demo#basic-usage) | ### dAnchor 锚点激活事件 @@ -74,7 +57,10 @@ | css 类名 | 代表意义 | | :---------------------------: | :--------------------: | -| active | 点击锚点链接激活 | +| anchor-active-by-anchor-link | 点击锚点链接激活 | +| anchor-active-by-scroll | 容器滚动到锚点位置激活 | +| anchor-active-by-click-inside | 点击锚点内部内容激活 | +| anchor-active-by-initial | 初始化滚动条位置激活 | # dAnchorLink -- Gitee