From c6f8e27d35cd31bb6393a1e7f747b6b2593dbd7a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 08 六月 2022 13:56:57 +0800 Subject: [PATCH] 2022-06-08 --- src/views/rolemanage/index.jsx | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/views/rolemanage/index.jsx b/src/views/rolemanage/index.jsx index 608da40..55b7111 100644 --- a/src/views/rolemanage/index.jsx +++ b/src/views/rolemanage/index.jsx @@ -27,7 +27,12 @@ loading: false, menulist: [], columns: [ - { title: '鑿滃崟鍚嶇О', dataIndex: 'MenuName', key: 'MenuName', align: 'center' }, + { title: '鑿滃崟鍚嶇О', dataIndex: 'MenuName', key: 'MenuName', align: 'center', render: (text, record) => { + if (record.extra) { + return <span style={{color: '#1890ff'}}>{text}</span> + } + return text + } }, { title: '鎿嶄綔', key: 'action', @@ -151,10 +156,12 @@ delete item.menus_rolelist } - if (!ub && app.userbind === item.MenuID) { + if (app.userbind === item.MenuID) { + item.extra = true ub = true } - if (!im && app.instantMessage === item.MenuID) { + if (app.instantMessage === item.MenuID) { + item.extra = true im = true } @@ -162,10 +169,10 @@ }) if (!im) { - menus.push({nodes: '', type: 'none', MenuID: app.instantMessage, MenuName: '鍗虫椂閫氫俊'}) + menus.push({nodes: '', type: 'none', extra: true, MenuID: app.instantMessage, MenuName: '鍗虫椂閫氫俊'}) } if (!ub) { - menus.push({nodes: '', type: 'none', MenuID: app.userbind, MenuName: '鐢ㄦ埛缁戝畾'}) + menus.push({nodes: '', type: 'none', extra: true, MenuID: app.userbind, MenuName: '鐢ㄦ埛缁戝畾'}) } this.setState({ -- Gitblit v1.8.0