chore: prettier source code
This commit is contained in:
+5
-5
@@ -84,7 +84,7 @@ export default createComponent({
|
||||
const defaultIndex = cursor.defaultIndex || +this.defaultIndex;
|
||||
|
||||
formatted.push({
|
||||
values: cursor.children.map(item => item[this.valueKey]),
|
||||
values: cursor.children.map((item) => item[this.valueKey]),
|
||||
className: cursor.className,
|
||||
defaultIndex,
|
||||
});
|
||||
@@ -116,7 +116,7 @@ export default createComponent({
|
||||
|
||||
this.setColumnValues(
|
||||
columnIndex,
|
||||
cursor.children.map(item => item[this.valueKey])
|
||||
cursor.children.map((item) => item[this.valueKey])
|
||||
);
|
||||
|
||||
cursor = cursor.children[cursor.defaultIndex || 0];
|
||||
@@ -205,7 +205,7 @@ export default createComponent({
|
||||
// @exposed-api
|
||||
// get values of all columns
|
||||
getValues() {
|
||||
return this.children.map(child => child.getValue());
|
||||
return this.children.map((child) => child.getValue());
|
||||
},
|
||||
|
||||
// @exposed-api
|
||||
@@ -219,7 +219,7 @@ export default createComponent({
|
||||
// @exposed-api
|
||||
// get indexes of all columns
|
||||
getIndexes() {
|
||||
return this.children.map(child => child.currentIndex);
|
||||
return this.children.map((child) => child.currentIndex);
|
||||
},
|
||||
|
||||
// @exposed-api
|
||||
@@ -232,7 +232,7 @@ export default createComponent({
|
||||
|
||||
// @exposed-api
|
||||
confirm() {
|
||||
this.children.forEach(child => child.stopMomentum());
|
||||
this.children.forEach((child) => child.stopMomentum());
|
||||
this.emit('confirm');
|
||||
},
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ test('simulation finger swipe again before transitionend', () => {
|
||||
// mock getComputedStyle
|
||||
// see: https://github.com/jsdom/jsdom/issues/2588
|
||||
const originGetComputedStyle = window.getComputedStyle;
|
||||
window.getComputedStyle = ele => {
|
||||
window.getComputedStyle = (ele) => {
|
||||
const style = originGetComputedStyle(ele);
|
||||
|
||||
return {
|
||||
@@ -188,10 +188,7 @@ test('click column item', () => {
|
||||
},
|
||||
});
|
||||
|
||||
wrapper
|
||||
.findAll('.van-picker-column__item')
|
||||
.at(3)
|
||||
.trigger('click');
|
||||
wrapper.findAll('.van-picker-column__item').at(3).trigger('click');
|
||||
expect(wrapper.emitted('change')[0][1]).toEqual(columns[1]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user