From 71dbda01dad22dbf9434164e7b56166af378f77c Mon Sep 17 00:00:00 2001
From: Lykin <137850705+tiny-craft@users.noreply.github.com>
Date: Sat, 27 Jul 2024 22:20:27 +0800
Subject: [PATCH] pref: support text alignment config for HASH/LIST/SET/ZSET
(#264)
---
.../content_value/ContentValueHash.vue | 20 ++++++++++---------
.../content_value/ContentValueList.vue | 20 ++++++++++---------
.../content_value/ContentValueSet.vue | 20 ++++++++++---------
.../content_value/ContentValueZSet.vue | 20 ++++++++++---------
go.mod | 8 ++++----
go.sum | 20 +++++++++----------
6 files changed, 58 insertions(+), 50 deletions(-)
diff --git a/frontend/src/components/content_value/ContentValueHash.vue b/frontend/src/components/content_value/ContentValueHash.vue
index c7f9b9c..7058d4a 100644
--- a/frontend/src/components/content_value/ContentValueHash.vue
+++ b/frontend/src/components/content_value/ContentValueHash.vue
@@ -269,7 +269,7 @@ const columns = computed(() => {
key: 'no',
title: '#',
width: 80,
- align: props.textAlign !== TextAlignType.Left ? 'center' : 'left',
+ align: 'center',
titleAlign: 'center',
render: (row, index) => {
return index + 1
@@ -285,7 +285,7 @@ const columns = computed(() => {
key: 'no',
title: '#',
width: 80,
- align: props.textAlign !== TextAlignType.Left ? 'center' : 'left',
+ align: 'center',
titleAlign: 'center',
render: (row, index) => {
if (index + 1 === currentEditRow.no) {
@@ -367,6 +367,15 @@ defineExpose({
@match-changed="onMatchInput" />
+ emit('update:textAlign', val)" />
+
{{ $t('interface.memory_usage') }}: {{ formatBytes(props.size) }}
- emit('update:textAlign', val)" />
{
key: 'no',
title: '#',
width: 80,
- align: props.textAlign !== TextAlignType.Left ? 'center' : 'left',
+ align: 'center',
titleAlign: 'center',
render: (row, index) => {
return index + 1
@@ -234,7 +234,7 @@ const columns = computed(() => {
key: 'no',
title: '#',
width: 80,
- align: props.textAlign !== TextAlignType.Left ? 'center' : 'left',
+ align: 'center',
titleAlign: 'center',
render: (row, index) => {
if (index + 1 === currentEditRow.no) {
@@ -316,6 +316,15 @@ defineExpose({
@match-changed="onMatchInput" />
+ emit('update:textAlign', val)" />
+
{{ $t('interface.memory_usage') }}: {{ formatBytes(props.size) }}
- emit('update:textAlign', val)" />
{
key: 'no',
title: '#',
width: 80,
- align: props.textAlign !== TextAlignType.Left ? 'center' : 'left',
+ align: 'center',
titleAlign: 'center',
render: (row, index) => {
return index + 1
@@ -231,7 +231,7 @@ const columns = computed(() => {
key: 'no',
title: '#',
width: 80,
- align: props.textAlign !== TextAlignType.Left ? 'center' : 'left',
+ align: 'center',
titleAlign: 'center',
render: (row, index) => {
if (index + 1 === currentEditRow.no) {
@@ -313,6 +313,15 @@ defineExpose({
@match-changed="onMatchInput" />
+ emit('update:textAlign', val)" />
+
{{ $t('interface.memory_usage') }}: {{ formatBytes(props.size) }}
- emit('update:textAlign', val)" />
{
key: 'no',
title: '#',
width: 80,
- align: props.textAlign !== TextAlignType.Left ? 'center' : 'left',
+ align: 'center',
titleAlign: 'center',
render: (row, index) => {
return index + 1
@@ -277,7 +277,7 @@ const columns = computed(() => {
key: 'no',
title: '#',
width: 80,
- align: props.textAlign !== TextAlignType.Left ? 'center' : 'left',
+ align: 'center',
titleAlign: 'center',
render: (row, index) => {
if (index + 1 === currentEditRow.no) {
@@ -348,6 +348,15 @@ defineExpose({
@match-changed="onMatchInput" />
+ emit('update:textAlign', val)" />
+
{{ $t('interface.memory_usage') }}: {{ formatBytes(props.size) }}
- emit('update:textAlign', val)" />