| | |
| | | import router from './router' |
| | | import store from './store' |
| | | |
| | | import cookies from 'vue-cookies' |
| | | Vue.prototype.$cookies = cookies; |
| | | |
| | | import ElementUI from 'element-ui'; |
| | | |
| | | Vue.use(ElementUI) |
| | | |
| | | Vue.config.productionTip = false |
| | | Vue.filter('formatNumber', (num) => { |
| | | if (num != 0 && num < 1000) { |
| | | return num + '.0' |
| | | } |
| | | if (num && num >= 1000) { |
| | | if (num.toString().split('.').length == 1) { |
| | | return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + ".0" |
| | | } |
| | | return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); |
| | | } |
| | | return num || 0 |
| | | }) |
| | | |
| | | |
| | | new Vue({ |
| | | router, |