From 94ed4b77d693f118ad8c8e16d5d7e41eeb38647e Mon Sep 17 00:00:00 2001 From: "meilin.huang" <954537473@qq.com> Date: Fri, 22 Dec 2023 17:04:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mayfly_go_web/src/common/config.ts | 2 +- mayfly_go_web/src/theme/app.scss | 2 +- .../ops/db/component/table/ColumnFormItem.vue | 37 ++++++++++++------- .../ops/db/component/table/DbTableData.vue | 10 ++--- .../ops/db/component/table/DbTableDataOp.vue | 2 +- server/pkg/config/app.go | 2 +- 6 files changed, 30 insertions(+), 25 deletions(-) diff --git a/mayfly_go_web/src/common/config.ts b/mayfly_go_web/src/common/config.ts index 154df42c..3b5aac52 100644 --- a/mayfly_go_web/src/common/config.ts +++ b/mayfly_go_web/src/common/config.ts @@ -15,7 +15,7 @@ const config = { baseWsUrl: `${(window as any).globalConfig.BaseWsUrl || `${location.protocol == 'https:' ? 'wss:' : 'ws:'}//${getBaseApiUrl()}`}/api`, // 系统版本 - version: 'v1.6.1', + version: 'v1.6.2', }; export default config; diff --git a/mayfly_go_web/src/theme/app.scss b/mayfly_go_web/src/theme/app.scss index 7fc15c99..937157cf 100644 --- a/mayfly_go_web/src/theme/app.scss +++ b/mayfly_go_web/src/theme/app.scss @@ -237,7 +237,7 @@ body, } .color-success { - color: var(--el-color-success) !important; + color: var(--el-color-success); } .color-warning { diff --git a/mayfly_go_web/src/views/ops/db/component/table/ColumnFormItem.vue b/mayfly_go_web/src/views/ops/db/component/table/ColumnFormItem.vue index dc1e8788..c9cb069b 100644 --- a/mayfly_go_web/src/views/ops/db/component/table/ColumnFormItem.vue +++ b/mayfly_go_web/src/views/ops/db/component/table/ColumnFormItem.vue @@ -3,20 +3,20 @@ - + (), { const emit = defineEmits(['update:modelValue', 'blur']); -const itemValue: Ref = useVModel(props, 'modelValue', emit); +const itemValue: Ref = ref(props.modelValue); const showEditorIcon = computed(() => { return typeof itemValue.value === 'string' && itemValue.value.length > 50; @@ -119,13 +118,14 @@ const openEditor = () => { const closeEditorDialog = () => { editorOpening.value = false; - handlerBlur(); + handleBlur(); }; -const handlerBlur = () => { +const handleBlur = () => { if (editorOpening.value) { return; } + emit('update:modelValue', itemValue.value); emit('blur'); }; @@ -157,10 +157,19 @@ const getEditorLangByValue = (value: any) => { .string-input-container { position: relative; } +.string-input-container-show-icon { + .el-input__inner { + padding-right: 10px; + } +} .string-input-container-icon { position: absolute; top: 5px; /* 调整图标的垂直位置 */ - right: 5px; /* 调整图标的水平位置 */ + right: 3px; /* 调整图标的水平位置 */ + color: var(--el-color-primary); +} +.string-input-container-icon:hover { + color: var(--el-color-success); } .edit-time-picker { diff --git a/mayfly_go_web/src/views/ops/db/component/table/DbTableData.vue b/mayfly_go_web/src/views/ops/db/component/table/DbTableData.vue index 436f6950..fd212c48 100644 --- a/mayfly_go_web/src/views/ops/db/component/table/DbTableData.vue +++ b/mayfly_go_web/src/views/ops/db/component/table/DbTableData.vue @@ -657,6 +657,9 @@ const onEnterEditMode = (rowData: any, column: any, rowIndex = 0, columnIndex = }; const onExitEditMode = (rowData: any, column: any, rowIndex = 0) => { + if (!nowUpdateCell) { + return; + } const oldValue = nowUpdateCell.oldValue; const newValue = rowData[column.dataKey]; @@ -763,9 +766,6 @@ const rowClass = (row: any) => { if (isSelection(row.rowIndex)) { return 'data-selection'; } - if (row.rowIndex % 2 != 0) { - return 'data-spacing'; - } return ''; }; @@ -837,10 +837,6 @@ defineExpose({ background-color: var(--el-table-current-row-bg-color); } - .data-spacing { - background-color: var(--el-fill-color-lighter); - } - .update_field_active { background-color: var(--el-color-success-light-3); } diff --git a/mayfly_go_web/src/views/ops/db/component/table/DbTableDataOp.vue b/mayfly_go_web/src/views/ops/db/component/table/DbTableDataOp.vue index f088c4ca..e5bb47e2 100644 --- a/mayfly_go_web/src/views/ops/db/component/table/DbTableDataOp.vue +++ b/mayfly_go_web/src/views/ops/db/component/table/DbTableDataOp.vue @@ -94,7 +94,7 @@