
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@dear-ui/admin-scaffold
Advanced tools
Base on React's Admin Manager Scaffold.
mkdir admin-scaffold-tester && cd "$_"
npm init && git init
需要在应用项目引入依赖
# yarn
yarn add react react-dom @dear-ui/admin-scaffold @mini-code/base-func @mini-code/request @dear-ui/core unistore react-transition-group
# 使用 @mini-code/scripts 开发环境
yarn add @mini-code/scripts -D
# 或者 npm
npm i react react-dom @dear-ui/admin-scaffold @mini-code/base-func @mini-code/request @dear-ui/core unistore react-transition-group --save
npm i @mini-code/scripts --save-dev
打开 ./pacakges.json,添加项目运行 scripts
"scripts": {
"start": "PORT=8086 minictl start",
"build": "minictl build"
},
项目参考 https://github.com/SANGET/admin-scaffold-starter
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Uke admin demo</title>
</head>
<body>
<div id="Main"></div>
</body>
</html>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flatpickr/4.6.2/themes/light.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.3.1/css/all.min.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
import React from 'react';
import ReactDOM from 'react-dom';
import App from './main';
ReactDOM.render(
<App/>,
document.getElementById('Main')
);
import React from 'react';
import { AdminWebScaffold, Link } from '@dear-ui/admin-scaffold';
import './style.scss'
const VersionInfo = {
numberVersion: 'v1.0.0'
};
const TestPage = (text = 'Test Page') => () => (
<div className="p20">
{text}
<Link
params={{
ID: 'testID',
data: '123'
}}
className="btn theme" to="TEST2">跳转到 TEST2</Link>
</div>
);
const pageComponents = {
TestPage: TestPage('TestPage'),
TestPage2: TestPage('TestPage2'),
};
const menuStore = [
{
title: '测试页面',
icon: 'table',
code: 'TestPage'
},
{
title: '一级菜单',
child: [
{
title: '测试页面2',
icon: 'table',
code: 'TestPage2'
},
{
title: '测试页面2',
icon: 'table',
code: 'TestPage3'
},
]
}
]
const userInfo = {
username: 'Alex'
}
const ScaffoldDemo = () => {
return (
<AdminWebScaffold
menuStore={menuStore}
username={userInfo.username}
versionInfo={VersionInfo}
userInfo={userInfo}
pageComponents={pageComponents}/>
);
}
export default ScaffoldDemo;
// 引入 scss var
@import '@dear-ui/core/style/var.scss';
@import '@dear-ui/admin-scaffold/style/var.scss';
// 引入其他样式
@import '@dear-ui/core/style/index.scss';
@import '@dear-ui/core/style/color/set-color.scss';
@import '@dear-ui/admin-scaffold/style/index.scss';
@import '@dear-ui/admin-scaffold/style/layout/login.scss';
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"outDir": "./dist",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"noImplicitAny": false,
"strict": true,
"forceConsistentCasingInFileNames": true,
"declaration": true,
"module": "ES6",
"moduleResolution": "node",
"jsx": "react"
},
"include": [
"src"
],
"exclude": [
"src/**/test/*",
"dist",
"build"
]
}
yarn start
稍等片刻即可
// 通用模版
import { ReportTemplate } from '@dear-ui/admin-scaffold/template-engine';
// 高阶模版 HOC
import { FormRender, HOCReportRender } from '@dear-ui/admin-scaffold/template-engine';
// 通用模版
const GenernalTMPL = () => {
const templateOptions = {};
return (
<ReportTemplate {...templateOptions} />
)
}
// 高阶模版 HOC
const HOC_TMPL_REPORT = () => {
return (
<HOCReportRender />
)
}
封装了基于 React state 的异步请求管理,制定了异步请求在该页面的生命周期,适用于通用页面
import ActionAgent from '@dear-ui/admin-scaffold/action-agent';
// 继承获取 ActionAgent 的 api
class Page extends ActionAgent {
}
FAQs
Base on React's Admin Manager Scaffold.
We found that @dear-ui/admin-scaffold demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.