style(IndexBar): using primary color by default

This commit is contained in:
chenjiahan 2022-01-24 15:17:50 +08:00
parent 37e7c618b8
commit 8b95db1574
4 changed files with 8 additions and 8 deletions

View File

@ -6,7 +6,7 @@
--van-index-anchor-font-size: var(--van-font-size-md);
--van-index-anchor-line-height: 32px;
--van-index-anchor-background: transparent;
--van-index-anchor-sticky-text-color: var(--van-danger-color);
--van-index-anchor-sticky-text-color: var(--van-primary-color);
--van-index-anchor-sticky-background: var(--van-background-light);
}

View File

@ -75,7 +75,7 @@ export default {
| z-index | z-index | _number \| string_ | `1` |
| sticky | Whether to enable anchor sticky top | _boolean_ | `true` |
| sticky-offset-top | Anchor offset top when sticky | _number_ | `0` |
| highlight-color | Index character highlight color | _string_ | `#ee0a24` |
| highlight-color | Index character highlight color | _string_ | `#1989fa` |
| teleport `v3.0.19` | Specifies a target element where IndexBar will be mounted | _string \| Element_ | - |
### IndexAnchor Props
@ -135,7 +135,7 @@ The component provides the following CSS variables, which can be used to customi
| --van-index-bar-sidebar-z-index | _2_ | - |
| --van-index-bar-index-font-size | _var(--van-font-size-xs)_ | - |
| --van-index-bar-index-line-height | _var(--van-line-height-xs)_ | - |
| --van-index-bar-index-active-color | _var(--van-danger-color)_ | - |
| --van-index-bar-index-active-color | _var(--van-primary-color)_ | - |
| --van-index-anchor-z-index | _1_ | - |
| --van-index-anchor-padding | _0 var(--van-padding-md)_ | - |
| --van-index-anchor-text-color | _var(--van-text-color)_ | - |
@ -143,5 +143,5 @@ The component provides the following CSS variables, which can be used to customi
| --van-index-anchor-font-size | _var(--van-font-size-md)_ | - |
| --van-index-anchor-line-height | _32px_ | - |
| --van-index-anchor-background | _transparent_ | - |
| --van-index-anchor-sticky-text-color | _var(--van-danger-color)_ | - |
| --van-index-anchor-sticky-text-color | _var(--van-primary-color)_ | - |
| --van-index-anchor-sticky-background | _var(--van-background-light)_ | - |

View File

@ -79,7 +79,7 @@ export default {
| z-index | z-index 层级 | _number \| string_ | `1` |
| sticky | 是否开启锚点自动吸顶 | _boolean_ | `true` |
| sticky-offset-top | 锚点自动吸顶时与顶部的距离 | _number_ | `0` |
| highlight-color | 索引字符高亮颜色 | _string_ | `#ee0a24` |
| highlight-color | 索引字符高亮颜色 | _string_ | `#1989fa` |
| teleport `v3.0.19` | 指定索引栏挂载的节点 | _string \| Element_ | - |
### IndexAnchor Props
@ -139,7 +139,7 @@ indexBarRef.value?.scrollTo('B');
| --van-index-bar-sidebar-z-index | _2_ | - |
| --van-index-bar-index-font-size | _var(--van-font-size-xs)_ | - |
| --van-index-bar-index-line-height | _var(--van-line-height-xs)_ | - |
| --van-index-bar-index-active-color | _var(--van-danger-color)_ | - |
| --van-index-bar-index-active-color | _var(--van-primary-color)_ | - |
| --van-index-anchor-z-index | _1_ | - |
| --van-index-anchor-padding | _0 var(--van-padding-md)_ | - |
| --van-index-anchor-text-color | _var(--van-text-color)_ | - |
@ -147,5 +147,5 @@ indexBarRef.value?.scrollTo('B');
| --van-index-anchor-font-size | _var(--van-font-size-md)_ | - |
| --van-index-anchor-line-height | _32px_ | - |
| --van-index-anchor-background | _transparent_ | - |
| --van-index-anchor-sticky-text-color | _var(--van-danger-color)_ | - |
| --van-index-anchor-sticky-text-color | _var(--van-primary-color)_ | - |
| --van-index-anchor-sticky-background | _var(--van-background-light)_ | - |

View File

@ -2,7 +2,7 @@
--van-index-bar-sidebar-z-index: 2;
--van-index-bar-index-font-size: var(--van-font-size-xs);
--van-index-bar-index-line-height: var(--van-line-height-xs);
--van-index-bar-index-active-color: var(--van-danger-color);
--van-index-bar-index-active-color: var(--van-primary-color);
}
.van-index-bar {