king
2022-09-06 bdfec44c9f3a37dbbe05bf14a252ffec04132a86
src/views/design/sidemenu/thdmenuplus/index.jsx
@@ -70,6 +70,7 @@
        _templates.push({
          uuid: temp.MenuID,
          title: temp.MenuName,
          MenuNo: temp.MenuNo,
          type: temp.Template,
          url: illust[temp.Template],
          disabled: temp.disabled || false,
@@ -311,21 +312,23 @@
              </Row>
              <Row>
                {this.state.usedTemplates.map((template, index) => {
                  if (!tempSearchKey || template.title.toLowerCase().indexOf(tempSearchKey.toLowerCase()) >= 0) {
                    return (
                      <Col key={template.type + index} className={template.disabled ? 'disabled' : ''} title={template.disTitle || ''} span={6}>
                        <Card
                          title={template.title}>
                          <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/>
                          <div className="card-operation">
                            <Button type="primary" onClick={() => {this.useTemplate(template, 'user')}}>使用模板</Button>
                          </div>
                        </Card>
                      </Col>
                    )
                  } else {
                    return null
                  if (tempSearchKey) {
                    if ((template.title + template.MenuNo).toLowerCase().indexOf(tempSearchKey.toLowerCase()) === -1) {
                      return null
                    }
                  }
                  return (
                    <Col key={template.type + index} className={template.disabled ? 'disabled' : ''} title={template.disTitle || ''} span={6}>
                      <Card
                        title={template.title}>
                        <img onClick={() => {this.previewPicture(template)}} src={template.url} alt=""/>
                        <div className="card-operation">
                          <Button type="primary" onClick={() => {this.useTemplate(template, 'user')}}>使用模板</Button>
                        </div>
                      </Card>
                    </Col>
                  )
                })}
              </Row>
            </TabPane>