king
2023-02-09 69905117d0252701c4227c4c37a2403cd8999ecc
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="背景图片"/>}