绘制稳态事件配置页面

This commit is contained in:
guanj
2026-04-17 08:49:22 +08:00
parent 01a28d88f3
commit 99bc99a6fc
4 changed files with 483 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div :style="{ width: menuCollapse ? '40px' : props.width }" style="transition: all 0.3s; overflow: hidden">
<div class="mt10 mr10" style="display: flex; justify-content: end">
<div class="mt10 mr10" style="display: flex; justify-content: end" v-if="showBut">
<el-button type="primary" icon="el-icon-Select" @click="save" :loading="loading">保存</el-button>
</div>
<Icon
@@ -14,7 +14,7 @@
/>
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
<div style="display: flex; align-items: center" class="mb10">
<el-input maxlength="32" v-model.trim="filterText" placeholder="请输入内容" clearable>
<el-input maxlength="32" v-model.trim="filterText" placeholder="请输入内容" clearable>
<template #prefix>
<Icon name="el-icon-Search" style="font-size: 16px" />
</template>
@@ -39,7 +39,7 @@
</div>
<el-tree
:style="{ height: 'calc(100vh - 267px)' }"
:style="{ height: `calc(100vh - ${height}px)` }"
style="overflow: auto"
ref="treeRef"
:props="defaultProps"
@@ -69,9 +69,9 @@
<script lang="ts" setup>
import useCurrentInstance from '@/utils/useCurrentInstance'
import { ElTree } from 'element-plus'
import { emit } from 'process'
import { ref, watch } from 'vue'
import { t } from 'vxe-table'
import { useConfig } from '@/stores/config'
defineOptions({
@@ -82,12 +82,16 @@ interface Props {
width?: string
canExpand?: boolean
showPush?: boolean
showBut?: boolean
height?: number
}
const loading = ref(false)
const props = withDefaults(defineProps<Props>(), {
width: '280px',
canExpand: true,
showPush: false
showPush: false,
showBut: true,
height: 267
})
const config = useConfig()
const { proxy } = useCurrentInstance()
@@ -183,7 +187,5 @@ defineExpose({ treeRef, loading })
.custom-tree-node {
display: flex;
align-items: center;
}
</style>