From 97eddf7c1dc55394d410a203a27e90622f0244ce Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Mon, 03 Jul 2023 16:21:38 +0800
Subject: [PATCH] 数值显示组件,优化显示排列

---
 layout/numerical/CNumerical.vue |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/layout/numerical/CNumerical.vue b/layout/numerical/CNumerical.vue
index 79284a0..bcc4016 100644
--- a/layout/numerical/CNumerical.vue
+++ b/layout/numerical/CNumerical.vue
@@ -52,10 +52,14 @@
                 if (surplus === 0) {
                     return 4;
                 } else if (surplus === 1) {
-                    if (index === this.values.length - 1) {
+                    if (this.values.length === 1) {
                         return 12;
                     } else {
-                        return 4;
+                        if (index >= this.values.length - 4) {
+                            return 6;
+                        } else {
+                            return 4;
+                        }
                     }
                 } else if (surplus === 2) {
                     if (index >= this.values.length - 2) {

--
Gitblit v1.9.1