From 2d5d60d5f165546299d1b42004b1469cb6d2b3ef Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 三月 2023 11:53:13 +0800
Subject: [PATCH] 2023-03-09

---
 src/menu/components/editor/braft-editor/options.jsx |   39 ++++++++++++++++++++++++++-------------
 1 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx
index 0cf69e3..134bf6a 100644
--- a/src/menu/components/editor/braft-editor/options.jsx
+++ b/src/menu/components/editor/braft-editor/options.jsx
@@ -4,6 +4,19 @@
 export default function (wrap, columns) {
   let appType = sessionStorage.getItem('appType')
   let roleList = sessionStorage.getItem('sysRoles')
+  let menu = window.GLOB.customMenu
+
+  let interfaces = []
+  if (menu.interfaces) {
+    menu.interfaces.forEach(item => {
+      if (item.status === 'true') {
+        interfaces.push({
+          value: item.uuid,
+          label: item.name
+        })
+      }
+    })
+  }
 
   if (roleList) {
     try {
@@ -52,11 +65,21 @@
       options: [
         {value: 'dynamic', label: '鍔ㄦ��'},
         {value: 'static', label: '闈欐��'},
+        {value: 'public', label: '鍏叡鏁版嵁婧�'},
       ],
       controlFields: [
-        {field: 'field', values: ['dynamic']},
-        {field: 'encryption', values: ['dynamic']},
+        {field: 'field', values: ['dynamic', 'public']},
+        {field: 'publicId', values: ['public']},
+        {field: 'encryption', values: ['dynamic', 'public']},
       ]
+    },
+    {
+      type: 'select',
+      field: 'publicId',
+      label: '鏁版嵁婧�',
+      initval: wrap.publicId || '',
+      required: true,
+      options: interfaces
     },
     {
       type: 'select',
@@ -80,16 +103,6 @@
       ]
     },
     {
-      type: 'number',
-      field: 'minHeight',
-      label: '鏈�灏忛珮搴�',
-      initval: wrap.minHeight || '',
-      min: 0,
-      max: 3000,
-      precision: 0,
-      required: false
-    },
-    {
       type: 'radio',
       field: 'permission',
       label: '鏉冮檺楠岃瘉',
@@ -99,7 +112,7 @@
         {value: 'true', label: '鍚敤'},
         {value: 'false', label: '绂佺敤'},
       ],
-      forbid: !appType
+      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
     },
     {
       type: 'multiselect',

--
Gitblit v1.8.0