Skip to content

Commit 02ef1d5

Browse files
committed
refactor: 修正 i18n 和 utils 构建
1 parent c73b43f commit 02ef1d5

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Automatic generated by './build/build-entry.js' */
22

3-
import utils from './utils/index';
4-
import locale from './locale/index';
3+
import utils from 'fm-vue-ui/src/utils';
4+
import locale from 'fm-vue-ui/src/locale';
55

66
import Button from '../components/button/index.js';
77
import Dialog from '../components/dialog/index.js';
@@ -75,7 +75,7 @@ export {
7575
};
7676

7777
export default {
78-
version: '1.1.6',
78+
version: '2.0.0',
7979
install,
8080
Button,
8181
Dialog,

src/mixins/i18n.js

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
1-
import locale from 'main/locale/index.js';
1+
import locale from 'fm-vue-ui/src/locale/index.js';
22

33
export default {
4-
beforeCreate () {
5-
this.$ft = locale.t;
6-
this.$fl = locale.getLocale();
4+
computed: {
5+
$fl () {
6+
return locale.getLocale();
7+
}
8+
},
9+
10+
methods: {
11+
$ft (...args) {
12+
return locale.t.apply(this, args);
13+
}
714
}
815
};

0 commit comments

Comments
 (0)