Giter VIP home page Giter VIP logo

d3george / slash-admin Goto Github PK

View Code? Open in Web Editor NEW
1.0K 10.0 135.0 62.68 MB

A modern react admin. It is based on react 18, vite and TypeScript. It's fast !

Home Page: https://admin.slashspaces.com/

License: MIT License

JavaScript 6.32% Shell 0.03% HTML 0.08% TypeScript 91.96% CSS 1.47% Dockerfile 0.14%
admin-dashboard antd react react-query react-router-v6 tailwindcss ts vite zustand framer-motion

slash-admin's Introduction



Slash Admin

Slash Admin is a modern admin dashboard template built with React 18, Vite, Ant Design, and TypeScript. It is designed to help developers quickly create powerful admin management systems.

English | 中文

Sponsor

Preview

login.png login_dark.png
analysis.png workbench.png

Features

  • Built using React 18 hooks.
  • Powered by Vite for rapid development and hot module replacement.
  • Integrates Ant Design, providing a rich set of UI components and design patterns.
  • Written in TypeScript, offering type safety and an improved development experience.
  • Responsive design, adapting to various screen sizes and devices.
  • Flexible routing configuration, supporting nested routes.
  • Integrated access control based on user roles.
  • Supports internationalization for easy language switching.
  • Includes common admin features like user management, role management, and permission management.
  • Customizable themes and styles to meet your branding needs.
  • Mocking solution based on MSW and Faker.js.
  • State management using Zustand.
  • Data fetching using React-Query.

Document

Document

Quick Start

Get the Project Code

git clone https://github.com/d3george/slash-admin.git

Install Dependencies

In the project's root directory, run the following command to install project dependencies:

pnpm install

Start the Development Server

Run the following command to start the development server:

pnpm dev

Visit http://localhost:3001 to view your application.

Build for Production

Run the following command to build the production version:

pnpm build

Docker deployment

Build image and Run container

build image

Enter the project root directory in the terminal and execute the following command to build the Docker image:

docker build -t your-image-name .

Make sure to replace your-image-name with your own image name

run container

Run your application in the Docker container using the following command:

docker run -p 3001:80 your-image-name

This will run your application on port 80(exposed in Dockerfile) of the container and map it to port 3001 on your host.

Now you can access http://localhost:3001 to view the deployed applications.

use docker-compose.yaml

Enter the project root directory in the terminal and execute the following command to start Docker Compose:

docker-compose up -d

Docker Compose will build an image based on the configuration defined by 'docker-compose. yaml' and run the container in the background.

After the container runs successfully, it can also be accessed through http://localhost:3001 To view the deployed applications.

Git Contribution submission specification

reference.commitlint.config.js

  • feat new features
  • fix fix the
  • docs documentation or comments
  • style code format (changes that do not affect code execution)
  • refactor refactor
  • perf performance optimization
  • revert revert commit
  • test test related
  • chore changes in the construction process or auxiliary tools
  • ci modify CI configuration and scripts
  • types type definition file changes
  • wip in development

slash-admin's People

Contributors

298977887 avatar aifuxi avatar chenyuxi2002 avatar d3george avatar eternallycyf avatar fliu2476 avatar hugepizza avatar stitchlau avatar xinmans avatar ydiego avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slash-admin's Issues

用了下 很不错 。不过关于路由权限这块可以帮完善下基础的使用文档嘛

十分感谢 ! 用了下 很不错 🎉 🎉 🎉

  • 我是重新搭建的 用了最新的vite5 unocss等依赖

仓库地址

有两个现在不好处理的

  • 动态路由现在只会生成一个tab => use/:id 不同的id应该生成不同的tab才对 这个好像不太好改
  • 可以帮完善下基础的使用文档嘛 关于路由配置 权限 这块

发现了几个小问题 有项目要用 我自己的先修复了

1.tabs不能滑动 最好还是能达到图二的效果

截屏2024-04-06 00 42 04 截屏2024-04-06 00 44 00

2.主题色好像使用起来不太方便

  • 我在vite中注入了所有antd的主题色token自定义了8个全局变量 到全局 使用vscode插件达到less文件有提示
  • 自定义了8个全局变量 通过less变量 unocss html-var antd的useToken都可以使用

3.动态路由好像有点问题 点击跳转到动态路由 然后点一下自己的tab标题 路径就会变成这样 只有第一次正常的

截屏2024-04-06 00 55 04
  • 应该要 保存 params search state 参数。增加了一个配置用于动态路由设置标题
截屏2024-04-06 00 56 02

4.打开的tabs || menuList最好放在localStorege里面 不然一刷新就没了 我暂时先把自己的改了

5.这里需要做一下空的处理 如果本地没文件会触发ErrorBoundary 定位bug也不太好定位 我把404页面 || 了一下

截屏2024-04-06 01 01 53

fullcalendar滚动条自定义

按照源码改成vue之后fullcalendar原来的滚动条不好看, 查看您的好像是使用simplebar, 请问如何将simplebar的滚动条怎么放进fullcalendar

icon

左侧菜单栏的相同风格的图标我需要去哪里获取

添加按钮权限

目前我看权限是管控到路由,是否可以将颗粒度细化到组件,例如对页面中增删改查之类的按钮组件进行权限控制。实现方式可以动态的对组件进行权限设置(也可以取消权限设置),然后在角色管理里进行分配

这种形式的路由 /article/:articleId 支持有些问题

src/router/hooks/use-match-route-meta.tsx

const currentRouteMeta = flattenedRoutes.find(
      (item) => item.key === lastRoute?.pathname || `${item.key}/` === lastRoute?.pathname,
    );
    if (currentRouteMeta) {
      if (!currentRouteMeta.hideTab) {
        currentRouteMeta.outlet = children;
        setMatchRouteMeta(currentRouteMeta);
      }
    } else {
      push(HOMEPAGE);
    }

lastRoute?.pathname => /article/123
key: '/article/:articleId' !== '/article/123'

导致这种形式的路由会一直跳HOMEPAGE

[BUG] Hidden tab will cause an empty page

issue description:

I try to select the first level breadcrumb item's menu multiple times in a three-level breadcrumb and it come across problem that it won't access the deepest route to show the according component

screenshot:

image

how to reproduce:

just do what I tried

other effect:

close the according components'tabs and I will get my expectation at the first or second times to select menu, then it will break again

QQ浏览器兼容性错误TypeError: ["xs","sm","md","lg","xl","xxl"].findLast is not a function

src\theme\hooks\use-reponsive.ts 文件修改成下面这样可以解决

  // 使用 [...screenArray].reverse().find() 来代替 findLast 方法,避免兼容性问题
  // [...screenArray] 创建了一个 screenArray 的副本,这样 reverse 方法不会改变原数组的顺序
  const currentScrren = [...screenArray].reverse().find((item) => {
    const result = screenMap[item];
    return result === true;
  });

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.