From 4453a9e63e8e176c70c432b03fd4ba3ebf00a04c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 二月 2023 14:55:20 +0800
Subject: [PATCH] 2023-02-09

---
 src/menu/stylecontroller/index.jsx |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/menu/stylecontroller/index.jsx b/src/menu/stylecontroller/index.jsx
index b9e30ca..b795e25 100644
--- a/src/menu/stylecontroller/index.jsx
+++ b/src/menu/stylecontroller/index.jsx
@@ -55,7 +55,8 @@
     fonts: null,
     backgroundImage: '',
     options: [],
-    borposition: 'outer'
+    borposition: 'outer',
+    type: ''
   }
 
   callback = null
@@ -78,7 +79,7 @@
     MKEmitter.removeListener('changeStyle', this.initStyle)
   }
 
-  initStyle = (options, style = {}, callback) => {
+  initStyle = (options, style = {}, callback, type) => {
     let backgroundImage = ''
     if (style.backgroundImage && /^url/ig.test(style.backgroundImage)) {
       backgroundImage = style.backgroundImage.replace(/^url\(/ig, '').replace(/\)$/ig, '')
@@ -116,6 +117,7 @@
 
     this.setState({
       visible: true,
+      type: type || '',
       fonts: fonts,
       card: card,
       options: options,
@@ -466,7 +468,7 @@
   }
 
   render () {
-    const { card, options, backgroundImage, borposition, fonts } = this.state
+    const { card, options, backgroundImage, borposition, fonts, type } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -494,7 +496,7 @@
         maskStyle={{opacity: 0.1}}
         visible={this.state.visible}
       >
-        <div className="menu-style-controller">
+        <div className={'menu-style-controller ' + (type || '')}>
           <Form {...formItemLayout}>
             {card ? <Collapse expandIconPosition="right" destroyInactivePanel={true} defaultActiveKey={options[0]}>
               {options.includes('width') ? <Panel header="瀹藉害" key="width">
@@ -625,7 +627,7 @@
                 </Col> : null}
               </Panel> : null}
               {options.includes('background') || options.includes('backgroundColor') ? <Panel header="鑳屾櫙" key="background">
-                <Col span={24}>
+                <Col span={24} className="bg-color-panel">
                   <Form.Item
                     colon={false}
                     label={<BgColorsOutlined title="鑳屾櫙棰滆壊"/>}
@@ -650,7 +652,7 @@
                     <Input value={card.background || ''} onChange={(e) => this.changeBackground(e.target.value)} />
                   </Form.Item>
                 </Col> : null}
-                {!options.includes('backgroundColor') ? <Col span={24}>
+                {!options.includes('backgroundColor') ? <Col span={24} className="bg-image-panel">
                   <Form.Item
                     colon={false}
                     label={<PictureOutlined title="鑳屾櫙鍥剧墖"/>}

--
Gitblit v1.8.0