gaoluyang
8 天以前 adeb8b768926ed50a3fb0857f366d6a0308d2cc0
src/main.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,48 @@
import App from './App.vue'
import plugins from './plugins'
import store from './store'
import uviewPlus from 'uview-plus'
import { setupGlobalComponents } from './components'
import { createSSRApp } from 'vue'
import directive from './directive' // directive
import { useDict } from '@/utils/dict'
import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
import {
  calculateTaxExclusiveTotalPrice,
} from "@/utils/summarizeTable.js";
export function createApp() {
  const app = createSSRApp(App)
  app.use(store)
  app.use(uviewPlus)
  app.use(plugins)
  // ç§»é™¤ä»¥ä¸‹è¡Œ Vant æ³¨å†Œ
  // app.use(Vant)
  // æ³¨å†Œå…¨å±€ç»„ä»¶
  setupGlobalComponents(app)
  // #ifndef MP-WEIXIN
  // å¾®ä¿¡å°ç¨‹åºä¸­ä¸æ”¯æŒè‡ªå®šä¹‰æŒ‡ä»¤
  directive(app)
  // #endif
  // å…¨å±€æ–¹æ³•挂载
  app.config.globalProperties.useDict = useDict
  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.config.globalProperties.calculateTaxExclusiveTotalPrice = calculateTaxExclusiveTotalPrice;
  return {
    app
  }
}