From 474c68f0fea10cc62977c67d186732b3346cdd53 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 17 一月 2023 18:04:45 +0800
Subject: [PATCH] 2023-01-17

---
 src/menu/stylecontroller/index.jsx |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/menu/stylecontroller/index.jsx b/src/menu/stylecontroller/index.jsx
index 80cde31..053ee15 100644
--- a/src/menu/stylecontroller/index.jsx
+++ b/src/menu/stylecontroller/index.jsx
@@ -98,13 +98,27 @@
     }
 
     this.callback = callback
+    let card = fromJS(style).toJS()
+    let borposition = 'outer'
+
+    if (!card.borderWidth) {
+      if (card.borderLeftWidth) {
+        borposition = 'left'
+      } else if (card.borderRightWidth) {
+        borposition = 'right'
+      } else if (card.borderTopWidth) {
+        borposition = 'top'
+      } else if (card.borderBottomWidth) {
+        borposition = 'bottom'
+      }
+    }
 
     this.setState({
       visible: true,
       fonts: fonts,
-      card: fromJS(style).toJS(),
+      card: card,
       options: options,
-      borposition: 'outer',
+      borposition: borposition,
       backgroundImage
     })
     window.GLOB.styling = true
@@ -674,7 +688,7 @@
                     label={<BorderOutlined title="杈规浣嶇疆"/>}
                     labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} }
                   >
-                    <Radio.Group className="border-position" defaultValue={'outer'} onChange={(e) => this.setState({borposition: e.target.value})}>
+                    <Radio.Group className="border-position" defaultValue={borposition} onChange={(e) => this.setState({borposition: e.target.value})}>
                       <Radio value="outer"><BorderOuterOutlined title="澶栬竟妗�"/></Radio>
                       <Radio value="left"><BorderLeftOutlined title="宸﹁竟妗�"/></Radio>
                       <Radio value="right"><BorderRightOutlined title="鍙宠竟妗�"/></Radio>

--
Gitblit v1.8.0