PicList/src/main.ts

50 lines
1.2 KiB
TypeScript
Raw Normal View History

2017-11-27 19:21:12 -05:00
import Vue from 'vue'
2019-12-19 06:17:21 -05:00
import App from './renderer/App.vue'
import router from './renderer/router'
2017-11-27 19:21:12 -05:00
import ElementUI from 'element-ui'
import { webFrame } from 'electron'
2019-12-19 06:17:21 -05:00
import 'element-ui/lib/theme-chalk/index.css'
2018-06-26 09:11:04 -04:00
import VueLazyLoad from 'vue-lazyload'
import axios from 'axios'
import mainMixin from './renderer/utils/mainMixin'
import bus from '@/utils/bus'
2021-04-10 09:01:55 -04:00
import { initTalkingData } from './renderer/utils/analytics'
import db from './renderer/utils/db'
2022-08-20 04:44:55 -04:00
// import { T, i18n } from '#/i18n/index'
// import { handleURLParams } from '@/utils/beforeOpen'
import { i18nManager, T } from './renderer/i18n/index'
2018-06-26 09:11:04 -04:00
webFrame.setVisualZoomLevelLimits(1, 1)
2022-02-20 08:30:22 -05:00
// do here before vue init
2022-08-20 04:44:55 -04:00
// handleURLParams()
2022-02-20 08:30:22 -05:00
2019-12-19 06:17:21 -05:00
Vue.config.productionTip = false
2018-12-23 10:15:00 -05:00
Vue.prototype.$builtInPicBed = [
'smms',
'imgur',
'qiniu',
'tcyun',
'upyun',
'aliyun',
'github'
]
Vue.prototype.$$db = db
Vue.prototype.$http = axios
Vue.prototype.$bus = bus
Vue.prototype.$T = T
2022-08-20 04:44:55 -04:00
Vue.prototype.$i18n = i18nManager
2019-12-19 06:17:21 -05:00
Vue.use(ElementUI)
Vue.use(VueLazyLoad, {
error: `file://${__static.replace(/\\/g, '/')}/unknown-file-type.svg`
})
Vue.mixin(mainMixin)
2017-11-27 19:21:12 -05:00
new Vue({
router,
2019-12-19 06:17:21 -05:00
render: h => h(App)
2017-11-27 19:21:12 -05:00
}).$mount('#app')
2021-04-10 09:01:55 -04:00
initTalkingData()