refactor(system): 优化系统模块代码结构和功能

- 修改 MyMetaObjectHandler 中的时间处理方式,使用 Date 类型替代 Timestamp
- 新增 AnyQueryTool 工具类,提供通用的 MyBatis Plus 查询方法
- 优化 YamlEdit 组件,增加只读模式和默认高度设置
-修复 CuteDeptTree 组件中的数据获取方法名称
- 调整系统菜单组件中的输入框宽度
This commit is contained in:
2025-05-15 19:57:36 +08:00
parent facce307b6
commit a65d33716f
5 changed files with 90 additions and 32 deletions
@@ -1,7 +1,5 @@
<template>
<div class="json-editor">
<textarea ref="textarea" />
</div>
<textarea ref="textarea" />
</template>
<script>
@@ -18,7 +16,13 @@ export default {
},
height: {
type: String,
required: true
required: false,
default: '450px'
},
readOnly: {
type: Boolean,
required: false,
default: false
}
},
data() {
@@ -33,8 +37,8 @@ export default {
this.editor.setValue(this.value)
}
},
height(value) {
this.editor.setSize('auto', this.height)
height(newHeight) {
this.editor.setSize('auto', newHeight)
}
},
mounted() {
@@ -49,7 +53,10 @@ export default {
theme: 'idea'
})
this.editor.setSize('auto', this.height)
this.editor.setValue(this.value)
if (this.value) {
this.editor.setValue(this.value)
}
this.editor.setOption('readOnly', this.readOnly)
this.editor.on('change', cm => {
this.$emit('changed', cm.getValue())
this.$emit('input', cm.getValue())
@@ -62,20 +69,3 @@ export default {
}
}
</script>
<style scoped>
.json-editor{
height: 100%;
margin-bottom: 10px;
}
.json-editor >>> .CodeMirror {
font-size: 13px;
overflow-y:auto;
font-weight:normal
}
.json-editor >>> .CodeMirror-scroll{
}
.json-editor >>> .cm-s-rubyblue span.cm-string {
color: #F08047;
}
</style>