mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-23 17:40:25 +08:00
feat: 1.前端组件升级 2.redis数据操作支持string,hash,set的新增修改
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
<el-aside id="sqlcontent" width="65%" style="background-color: rgb(238, 241, 246)">
|
||||
<div class="toolbar">
|
||||
<div class="fl">
|
||||
<!-- <el-button v-waves @click="runSql" type="success" icon="el-icon-video-play" size="mini" plain>执行</el-button>
|
||||
<!-- <el-button v-waves @click="runSql" type="success" icon="video-play" plain>执行</el-button>
|
||||
|
||||
<el-button v-waves @click="formatSql" type="primary" icon="el-icon-magic-stick" size="mini" plain>格式化</el-button> -->
|
||||
<el-button v-waves @click="formatSql" type="primary" icon="magic-stick" plain>格式化</el-button> -->
|
||||
|
||||
<el-upload
|
||||
style="display: inline-block; margin-left: 10px"
|
||||
@@ -43,7 +43,7 @@
|
||||
multiple
|
||||
:limit="100"
|
||||
>
|
||||
<el-button v-waves type="success" icon="el-icon-video-play" size="mini" plain>sql脚本执行</el-button>
|
||||
<el-button v-waves type="success" icon="video-play" plain>sql脚本执行</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
size="mini"
|
||||
class="mr10"
|
||||
>
|
||||
<el-option v-for="item in sqlNames" :key="item" :label="item.database" :value="item">
|
||||
@@ -63,8 +62,8 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<el-button v-waves @click="saveSql" type="primary" icon="el-icon-document-add" size="mini" plain>保存</el-button>
|
||||
<el-button v-waves @click="deleteSql" type="danger" icon="el-icon-delete" size="mini" plain>删除</el-button>
|
||||
<el-button v-waves @click="saveSql" type="primary" icon="document-add" plain>保存</el-button>
|
||||
<el-button v-waves @click="deleteSql" type="danger" icon="delete" plain>删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<codemirror
|
||||
@@ -77,13 +76,13 @@
|
||||
:options="cmOptions"
|
||||
/>
|
||||
<el-button-group :style="btnStyle">
|
||||
<el-button v-waves @click="runSql" type="success" icon="el-icon-video-play" size="small" plain>执行</el-button>
|
||||
<el-button v-waves @click="formatSql" type="primary" icon="el-icon-magic-stick" size="small" plain>格式化</el-button>
|
||||
<el-button v-waves @click="runSql" type="success" icon="video-play" size="small" plain>执行</el-button>
|
||||
<el-button v-waves @click="formatSql" type="primary" icon="magic-stick" size="small" plain>格式化</el-button>
|
||||
</el-button-group>
|
||||
</el-aside>
|
||||
|
||||
<el-container style="margin-left: 2px">
|
||||
<el-header style="text-align: left; height: 45px; font-size: 12px; padding: 0px">
|
||||
<el-header style="text-align: left; height: 35px; font-size: 12px; padding: 0px">
|
||||
<el-select v-model="tableName" placeholder="请选择表" @change="changeTable" filterable style="width: 99%">
|
||||
<el-option
|
||||
v-for="item in tableMetadata"
|
||||
@@ -96,7 +95,7 @@
|
||||
</el-header>
|
||||
|
||||
<el-main style="padding: 0px; overflow: hidden">
|
||||
<el-table :data="columnMetadata" height="100%" size="mini">
|
||||
<el-table :data="columnMetadata" height="100%">
|
||||
<el-table-column prop="columnName" label="名称" show-overflow-tooltip> </el-table-column>
|
||||
<el-table-column prop="columnComment" label="备注" show-overflow-tooltip> </el-table-column>
|
||||
<el-table-column width="120" prop="columnType" label="类型" show-overflow-tooltip> </el-table-column>
|
||||
@@ -105,7 +104,7 @@
|
||||
</el-container>
|
||||
</el-container>
|
||||
|
||||
<el-table style="margin-top: 1px" :data="execRes.data" size="mini" max-height="300" :empty-text="execRes.emptyResText" stripe border>
|
||||
<el-table style="margin-top: 1px" :data="execRes.data" max-height="300" :empty-text="execRes.emptyResText" stripe border size="small">
|
||||
<el-table-column
|
||||
min-width="100"
|
||||
:width="flexColumnWidth(item, execRes.data)"
|
||||
@@ -514,8 +513,8 @@ export default defineComponent({
|
||||
if (temp) {
|
||||
state.btnStyle.display = 'block';
|
||||
if (!state.btnStyle.left) {
|
||||
state.btnStyle.left = e.target.getBoundingClientRect().left - 100 + 'px';
|
||||
state.btnStyle.top = e.target.getBoundingClientRect().top - 20 + 'px';
|
||||
state.btnStyle.left = e.target.getBoundingClientRect().left - 150 + 'px';
|
||||
state.btnStyle.top = e.target.getBoundingClientRect().top - 60 + 'px';
|
||||
}
|
||||
} else {
|
||||
state.btnStyle.display = 'none';
|
||||
@@ -553,6 +552,7 @@ export default defineComponent({
|
||||
<style scoped lang="scss">
|
||||
.codesql {
|
||||
font-size: 10pt;
|
||||
font-weight: 600;
|
||||
font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;
|
||||
}
|
||||
#sqlcontent {
|
||||
|
||||
Reference in New Issue
Block a user