Files
cutejava/cutejava-front/src/views/components/dev/CuteFormDrawer.vue
T
odboy b8a5fe4157 refactor(redis): 重命名 RedisHelper 为 CsRedisHelper
重命名 RedisHelper 类为 CsRedisHelper,以更好地反映其作为框架组件的性质。同时更新了相关引用和文件名。

- 修改了 RedisHelper.java 文件名和类名为 CsRedisHelper
- 更新了 PipelineInstanceDAO、SystemAuthController、SystemUserInfoDAO 等多个类中的 RedisHelper 引用
-调整了 ExecutionJobBean 中 RedisHelper 的使用
2025-07-31 20:14:44 +08:00

93 lines
1.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<el-drawer
:title="title"
:visible.sync="visible"
:size="width"
:before-close="beforeClose"
:append-to-body="true"
:close-on-press-escape="false"
:destroy-on-close="true"
:show-close="false"
:modal="false"
>
<div class="container-form">
<el-form ref="form" :model="form.model" :rules="form.rules">
<!-- 这里是插槽,用于渲染传入的 el-form-item -->
<slot />
</el-form>
</div>
<el-divider />
<div class="dialog-footer" style="padding-right: 30px;text-align: right">
<el-button type="danger" @click="hidden">取 消</el-button>
<el-button type="primary" @click="submitForm('form')">提 交</el-button>
</div>
</el-drawer>
</template>
<script>
export default {
name: 'CuteFormDrawer',
props: {
title: {
type: String,
required: true,
default: '默认标题'
},
width: {
type: String,
required: false,
default: '40%'
},
form: {
type: Object,
required: true,
default: null
}
},
data() {
return {
visible: false
}
},
methods: {
show() {
this.visible = true
},
hidden() {
this.resetForm('form')
this.visible = false
},
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.$emit('submit', this.form.model)
} else {
return false
}
})
},
resetForm(formName) {
this.$refs[formName].resetFields()
},
beforeClose() {
this.hidden()
}
}
}
</script>
<style scoped>
.container-form {
overflow-y: scroll; /* 启用滚动 */
scrollbar-width: none; /* Firefox */
height: 88%;
padding-right: 20px;
-ms-overflow-style: none; /* Internet Explorer 10+ */
}
.container-form::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera*/
}
</style>