测试组件
This commit is contained in:
+2
-2
@@ -16,12 +16,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "2.3.1",
|
||||
"@qomo-platform/core": "^1.0.94",
|
||||
"@qomo-platform/core": "^1.0.100",
|
||||
"@vueup/vue-quill": "1.2.0",
|
||||
"@vueuse/core": "10.6.1",
|
||||
"axios": "1.6.7",
|
||||
"echarts": "^5.5.0",
|
||||
"element-plus": "2.4.3",
|
||||
"element-plus": "2.7.3",
|
||||
"file-saver": "2.0.5",
|
||||
"js-cookie": "3.0.5",
|
||||
"jsencrypt": "3.3.2",
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
<script lang="tsx">
|
||||
import {
|
||||
computed,
|
||||
defineComponent,
|
||||
ref,
|
||||
onMounted,
|
||||
watchEffect,
|
||||
watch
|
||||
} from "vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "dbOutput",
|
||||
props:{
|
||||
nodeDetail:{
|
||||
type:Object
|
||||
}
|
||||
},
|
||||
setup(props, { attrs, expose, slots = {} }) {
|
||||
const formInline = reactive({});
|
||||
|
||||
const submit = ()=>{
|
||||
let param = formInline;
|
||||
|
||||
|
||||
return param
|
||||
}
|
||||
|
||||
expose({
|
||||
submit
|
||||
})
|
||||
return () => (
|
||||
<el-form label-width="auto" v-model={formInline}>
|
||||
<el-form-item label="Name">
|
||||
<el-input v-model={formInline.name} />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity zone">
|
||||
<el-input v-model={formInline.region} />
|
||||
</el-form-item>
|
||||
<el-form-item label="Activity form">
|
||||
<el-input v-model={formInline.type} />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
@@ -0,0 +1,20 @@
|
||||
import { App, defineAsyncComponent } from "vue";
|
||||
import { getComponentNameByPath } from "@qomo-platform/core";
|
||||
|
||||
//组件
|
||||
const components = Object.assign(
|
||||
{},
|
||||
import.meta.glob("/src/flowableComponents/**/*.(vue|tsx|jsx)")
|
||||
);
|
||||
|
||||
const FlowableComponents = {
|
||||
install(app: App) {
|
||||
Object.entries(components).map(([componentPath, component]) =>
|
||||
app.component(
|
||||
getComponentNameByPath(componentPath),
|
||||
defineAsyncComponent(component)
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
export default FlowableComponents;
|
||||
+2
-1
@@ -27,7 +27,7 @@ import {
|
||||
import "virtual:svg-icons-register";
|
||||
import usePermissionStore from "@/store/modules/permission";
|
||||
import "@/assets/styles/global.css";
|
||||
|
||||
import FlowableComponents from "@/flowableComponents/index.ts"
|
||||
let app;
|
||||
|
||||
function render(props = {}) {
|
||||
@@ -47,6 +47,7 @@ function render(props = {}) {
|
||||
app.use(plugins);
|
||||
|
||||
app.use(QomoPlatform, qomoPlatformOptions);
|
||||
app.use(FlowableComponents);
|
||||
directive(app);
|
||||
|
||||
// 使用element-plus 并且设置全局的大小
|
||||
|
||||
+21
-14
@@ -19,13 +19,11 @@ export default defineComponent({
|
||||
setup(props, { attrs, expose, slots = {} }) {
|
||||
const { dialogRef, ...exposeDialogArgs } = useExposeDialogArgs();
|
||||
|
||||
return () => <BaseFlowableOptions
|
||||
leftTreeRequest={async()=>{
|
||||
return {
|
||||
"success": true,
|
||||
"message": "操作成功",
|
||||
"code": 200,
|
||||
"result": [
|
||||
return () =>
|
||||
<div style='height:600px'>
|
||||
<BaseFlowableOptions
|
||||
leftTreeRequest={async () => {
|
||||
return [
|
||||
{
|
||||
"id": 54,
|
||||
"name": "通用组件",
|
||||
@@ -1229,17 +1227,26 @@ export default defineComponent({
|
||||
],
|
||||
"componentCategoryList": null
|
||||
}
|
||||
],
|
||||
"timestamp": 1718264601506
|
||||
}
|
||||
];
|
||||
}}
|
||||
saveRequest={async(data)=>{
|
||||
console.log(data)
|
||||
saveRequest={async data => {
|
||||
//await saveMode(data);
|
||||
}}
|
||||
runRequest={async(data)=>{
|
||||
alert(2)
|
||||
runRequest={async data => {
|
||||
alert('运行');
|
||||
}}
|
||||
customTabs={{
|
||||
dbOutput: (data) => (
|
||||
<>
|
||||
<ElTabPane label="节点信息22" name="jdxx">
|
||||
<div class="node_options">{JSON.stringify(data)}</div>
|
||||
</ElTabPane>
|
||||
</>
|
||||
)
|
||||
}}
|
||||
></BaseFlowableOptions>;
|
||||
</div>
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user