🎨 add eslint

This commit is contained in:
jingsam 2016-12-25 22:49:42 +08:00
parent 829a2e4cfc
commit b0893113b3
88 changed files with 376 additions and 370 deletions

View file

@ -14,7 +14,7 @@
data () {
return {
prefixCls: prefixCls
}
};
},
methods: {
handleClear () {
@ -24,5 +24,5 @@
this.$emit('on-pick-success');
}
}
}
</script>
};
</script>

View file

@ -10,7 +10,7 @@
</div>
</template>
<script>
import { getFirstDayOfMonth, getDayCountOfMonth, getStartDateOfMonth } from '../util';
import { getFirstDayOfMonth, getDayCountOfMonth } from '../util';
import { deepCopy } from '../../../utils/assist';
const prefixCls = 'ivu-date-picker-cells';
@ -46,7 +46,7 @@
return {
prefixCls: prefixCls,
readCells: []
}
};
},
watch: {
'rangeState.endDate' (newVal) {
@ -84,7 +84,7 @@
classes () {
return [
`${prefixCls}`
]
];
},
cells () {
const date = new Date(this.year, this.month, 1);
@ -269,9 +269,9 @@
[`${prefixCls}-cell-next-month`]: cell.type === 'next-month',
[`${prefixCls}-cell-range`]: cell.range && !cell.start && !cell.end
}
]
];
},
}
}
</script>
};
</script>

View file

@ -23,7 +23,7 @@
return [
`${prefixCls}`,
`${prefixCls}-month`
]
];
},
cells () {
let cells = [];
@ -56,7 +56,7 @@
[`${prefixCls}-cell-selected`]: cell.selected,
[`${prefixCls}-cell-disabled`]: cell.disabled
}
]
];
},
handleClick (event) {
const target = event.target;
@ -70,5 +70,5 @@
this.$emit('on-pick-click');
}
}
}
</script>
};
</script>

View file

@ -21,7 +21,7 @@
return [
`${prefixCls}`,
`${prefixCls}-year`
]
];
},
startYear() {
return Math.floor(this.year / 10) * 10;
@ -57,7 +57,7 @@
[`${prefixCls}-cell-selected`]: cell.selected,
[`${prefixCls}-cell-disabled`]: cell.disabled
}
]
];
},
nextTenYear() {
this.$emit('on-pick', Number(this.year) + 10, false);
@ -76,5 +76,5 @@
this.$emit('on-pick-click');
}
}
}
</script>
};
</script>

View file

@ -157,7 +157,7 @@
selectionMode: 'range',
leftTableYear: null,
rightTableYear: null
}
};
},
computed: {
classes () {
@ -167,7 +167,7 @@
{
[`${prefixCls}-with-sidebar`]: this.shortcuts.length
}
]
];
},
leftYear () {
return this.date.getFullYear();
@ -353,5 +353,5 @@
this.rangeState = val.rangeState;
}
}
}
</script>
};
</script>

View file

@ -73,7 +73,6 @@
import YearTable from '../base/year-table.vue';
import MonthTable from '../base/month-table.vue';
import Confirm from '../base/confirm.vue';
import { formatDate, parseDate } from '../util';
import Mixin from './mixin';
@ -97,7 +96,7 @@
year: null,
month: null,
confirm: false
}
};
},
computed: {
classes () {
@ -106,7 +105,7 @@
{
[`${prefixCls}-with-sidebar`]: this.shortcuts.length
}
]
];
},
yearLabel () {
const year = this.year;
@ -238,5 +237,5 @@
this.month = this.date.getMonth();
}
}
}
</script>
};
</script>

View file

@ -8,7 +8,7 @@ export default {
`${prefixCls}-icon-btn`,
`${datePrefixCls}-${direction}-btn`,
`${datePrefixCls}-${direction}-btn-arrow${type}`,
]
];
},
handleShortcutClick (shortcut) {
if (shortcut.value) this.$emit('on-pick', shortcut.value());
@ -24,4 +24,4 @@ export default {
this.$emit('on-pick-click');
}
}
}
};

View file

@ -193,7 +193,7 @@
picker: null,
internalValue: '',
disableClickOutSide: false // fixed when click a date,trigger clickoutside to close picker
}
};
},
computed: {
opened () {
@ -424,5 +424,5 @@
ready () {
if (this.open !== null) this.visible = this.open;
}
}
</script>
};
</script>

View file

@ -33,4 +33,4 @@ export default {
this.panel = getPanel(this.type);
}
}
};