diff --git a/.env.test b/.env.test index 85e2cf54..0793af25 100644 --- a/.env.test +++ b/.env.test @@ -25,7 +25,7 @@ VITE_DROP_CONSOLE=false VITE_SOURCEMAP=true # 打包路径 -VITE_BASE_PATH=/dist-test/ +VITE_BASE_PATH=/ # 输出路径 VITE_OUT_DIR=dist-test diff --git a/src/components/bpmnProcessDesigner/package/index.ts b/src/components/bpmnProcessDesigner/package/index.ts index 23c77346..ce44a3c5 100644 --- a/src/components/bpmnProcessDesigner/package/index.ts +++ b/src/components/bpmnProcessDesigner/package/index.ts @@ -1,37 +1,11 @@ -import { App } from 'vue' import MyProcessDesigner from './designer' import MyProcessPenal from './penal' import MyProcessViewer from './designer/index2' -const components = [MyProcessDesigner, MyProcessPenal, MyProcessViewer] +import './theme/index.scss' +import 'bpmn-js/dist/assets/diagram-js.css' +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css' +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css' +import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css' -// const install = function (Vue) { -// components.forEach(component => { -// Vue.component(component.name, component) -// }) -// } - -// if (typeof window !== "undefined" && window.Vue) { -// install(window.Vue) -// } -// components.forEach(component => { -// Vue.component(component.name, component) -// }) -const componentss = { - install: (Vue: App): void => { - components.forEach((component) => { - Vue.component(component.name, component) - }) - } -} -// let version = "0.0.1" -export const MyPD = (app) => { - // export default { - // app.use(version) - // app.use(install) - // app.use(MyProcessDesigner) - // app.use(MyProcessPenal) - // app.use(MyProcessViewer) - // app.use(components) - app.use(componentss) -} +export { MyProcessDesigner, MyProcessPenal, MyProcessViewer } diff --git a/src/main.ts b/src/main.ts index 0fc15c2c..fc67552f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -37,13 +37,6 @@ import App from './App.vue' import './permission' -import { MyPD } from '@/components/bpmnProcessDesigner/package/index.js' -import '@/components/bpmnProcessDesigner/package/theme/index.scss' -import 'bpmn-js/dist/assets/diagram-js.css' -import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css' -import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css' -import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css' - import hljs from 'highlight.js' //导入代码高亮文件 import 'highlight.js/styles/github.css' //导入代码高亮样式 新版 @@ -65,8 +58,6 @@ const setupAll = async () => { await setupI18n(app) - MyPD(app) - setupStore(app) setupGlobCom(app) diff --git a/src/views/bpm/definition/index.vue b/src/views/bpm/definition/index.vue index ae260b45..c18e9a92 100644 --- a/src/views/bpm/definition/index.vue +++ b/src/views/bpm/definition/index.vue @@ -84,7 +84,7 @@ - import { DICT_TYPE } from '@/utils/dict' import { dateFormatter } from '@/utils/formatTime' +import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package' import * as DefinitionApi from '@/api/bpm/definition' import { setConfAndFields2 } from '@/utils/formCreate' const { push } = useRouter() // 路由 diff --git a/src/views/bpm/model/editor/index.vue b/src/views/bpm/model/editor/index.vue index 9eade1ad..24908ae5 100644 --- a/src/views/bpm/model/editor/index.vue +++ b/src/views/bpm/model/editor/index.vue @@ -1,7 +1,7 @@