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 1ef9e006..37da0d2b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -40,13 +40,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' //导入代码高亮样式 新版 @@ -66,8 +59,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 f2ef640c..f6df8564 100644 --- a/src/views/bpm/definition/index.vue +++ b/src/views/bpm/definition/index.vue @@ -49,7 +49,7 @@ - - // 全局相关的 import import { DICT_TYPE, getDictOptions } from '@/utils/dict' +import { MyProcessViewer } from '@/components/bpmnProcessDesigner/package' import { FormInstance, UploadInstance } from 'element-plus' // 业务相关的 import diff --git a/src/views/bpm/model/modelEditor.vue b/src/views/bpm/model/modelEditor.vue index 43836976..5cfbd264 100644 --- a/src/views/bpm/model/modelEditor.vue +++ b/src/views/bpm/model/modelEditor.vue @@ -2,7 +2,7 @@
- -