king
2025-04-21 f3d4db769ba9b51b799d981511a710fd443d0e08
src/tabviews/zshare/mutilform/mkColor/index.jsx
@@ -6,7 +6,7 @@
import './index.scss'
const presetColors = [
  '#f5222d', '#fa541c', '#fa8c16', '#faad14', '#fadb14', '#a0d911', '#52c41a', '#13c2c2', '#1890ff', '#2f54eb', '#722ed1',
  '#f5222d', '#fa541c', '#fa8c16', '#faad14', '#fadb14', '#a0d911', '#52c41a', '#13c2c2', '#1890ff', '#3860f4', '#722ed1',
  '#eb2f96', '#595959', '#ffa39e', '#ffbb96', '#ffd591', '#ffe58f', '#fffb8f', '#eaff8f', '#b7eb8f', '#87e8de', '#91d5ff',
  '#adc6ff', '#d3adf7', '#ffadd2', '#d9d9d9', '#434343', '#000000', '#ffffff', 'transparent'
]
@@ -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.colorType !== 'hex') {
      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={