From de8e545e5069d84e7050b1f5bf9a376b4f9438f2 Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Thu, 28 Feb 2019 13:38:02 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E6=B7=BB=E5=8A=A0=20global=20context?= =?UTF-8?q?=EF=BC=8C=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-web/src/layouts/GlobalAuthorityContext.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 admin-web/src/layouts/GlobalAuthorityContext.js diff --git a/admin-web/src/layouts/GlobalAuthorityContext.js b/admin-web/src/layouts/GlobalAuthorityContext.js new file mode 100644 index 000000000..e0ee5ec51 --- /dev/null +++ b/admin-web/src/layouts/GlobalAuthorityContext.js @@ -0,0 +1,9 @@ +import React from 'react'; + +// 创建全局的权限控制 context,方便在所有页面使用 +const GlobalAuthorityContext = React.createContext({ + theme: 'dark', + toggle: () => {}, +}); + +export default GlobalAuthorityContext;