From f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 21 十一月 2022 16:11:55 +0800
Subject: [PATCH] 2022-11-21

---
 src/tabviews/zshare/mutilform/mkColor/index.jsx |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/zshare/mutilform/mkColor/index.jsx b/src/tabviews/zshare/mutilform/mkColor/index.jsx
index d783e56..562708b 100644
--- a/src/tabviews/zshare/mutilform/mkColor/index.jsx
+++ b/src/tabviews/zshare/mutilform/mkColor/index.jsx
@@ -29,9 +29,17 @@
   handleChange = (color) => {
     let _color = `rgba(${ color.rgb.r }, ${ color.rgb.g }, ${ color.rgb.b }, ${ color.rgb.a })`
 
-    this.setState({ color: _color }, () => {
-      this.props.onChange(_color)
-    })
+    if (!this.props.config.isHex) {
+      this.setState({ color: _color }, () => {
+        this.props.onChange(_color)
+      })
+    } else {
+      let _hex = color.hex === 'transparent' ? '#ffffff' : color.hex
+
+      this.setState({ color: _hex }, () => {
+        this.props.onChange(_hex)
+      })
+    }
   }
 
   componentWillUnmount () {
@@ -42,6 +50,7 @@
 
   render() {
     const { color } = this.state
+
     return (
       <div className="color-sketch-block">
         <Popover content={

--
Gitblit v1.8.0