Files
cutejava/cutejava-front/src/views/components/dev/CutePreviewDrawer.vue
T
odboy 89d58a4e5f fix(module-system): 修复用户查询相关问题
- 在用户查询 SQL 中添加 enabled = 1 条件,只返回启用的用户
- 调整前端组件的高度计算方式
- 修复 CuteYamlEditor 组件的 change 事件
- 更新 CuteSimpleTableDemo 和 CuteYamlEditorDemo 的示例
2025-08-04 19:49:10 +08:00

66 lines
1.1 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"
>
<!-- 这里是插槽,用于渲染传入的组件 -->
<slot />
</el-drawer>
</template>
<script>
export default {
name: 'CutePreviewDrawer',
props: {
title: {
type: String,
required: true,
default: '默认标题'
},
width: {
type: String,
required: false,
default: '40%'
}
},
data() {
return {
visible: false
}
},
methods: {
show() {
this.visible = true
},
hidden() {
this.visible = false
},
beforeClose() {
this.hidden()
}
}
}
</script>
<style scoped>
.container-form {
overflow-y: scroll; /* 启用滚动 */
scrollbar-width: none; /* Firefox */
height: 85%;
padding-right: 20px;
-ms-overflow-style: none; /* Internet Explorer 10+ */
}
.container-form::-webkit-scrollbar {
display: none; /* Chrome, Safari, Opera*/
}
</style>