talk_appAmin/main.js

31 lines
1.0 KiB
JavaScript

import { createSSRApp } from 'vue'
import App from './App'
import store from './store' // store
import { install } from './plugins' // plugins
import './permission.js' // permission
import iconConfig from './utils/icon/icon.js'
import { getDictLabelByValue } from '@/utils/dict'
// main.js
import uviewPlus from 'uview-plus'
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
export function createApp() {
const app = createSSRApp(App)
app.config.globalProperties.iconConfig = iconConfig
app.config.globalProperties.getDictLabelByValue = getDictLabelByValue
app.config.globalProperties.parseTime = parseTime
app.config.globalProperties.resetForm = resetForm
app.config.globalProperties.handleTree = handleTree
app.config.globalProperties.addDateRange = addDateRange
app.config.globalProperties.selectDictLabel = selectDictLabel
app.config.globalProperties.selectDictLabels = selectDictLabels
app.use(uviewPlus)
app.use(store)
// app.use(uView)
install(app)
return {
app
}
}