king
2022-06-21 5ca9c561e834d849710ca779aab97823cf39b143
2022-06-21
3个文件已修改
42 ■■■■ 已修改文件
src/mob/colorsketch/index.jsx 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/menuform/index.jsx 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mobdesign/menuform/index.scss 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/mob/colorsketch/index.jsx
@@ -61,9 +61,10 @@
  handleChange = (color) => {
    let _color = `rgba(${ color.rgb.r }, ${ color.rgb.g }, ${ color.rgb.b }, ${ color.rgb.a })`
    let _hex = color.hex === 'transparent' ? '#ffffff' : color.hex
    this.setState({ color: _color }, () => {
      this.props.onChange && this.props.onChange(_color)
      this.props.onChange && this.props.onChange(_color, _hex)
    })
  }
src/views/mobdesign/menuform/index.jsx
@@ -22,10 +22,14 @@
  state = {}
  // 一二级菜单切换
  selectChange = (key, value) => {
    const { config } = this.props
  selectChange = (key, value, hex) => {
    let _config = {...this.props.config, [key]: value}
    this.props.updateConfig({...config, [key]: value})
    if (key === 'statusBarbgColor' && hex) {
      _config.statusBarHexColor = hex
    }
    this.props.updateConfig(_config)
    // if (key === 'cacheUseful') {
    //   this.props.updateConfig({...config, cacheUseful: value})
    // } else if (key === 'timeUnit') {
@@ -203,10 +207,27 @@
            <Form.Item className="status-bar" label={
              <Tooltip placement="topLeft" title="在明科云APP或小程序中,状态栏的背景色。">
                <QuestionCircleOutlined className="mk-form-tip" />
                状态栏
                状态栏背景
              </Tooltip>
            }>
              <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val) => {this.selectChange('statusBarbgColor', val)}} />
              <ColorSketch value={config.statusBarbgColor || '#ffffff'} onChange={(val, hex) => {this.selectChange('statusBarbgColor', val, hex)}} />
            </Form.Item>
          </Col> : null}
          {adapters.includes('wxmini') ? <Col span={24}>
            <Form.Item className="status-bar-color" label={
              <Tooltip placement="topLeft" title="在使用小程序时,状态栏的字体颜色。">
                <QuestionCircleOutlined className="mk-form-tip" />
                状态栏字体
              </Tooltip>
            }>
              {getFieldDecorator('statusBarColor', {
                initialValue: config.statusBarColor || 'black'
              })(
                <Radio.Group onChange={(e) => {this.selectChange('statusBarColor', e.target.value)}}>
                  <Radio value="black">黑色</Radio>
                  <Radio value="white">白色</Radio>
                </Radio.Group>
              )}
            </Form.Item>
          </Col> : null}
          {adapters.includes('app') ? <Col span={24}>
src/views/mobdesign/menuform/index.scss
@@ -22,6 +22,14 @@
      }
    }
  }
  .status-bar-color, .status-bar {
    .ant-form-item-label {
      overflow: visible;
      label {
        left: -10px;
      }
    }
  }
  .mini-radio {
    .ant-radio-wrapper {
      margin-right: 5px;