chore: prettier source code

This commit is contained in:
chenjiahan
2020-04-02 15:36:02 +08:00
parent 340c56b3b5
commit 2fb5cca49a
93 changed files with 272 additions and 283 deletions

View File

@@ -32,7 +32,7 @@ export default createComponent({
mixins: [
TouchMixin,
ParentMixin('vanIndexBar'),
BindEventMixin(function(bind) {
BindEventMixin(function (bind) {
if (!this.scroller) {
this.scroller = getScroller(this.$el);
}
@@ -97,7 +97,7 @@ export default createComponent({
const scrollTop = getScrollTop(this.scroller);
const scrollerRect = this.getScrollerRect();
const rects = this.children.map(item => ({
const rects = this.children.map((item) => ({
height: item.height,
top: this.getElementTop(item.$el, scrollerRect),
}));
@@ -198,7 +198,9 @@ export default createComponent({
return;
}
const match = this.children.filter(item => String(item.index) === index);
const match = this.children.filter(
(item) => String(item.index) === index
);
if (match[0]) {
match[0].scrollIntoView();
@@ -216,7 +218,7 @@ export default createComponent({
},
render() {
const Indexes = this.indexList.map(index => {
const Indexes = this.indexList.map((index) => {
const active = index === this.activeAnchorIndex;
return (