Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复publish脚本问题 #156

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/npm-pub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: config git
run: |
git config user.name ${{ secrets.GIT_USERNAME }}
git config user.email ${{ secrets.GIT_EMAIL }}

- name: install dependencies
run: npm install

Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
@mlz/admin 是遵循编程猫后台管理系统设计规范的 React 组件库
This is a React Components Library, packaged for codemao's management system design guideline
</p>
<p align="center" style="font-size: 32px">
🌈 https://www.mlz-admin.com
Expand All @@ -12,28 +12,28 @@

---

## 使用方法
## Usage

#### 1. 安装
#### 1. Install

```shell
$ npm install @mlz/admin -S
```

#### 2. 使用
#### 2. Import Code

```jsx
import { Button } from '@mlz/admin';

const App = () => <Button type="primary">❤️❤️❤️</Button>;
```

更多详细内容请访问本库的在线文档。
_visit our [WEBSITE](https://www.mlz-admin.com) to learn more!_

## 贡献指南
## Contribution

非常期待你的 PR!本库的开发代码,基于 [《贡献指南》](https://github.com/juicecube/mlz-admin/blob/master/CONTRIBUTING.md) ,所以请先仔细阅读。
we are expecting your great `Pull Request` which's based on <[our contribution doc](https://github.com/juicecube/mlz-admin/blob/master/CONTRIBUTING.md)>. so read it before your coding plz.

## 讨论组
## Dingtalk Disscussion Group

<img src="https://raw.githubusercontent.com/milobluebell/imgs-repo/master/WechatIMG9.jpeg" width="256" alt="Dingtalk Qrcode"/>
39 changes: 39 additions & 0 deletions ZH_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<p align="center">
@mlz/admin 是遵循编程猫后台管理系统设计规范的 React 组件库
</p>
<p align="center" style="font-size: 32px">
🌈 https://www.mlz-admin.com
</p>
<div align="center">

[![npm version](https://img.shields.io/npm/v/@mlz/admin?color=lightblue&label=%40mlz%2Fadmin)](https://github.com/juicecube/mlz-admin) [![codecov](https://codecov.io/gh/juicecube/mlz-admin/branch/master/graph/badge.svg?token=ZNPL3AMQ7Z)](https://app.codecov.io/gh/juicecube/mlz-admin/) ![actions](https://github.com/juicecube/mlz-admin/workflows/checkers/badge.svg) [![license](https://img.shields.io/badge/license-MIT-green.svg?color=lightblue)](https://github.com/juicecube/mlz-admin/blob/master/CONTRIBUTING.md) [![static](https://img.shields.io/npm/dm/@mlz/admin?label=downloads&color=lightblue)](https://www.npmjs.com/package/@mlz/admin)

</div>

---

## 使用方法

#### 1. 安装

```shell
$ npm install @mlz/admin -S
```

#### 2. 使用

```jsx
import { Button } from '@mlz/admin';

const App = () => <Button type="primary">❤️❤️❤️</Button>;
```

更多详细内容请访问本库的在线文档。

## 贡献指南

非常期待你的 PR!本库的开发代码,基于 [《贡献指南》](https://github.com/juicecube/mlz-admin/blob/master/CONTRIBUTING.md) ,所以请先仔细阅读。

## 讨论组

<img src="https://raw.githubusercontent.com/milobluebell/imgs-repo/master/WechatIMG9.jpeg" width="256" alt="Dingtalk Qrcode"/>
17 changes: 17 additions & 0 deletions docs/components/composit/use-auth-guard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# useAuthGuard 内部账号权限系统

> `📦 内部账号权限系统`通过请求接口的返回内容动态生成一个项目所需的权限列表和交互资源。

## 1. 基本使用

```tsx
/**
* title: 基本使用
*/
import React from 'react';
import { Button, Modal, message, useAuthGuard, AuthMenu } from '@mlz/adminer';

export default () => {
return <AuthMenu />;
};
```
8 changes: 7 additions & 1 deletion docs/components/interactivity/dark-theme-toggler.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ import React, { useState, useEffect } from 'react';
import { DarkThemeToggler, message } from '@mlz/admin';

class App extends React.Component {
componentDidMount() {
window.addEventListener('themeChange', (e) => {
message.info(`window.addEventListener触发:切换成功。文档无法保证样式正常`);
});
}
render() {
return (
<DarkThemeToggler
onChange={(e: 'dark' | 'light') => {
e === 'dark' && message.info(`切换成功。文档无法保证样式正常`);
message.info(`组件onChange触发:切换成功。文档无法保证样式正常`);
}}
/>
);
Expand All @@ -30,6 +35,7 @@ export default App;

- Antd 自身的组件,并没有实现`动态主题切换`功能(不论 dark/default 切换,还是多彩切换),我们通过比较节能的方式添加了进来.
- 我们在全局注入了 css 变量:`--theme-bg`、`--theme-sub-bg`以及`--theme-menu-bg`,会在主题发生变化时自动切换对应的值,方便`必须设置与主题配套的显性颜色`时使用。如果有过多需求请提 issue。
- 当主题发生变化的时候,会在 window 上监听到 `themeChange` 事件的触发。

---

Expand Down
48 changes: 38 additions & 10 deletions docs/components/interactivity/tabs.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ const { ContextMenuTabs, TabPane } = Tabs;

export default () => (
<ContextMenuTabs
defaultActiveKey="1"
activeKey="2"
type="editable-card"
hideAdd
contextMenu={
<Menu
onClick={(e) => {
Expand All @@ -95,15 +96,42 @@ export default () => (
<TabPane tab="Tab 122" key="1">
Content of Tab Pane 1
</TabPane>
<TabPane tab="Tab 2" key="2">
Content of Tab Pane 2
</TabPane>
<TabPane tab="Tab 3" key="3">
Content of Tab Pane 3
</TabPane>
<TabPane tab="Tab 4" key="4">
Content of Tab Pane 4
</TabPane>
{[
{
tab: 'Tab 2',
key: 2,
text: 'Content of Tab Pane 2',
closable: false,
},
{
tab: 'Tab 3',
key: 3,
text: 'Content of Tab Pane 3',
},
{
tab: 'Tab 4',
key: 4,
text: 'Content of Tab Pane 4',
},
{
tab: 'Tab 5',
key: 5,
text: 'Content of Tab Pane 5',
},
{
tab: 'Tab 6',
key: 6,
text: 'Content of Tab Pane 6',
},
{
tab: 'Tab 7',
key: 7,
text: 'Content of Tab Pane 7',
},
].map((pane: any, index: number) => {
const { tab, key, text, closable } = pane;
return <TabPane {...{ tab, key, text, closable }} />;
})}
</ContextMenuTabs>
);
```
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.10.0",
"version": "1.0.0",
"useWorkspaces": true,
"packages": [
"packages/*"
Expand Down
Loading