From 113ff1aa0d62549730f1413fe5ffcadcf3a14f11 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 23 八月 2022 11:37:24 +0800 Subject: [PATCH] 2022-08-23 --- src/views/design/sidemenu/thdmenuplus/index.jsx | 31 +++++++++++++++++-------------- 1 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/views/design/sidemenu/thdmenuplus/index.jsx b/src/views/design/sidemenu/thdmenuplus/index.jsx index bbf051e..8d3ab63 100644 --- a/src/views/design/sidemenu/thdmenuplus/index.jsx +++ b/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> -- Gitblit v1.8.0