mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
[improvement] IndexBar: add default highlight color and more less vars
This commit is contained in:
@@ -65,7 +65,7 @@ export default {
|
||||
| index-list | Index List | `Array` | `A-Z` |
|
||||
| z-index | z-index | `Number` | `1` |
|
||||
| sticky | Whether to enable anchor sticky top | `Boolean` | `true` |
|
||||
| highlight-color | Index character highlight color | `String` | - | - |
|
||||
| highlight-color | Index character highlight color | `String` | `#07c160` | - |
|
||||
|
||||
### IndexAnchor Props
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import { use } from '../utils';
|
||||
import { TouchMixin } from '../mixins/touch';
|
||||
import { ParentMixin } from '../mixins/relation';
|
||||
import { GREEN } from '../utils/color';
|
||||
import { on, off } from '../utils/event';
|
||||
import { getScrollTop, getElementTop, getScrollEventTarget } from '../utils/scroll';
|
||||
|
||||
@@ -18,7 +19,10 @@ export default sfc({
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
highlightColor: String,
|
||||
highlightColor: {
|
||||
type: String,
|
||||
default: GREEN
|
||||
},
|
||||
indexList: {
|
||||
type: Array,
|
||||
default() {
|
||||
|
@@ -69,7 +69,7 @@ export default {
|
||||
| index-list | 索引字符列表 | `Array` | `A-Z` | - |
|
||||
| z-index | z-index 层级 | `Number` | `1` | - |
|
||||
| sticky | 是否开启锚点自动吸顶 | `Boolean` | `true` | - |
|
||||
| highlight-color | 索引字符高亮颜色 | `String` | - | - |
|
||||
| highlight-color | 索引字符高亮颜色 | `String` | `#07c160` | - |
|
||||
|
||||
### IndexAnchor Props
|
||||
|
||||
|
Reference in New Issue
Block a user