Skip to content

Commit 9776c53

Browse files
committed
fix eslint
1 parent 357dda3 commit 9776c53

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

packages/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import locale from './locale/index';
55
export default {
66
install (Vue, options = {}) {
77
Vue.component('vue-loadmore', VueLoadmore);
8-
8+
99
locale.use(options.lang);
1010
}
1111
};
1212

1313
export {
1414
locale
15-
}
15+
};

packages/locale/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ import enUS from './lang/en-US';
55

66
const langLibrary = {
77
'zh-CN': zhCN,
8-
'en-US': enUS,
8+
'en-US': enUS
99
};
1010

1111
const proto = Vue.prototype;
1212
const { defineReactive } = Vue.util;
1313
// 将proto.lang定义成响应式数据
1414
defineReactive(proto, 'lang', 'zh-CN');
1515

16-
const getLangLibrary = () => langLibrary[proto.lang];
16+
const getLangLibrary = () => langLibrary[proto.lang];
1717

1818
export default {
1919
// 获取当前语言库的值
20-
t(path) {
20+
t (path) {
2121
const library = getLangLibrary();
2222
return getDeepVal(library, path);
2323
},
2424

2525
// 使用某个语言库(zhCN/enUS)
26-
use(lang) {
26+
use (lang) {
2727
if (langLibrary[lang]) {
2828
proto.lang = lang;
2929
}
3030
}
31-
};
31+
};

packages/locale/lang/en-US.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ export default {
99
loading: 'Loading',
1010
finished: 'No more data',
1111
error: 'Request failed, click to reload'
12-
},
13-
}
12+
}
13+
};

packages/locale/lang/zh-CN.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ export default {
99
loading: '正在加载',
1010
finished: '没有更多了',
1111
error: '请求失败,点击重新加载'
12-
},
13-
}
12+
}
13+
};

0 commit comments

Comments
 (0)