08335 / hivui-platform-template
hivui平台项目模板
Newer
Older
hivui-platform-template / project / demo / index.js
caibinghong on 2 Sep 2021 add
// vite 预览开发情况下排除,改引用全局
// if(import.meta.env.MODE=="production"){
// //   alert(1)
//   // import Vue from 'vue';
//   // import ELEMENT from 'element-ui';
//   // import "element-ui/lib/theme-chalk/index.css";
//   // Vue.use(ELEMENT)
// }else{
//   alert(2)
// }


import App from './App.vue'
import "hi-ui/lib/hi-ui.css"; 
import {HiDataSetContainer,HiPage} from 'hi-ui'
Vue.use(ELEMENT, {
  size: 'mini'
}) 
let hiSetting = HIVUI_SETTING;
let DataSet = HiDataSetContainer;//vite才识别
Vue.prototype.$dsContainer = new DataSet({
  request: hiSetting.request,
  saveUrl: hiSetting.saveUrl,
  queryUrl: hiSetting.queryUrl,
  datasetUrl: hiSetting.datasetUrl,
  policyUrl: hiSetting.policyUrl,
  cacheKeyPrefix: function () {
    return window.location.hash + "/";
  }
}); 
Vue.config.productionTip = false;
new Vue({
  extends:HiPage,
  render: h => h(App),
}).$mount('#app')

// console.log("import.meta.env", import.meta.env)
// var baseURL = import.meta.env.VITE_APP_BASE_API||process.env.VITE_APP_BASE_API;