From d4cd576586e5ccae559b64df39960804205b65fb Mon Sep 17 00:00:00 2001 From: syy11cn Date: Sun, 24 Oct 2021 01:03:44 +0800 Subject: [PATCH] docs: add align center --- README.CN.MD | 30 +++++++++++++++--------------- README.md | 30 +++++++++++++++--------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/README.CN.MD b/README.CN.MD index fdf4e35..ad90f35 100644 --- a/README.CN.MD +++ b/README.CN.MD @@ -1,4 +1,4 @@ -
+

🎉 Config Router 🎉

![English](https://img.shields.io/static/v1?label=current&message=简体中文&color=brightgreen) [![English](https://img.shields.io/static/v1?label=docs&message=English&color=lightgrey&logo=markdown)](./README.MD) @@ -7,34 +7,34 @@

一个基于 React Router v5.x 的路由配置、渲染和路由守卫库。

-
+ -
+
## `Config Router` 是什么? :thinking: -
+ **Config Router** :wave: 是一个配合 _React Router v5.x_ 使用的路由管理工具。 在 _React Router_ 的基础上,提供 **路由集中配置、路由渲染以及路由守卫** 功能。 如果你曾使用过 _Vue Router_,你将很容易就能上手使用 _Config Router_。当然,本项目不如 _Vue Router_ 那样成熟。:joy: -
+
## 功能 :tada: -
+ - :heavy_check_mark: 通过声明类似 Vue Router 中 `routes` 数组的方式 **配置路由**。 - :heavy_check_mark: 通过 `import` 一个 `RouterView` 组件的方式 **渲染路由** :eyes:。 - :heavy_check_mark: 渲染页面前,支持自定义 **路由守卫**。 - :o: 敬请期待…… -
+
## 使用方法 :book: -
+ 你可以将这个包用于 `react-jsx` 或 `react-tsx` 项目中。在下面的使用方法中,将以 `vite` + `react` + `typescript` 搭建的项目为例。 @@ -171,7 +171,7 @@ interface AppProps {} const App: FunctionComponent = () => { return ( -
+
= ({ routes, props }) => { console.log('Index View'); return ( -
+

This is Index

= ({ routes, props }) => { console.log('Index View'); return ( -
+

This is Index

+
## 贡献 :computer: - +
欢迎贡献!你可以 fork 这个仓库,然后提 PR。 在使用中有任何问题,也可以 [点击这里发布一个 issue](https://github.com/syy11cn/config-router/issues),我收到消息后会尽快尽力处理。 -
+
## 关于 :raised_hands: -
+
### 开源协议 diff --git a/README.md b/README.md index 698ad48..24f76cc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -
+
# 🎉 Config Router 🎉 @@ -8,34 +8,34 @@

A route configuring, rendering and guarding lib based on React Router v5.x.

-
+
-
+
## Why Config Router? :thinking: -
+
**Config Router** :wave: is an attachment lib to _React Router v5.x_. It works well with React Router, helping with **route configuration, route rendering and route guarding**. If you are a _Vue Router_ user before, it is quite easy for you to get started. Of course this project is not as mature as _Vue Router_. :joy: -
+
## Features :tada: -
+
- :heavy_check_mark: **Config route** by declaring the routes array like that in Vue Router. - :heavy_check_mark: **Render routes** by importing and using a single component called **`RouterView`** :eyes:. - :heavy_check_mark: **Guard routes** that should be accessed only by authorized users. - :o: More is on the way... -
+
## Usage :book: -
+
You can use this package in either `react-jsx` projects or `react-tsx` projects. Take project with `vite`, `react` and `typescript` for example. @@ -172,7 +172,7 @@ interface AppProps {} const App: FunctionComponent = () => { return ( -
+
= ({ routes, props }) => { console.log('Index View'); return ( -
+

This is Index

= ({ routes, props }) => { console.log('Index View'); return ( -
+

This is Index

+
## Contribution :computer: - +
Contributions are welcome. Just fork this repo and send PRs. Any questions while using this package, please open an [issue](https://github.com/syy11cn/config-router/issues) and I would manage to solve it as soon as I receive the message. -
+
## About :raised_hands: -
+
### License