From d1cd5af5adb53e91efdd278328e1b6f8ad834fb5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 06 二月 2025 21:11:56 +0800
Subject: [PATCH] Merge branch 'positec' into dms

---
 src/menu/components/form/dragtitle/options.jsx |   77 ++++++++++++++++++++++++++------------
 1 files changed, 52 insertions(+), 25 deletions(-)

diff --git a/src/menu/components/form/dragtitle/options.jsx b/src/menu/components/form/dragtitle/options.jsx
index b367eab..80097ad 100644
--- a/src/menu/components/form/dragtitle/options.jsx
+++ b/src/menu/components/form/dragtitle/options.jsx
@@ -7,16 +7,28 @@
 
   if (appType === 'mob') {
     group.fields.forEach(f => {
-      if (f.field && ['select', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
-        fields.push(f)
+      if (f.field && ['select', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
+        fields.push({...f, label: `${f.label}锛�${f.field}锛塦})
       }
     })
   } else {
     group.fields.forEach(f => {
-      if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
-        fields.push(f)
+      if (f.field && ['select', 'link', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') {
+        fields.push({...f, label: `${f.label}锛�${f.field}锛塦})
       }
     })
+  }
+
+  let buttons = []
+
+  if (group.prevButton && group.prevButton.enable === 'true') {
+    buttons.push('prevEnable')
+  }
+  if (!group.subButton.enable || group.subButton.enable === 'true') {
+    buttons.push('subEnable')
+  }
+  if (group.nextButton && group.nextButton.enable === 'true') {
+    buttons.push('nextEnable')
   }
 
   const groupForm = [
@@ -39,7 +51,7 @@
     {
       type: 'select',
       field: 'focus',
-      label: '鐒︾偣',
+      label: '鍒濆鐒︾偣',
       initval: group.setting.focus || '',
       required: false,
       options: fields
@@ -83,18 +95,32 @@
       forbid: appType === 'mob'
     },
     {
-      type: 'radio',
-      field: 'prevEnable',
-      label: '涓婁竴姝�',
-      initval: group.prevButton ? group.prevButton.enable || 'false' : 'false',
-      tooltip: '绗竴缁勪笉鏄剧ず銆�',
+      type: 'checkbox',
+      field: 'buttons',
+      label: '鎸夐挳缁�',
+      initval: buttons,
+      tooltip: '涓婁竴姝ュ湪绗竴缁勪腑涓嶆樉绀猴紝璺宠繃鍦ㄦ渶鍚庝竴缁勪笉鏄剧ず锛屾敞锛氶櫎鍏抽棴鍔熻兘澶栥��',
       required: false,
       options: [
-        {value: 'true', label: '鏄剧ず'},
-        {value: 'false', label: '闅愯棌'},
+        {value: 'prevEnable', label: '涓婁竴姝�'},
+        {value: 'subEnable', label: '鎻愪氦'},
+        {value: 'nextEnable', label: '璺宠繃'},
       ],
       forbid: !group.prevButton
     },
+    // {
+    //   type: 'radio',
+    //   field: 'prevEnable',
+    //   label: '涓婁竴姝�',
+    //   initval: group.prevButton ? group.prevButton.enable || 'false' : 'false',
+    //   tooltip: '绗竴缁勪笉鏄剧ず銆傛敞锛氶櫎鍏抽棴鍔熻兘澶栥��',
+    //   required: false,
+    //   options: [
+    //     {value: 'true', label: '鏄剧ず'},
+    //     {value: 'false', label: '闅愯棌'},
+    //   ],
+    //   forbid: !group.prevButton
+    // },
     {
       type: 'radio',
       field: 'subEnable',
@@ -104,21 +130,22 @@
       options: [
         {value: 'true', label: '鏄剧ず'},
         {value: 'false', label: '闅愯棌'},
-      ]
-    },
-    {
-      type: 'radio',
-      field: 'nextEnable',
-      label: '璺宠繃',
-      initval: group.nextButton ? group.nextButton.enable || 'false' : 'false',
-      tooltip: '鏈�鍚庝竴缁勪笉鏄剧ず銆�',
-      required: false,
-      options: [
-        {value: 'true', label: '鏄剧ず'},
-        {value: 'false', label: '闅愯棌'},
       ],
-      forbid: !group.nextButton
+      forbid: !!group.prevButton
     },
+    // {
+    //   type: 'radio',
+    //   field: 'nextEnable',
+    //   label: '璺宠繃',
+    //   initval: group.nextButton ? group.nextButton.enable || 'false' : 'false',
+    //   tooltip: '鏈�鍚庝竴缁勪笉鏄剧ず銆傛敞锛氶櫎鍏抽棴鍔熻兘澶栥��',
+    //   required: false,
+    //   options: [
+    //     {value: 'true', label: '鏄剧ず'},
+    //     {value: 'false', label: '闅愯棌'},
+    //   ],
+    //   forbid: !group.nextButton
+    // },
   ]
 
   return groupForm

--
Gitblit v1.8.0