fix(项目设置): 修复环境设置预览csv报错的缺陷
--bug=1020169 --user=王孝刚 【项目管理】项目环境变量中添加csv变量,无法预览 https://www.tapd.cn/55049933/s/1302967
This commit is contained in:
parent
601c5d051a
commit
7d88a7fb87
|
@ -1,41 +1,43 @@
|
||||||
import "./public-path"
|
import "./public-path";
|
||||||
import Vue from "vue"
|
import Vue from "vue";
|
||||||
import "metersphere-frontend/src/styles/index.scss"
|
import "metersphere-frontend/src/styles/index.scss";
|
||||||
import ElementUI from "element-ui";
|
import ElementUI from "element-ui";
|
||||||
import App from "./App.vue"
|
import App from "./App.vue";
|
||||||
import i18n from "./i18n";
|
import i18n from "./i18n";
|
||||||
import router from "./router"
|
import router from "./router";
|
||||||
import {createPinia, PiniaVuePlugin} from 'pinia'
|
import { createPinia, PiniaVuePlugin } from "pinia";
|
||||||
import PersistedState from 'pinia-plugin-persistedstate'
|
import PersistedState from "pinia-plugin-persistedstate";
|
||||||
import icons from "metersphere-frontend/src/icons"
|
import icons from "metersphere-frontend/src/icons";
|
||||||
import svg from "metersphere-frontend/src/components/svg";
|
import svg from "metersphere-frontend/src/components/svg";
|
||||||
import plugins from "metersphere-frontend/src/plugins";
|
import plugins from "metersphere-frontend/src/plugins";
|
||||||
import directives from "metersphere-frontend/src/directive";
|
import directives from "metersphere-frontend/src/directive";
|
||||||
import filters from "metersphere-frontend/src/filters";
|
import filters from "metersphere-frontend/src/filters";
|
||||||
import "metersphere-frontend/src/router/permission";
|
import "metersphere-frontend/src/router/permission";
|
||||||
import mavonEditor from 'mavon-editor'
|
import mavonEditor from "mavon-editor";
|
||||||
import 'mavon-editor/dist/css/index.css'
|
import "mavon-editor/dist/css/index.css";
|
||||||
Vue.config.productionTip = false
|
import VuePapaParse from "vue-papa-parse";
|
||||||
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
const pinia = createPinia()
|
const pinia = createPinia();
|
||||||
pinia.use(PersistedState)//开启缓存,存储在localstorage
|
pinia.use(PersistedState); //开启缓存,存储在localstorage
|
||||||
|
|
||||||
Vue.use(ElementUI, {
|
Vue.use(ElementUI, {
|
||||||
i18n: (key, value) => i18n.t(key, value)
|
i18n: (key, value) => i18n.t(key, value),
|
||||||
});
|
});
|
||||||
|
|
||||||
Vue.use(mavonEditor)
|
Vue.use(mavonEditor);
|
||||||
Vue.use(svg);
|
Vue.use(svg);
|
||||||
Vue.use(icons);
|
Vue.use(icons);
|
||||||
Vue.use(plugins);
|
Vue.use(plugins);
|
||||||
Vue.use(directives);
|
Vue.use(directives);
|
||||||
Vue.use(filters);
|
Vue.use(filters);
|
||||||
Vue.use(PiniaVuePlugin);
|
Vue.use(PiniaVuePlugin);
|
||||||
|
Vue.use(VuePapaParse);
|
||||||
|
|
||||||
let instance = null;
|
let instance = null;
|
||||||
|
|
||||||
function render(props = {}) {
|
function render(props = {}) {
|
||||||
const {container, eventBus = new Vue()} = props;
|
const { container, eventBus = new Vue() } = props;
|
||||||
// 添加全局事件总线
|
// 添加全局事件总线
|
||||||
Vue.prototype.$EventBus = eventBus;
|
Vue.prototype.$EventBus = eventBus;
|
||||||
|
|
||||||
|
@ -43,8 +45,8 @@ function render(props = {}) {
|
||||||
i18n,
|
i18n,
|
||||||
router,
|
router,
|
||||||
pinia,
|
pinia,
|
||||||
render: h => h(App),
|
render: (h) => h(App),
|
||||||
}).$mount(container ? container.querySelector('#app') : '#app');
|
}).$mount(container ? container.querySelector("#app") : "#app");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 独立运行时
|
// 独立运行时
|
||||||
|
@ -69,7 +71,7 @@ export async function mount(props) {
|
||||||
// console.log('state: 变更后的状态; prev 变更前的状态')
|
// console.log('state: 变更后的状态; prev 变更前的状态')
|
||||||
// console.log(state, prev);
|
// console.log(state, prev);
|
||||||
});
|
});
|
||||||
props.setGlobalState({event: 'opendialog'});
|
props.setGlobalState({ event: "opendialog" });
|
||||||
render(props);
|
render(props);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue