Giter VIP home page Giter VIP logo

antdp's Introduction

Ant Design Project

Build & Deploy NPM Downloads

一个基于 antdumi 的初始级别项目,集成路由、dva(Redux)、选项卡等特性,用于简化 antd 5.x + 的部分使用。

Ant Design Project

Features

  • 🪖 简化 antd 5.x +umi 框架配置使用;
  • 📦 减少项目配置和依赖,将配置集成到包中开箱即用;
  • 🐝 更简单直观的配置权限和更改 Layout;
  • 💋 支持配置路由参数 /router/:id
  • 🤡 支持 tab 选项卡功能。

创建ts项目

使用 create-antdp 工具,将示例 basic 初始化,让我们快速创建这个 React 应用程序:

# npm 6.x ts版本
$ npm init antdp my-app --example basic
# npm 7+,ts版本 extra double-dash is needed:
$ npm init antdp my-app -- --example basic

$ yarn create antdp [appName]
# or npm
$ npm create antdp my-app
# or npx
$ npx create-antdp my-app

或者直接下载版本: basic.zip

创建js项目

# npm 6.x
$ npm init antdp my-app --example basicjs
# npm 7+,extra double-dash is needed:
$ npm init antdp my-app -- --example basicjs

$ yarn create antdp [appName] -- --example basicjs
# or npm
$ npm create antdp my-app -- --example basicjs
# or npx
$ npx create-antdp my-app -- --example basicjs

或者直接下载版本: basicjs.zip

在CodeSandbox中打开,查看实例

Open in CodeSandbox Open in StackBlitz

用户名密码: admin/admin

你可以也直接下载实例下载本地预览: antdp-base.zip

启动项目

cd [appName]
yarn install
yarn start

目录结构

├── config
│   ├── config.js
│   ├── proxy.js
│   └── router.json
├── mock
│   ├── load.js
│   └── user.js
├── package.json
└── src
    ├── components
    ├── layouts
    ├── locales
    ├── models
    ├── pages
    ├── services
    └── utils

相关依赖

This git repository is a repo built using Lerna. It contains several packages:

Package Version Description
@antdp/authorized npm -
@antdp/basic-layouts npm -
@antdp/antdp-ui npm -
@antdp/document-title npm -
@antdp/fullscreen npm -
@antdp/user-login npm -
@antdp/layout-tabs npm -
@antdp/config npm -
@antdp/dependencies npm -
@antdp/icons npm -
@antdp/page-loading npm -

参与框架开发

git clone https://github.com/antdpro/antdp.git
npm install               # 安装项目依赖
npm run build             # 实时监听包输出 JS
npm run start:website     # 运行文档网站
npm run start:antdp-base  # 运行实例

发布版本

npm run version -- patch # 配置的命令快捷方式,与下面命令效果相同
lerna version --no-changelog patch

发布版本可选参数,通过该关键字增加版本。

lerna version [major | minor | patch | premajor | preminor | prepatch | prerelease]
  • major - 重大的 1.1.1 => 2.0.0
  • minor - 小调 1.1.1 => 1.2.0 中间版本变化
  • patch - 补丁 1.1.1 => 1.1.2 小版本递增
  • premajor - 预发布重大的 1.1.1 => 2.0.0-alpha.0
  • preminor - 预发布小调 1.1.1 => 1.2.0-alpha.0
  • prepatch - 预发布补丁 1.1.1 => 1.1.2-alpha.0
  • prerelease - 预发行 1.1.1 => 1.1.2-alpha.0

License

Licensed under the MIT License.

antdp's People

Contributors

chenlingasmx avatar huqiaoli avatar hy916 avatar jaywcjlove avatar nullptr-z avatar panbibi avatar renovate-bot avatar renovate[bot] avatar rulishu avatar star-hamster avatar sunlxy avatar xingyuefeng avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

antdp's Issues

basic-layouts冲menu和header样式

参考procomponent

 <ProLayout
      token={{
        colorBgAppListIconHover: 'rgba(0,0,0,0.06)',
        colorTextAppListIconHover: 'rgba(255,255,255,0.95)',
        colorTextAppListIcon: 'rgba(255,255,255,0.85)',
        sider: {
          colorBgCollapsedButton: '#fff',
          colorTextCollapsedButtonHover: 'rgba(0,0,0,0.65)',
          colorTextCollapsedButton: 'rgba(0,0,0,0.45)',
          colorMenuBackground: '#004FD9',
          colorBgMenuItemCollapsedElevated: 'rgba(0,0,0,0.85)',
          colorMenuItemDivider: 'rgba(255,255,255,0.15)',
          colorBgMenuItemHover: 'rgba(0,0,0,0.06)',
          colorBgMenuItemSelected: 'rgba(0,0,0,0.15)',
          colorTextMenuSelected: '#fff',
          colorTextMenuItemHover: 'rgba(255,255,255,0.75)',
          colorTextMenu: 'rgba(255,255,255,0.75)',
          colorTextMenuSecondary: 'rgba(255,255,255,0.65)',
          colorTextMenuTitle: 'rgba(255,255,255,0.95)',
          colorTextMenuActive: 'rgba(255,255,255,0.95)',
          colorTextSubMenuSelected: '#fff',
        },
      }}
   />

开发清单

开发清单

  • #240 antdp增加更多路由相关文档,如动态路由,权限路由,及其预览实例
  • #239 create antdp初始化js项目,去除多余的tsconfig.json
  • #238 antdp在线文档中补充具体node版本
  • #242
  • #228
  • #229
  • #227
  • antdp-base中增加basic-layouts多布局的实例
  • #249
  • #250
  • antdp-base 登陆界面修改
  • 组件菜单组件名错误 #244
  • config在没有配置ANTD_AUTH_CONF权限时,一直跳往403页面 #253
  • antd App包裹组件 message提示报错 #255
  • #256
  • #257
  • #265
  • 首页样式问题 #260
  • basic-layouts冲menu和header样式 #261
  • basic-layouts 刷新页面后保持原有展开菜单 #263
  • layout-tabs 切换tabs的时候不再重新刷新页面 #264
  • #267
  • antdp不支持动态路由 #268

antd App包裹组件 message提示报错

image

Steps to reproduce

message提示报错

What is expected?

message提示报错

What is actually happening?

message提示报错

Environment Info
@antdp/config 2.0.17
React 18.x
System macOS 13.0 (22A8380)
Browser Chrome Version 114.0.5735.110 (64-bit)

Inline JavaScript is not enabled. Is it set in your options

> @example/[email protected] build /home/runner/work/antdp/antdp/examples/website
> kkt build

Creating an optimized production build...
Failed to compile.

// https://github.com/ant-design/ant-motion/issues/44
.bezierEasingMixin();
^
Inline JavaScript is not enabled. Is it set in your options?
      Error in /home/runner/work/antdp/antdp/node_modules/antd/lib/style/color/bezierEasing.less (line 110, column 0)

https://github.com/antdpro/antdp/runs/4709998226?check_suite_focus=true

BasicLayout 组件问题

image

image
退出登陆logout() 是api 还方法,方法跳转的话是用什么跳转, 是api的话下面没写,引用的话是从哪里引用的

文档不够详细,api 设计有问题

image 优化组件文档,文档对 api 的介绍太简单,比如 `columns: 列`,api 不要用单词缩,缺少文档比如`optconfig`,api 很多但是例子不够多。

api 风格不够统一,比如这个
image
其他事件都没有on前缀,onDelete有。
这些问题其他组件也是类似问题,需要核查修改。

❗❗❗ ❗❗❗注意修改 api 的时候要兼容老的,文档上说明,以及哪个版本取消老 api

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm @types/classnames Unavailable

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • fix(deps): update dependency react-frame-component to v5.2.7
  • chore(deps): update react monorepo to ~18.3.0 (@types/react, @types/react-dom)
  • fix(deps): update dependency @ant-design/icons to ~5.4.0
  • fix(deps): update dependency ahooks to ~3.8.0
  • chore(deps): update peaceiris/actions-gh-pages action to v4
  • fix(deps): update dependency lerna to v8
  • fix(deps): update dependency rc-field-form to v2
  • 🔐 Create all rate-limited PRs at once 🔐

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • actions/setup-node v4
  • peaceiris/actions-gh-pages v3
.github/workflows/dev.yml
  • actions/checkout v4
  • actions/setup-node v4
  • peaceiris/actions-gh-pages v3
npm
package.json
  • compile-less-cli 1.9.1
  • husky ^9.0.11
  • jest-environment-jsdom 29.5.0
  • lerna ^7.0.0
  • lint-staged ~15.2.0
  • prettier 3.0.3
  • tsbb ^4.1.0
  • recursive-readdir-files 2.3.1
  • @babel/core ~7.21.3
  • @babel/preset-typescript ~7.21.0
  • react-dom ^18.2.0
  • react ^18.2.0
  • react-refresh ^0.14.0
  • antd 5.6.1
  • react-dom ^18.2.0
  • react ^18.2.0
  • react-refresh ^0.14.0
  • antd 5.6.1
packages/antdp-edit-table/package.json
  • @babel/runtime ~7.20.1
  • rc-field-form ~1.44.0
  • @types/react ~18.2.0
  • @types/react-dom ~18.2.0
  • antd 5.6.1
  • react ^18.2.0
  • react-dom ^18.2.0
  • antd >=4.16.13
  • react >=17.x
  • react-dom >=17.x
packages/antdp-fuzzy-query/package.json
  • @babel/runtime ~7.20.1
  • lodash 4.17.21
  • @types/lodash ~4.14.181
  • @types/react ~18.2.0
  • @types/react-dom ~18.2.0
  • antd 5.6.1
  • react ^18.2.0
  • react-dom ^18.2.0
  • antd >=4.16.13
  • react >=17.x
  • react-dom >=17.x
packages/antdp-ui/package.json
  • @ant-design/icons ~5.3.5
  • @babel/runtime ~7.20.1
  • classnames 2.3.2
  • immutability-helper ^3.1.1
  • react-dnd ^16.0.1
  • react-dnd-html5-backend ^16.0.1
  • @types/classnames 2.3.1
  • @types/react ~18.2.0
  • @types/react-dom ~18.2.0
  • antd 5.6.1
  • react ^18.2.0
  • react-dom ^18.2.0
  • antd >=4.3.0
  • prop-types >=15.7.2
  • react >=16.9.0
  • react-dom >=16.9.0
packages/antdp/package.json
packages/authorized/package.json
  • @umijs/max ~4.0.47
  • react ^18.2.0
  • react-dom ^18.2.0
  • react-router ~6.11.0
  • react-router-dom ~6.11.0
  • react >=16.7.0
  • react-dom >=16.7.0
packages/basic-layouts/package.json
  • @ant-design/icons ~5.3.5
  • @babel/runtime ~7.20.1
  • @umijs/max ~4.0.47
  • antd 5.6.1
  • react ^18.2.0
  • react-dom ^18.2.0
  • react-intl ~6.4.0
  • react-router ~6.11.0
  • react-router-dom ~6.11.0
  • antd >=4.x
  • prop-types >=15.7.2
  • react >=16.7.0
  • react-dom >=16.7.0
packages/config/package.json
  • @ant-design/icons ~5.3.5
  • @babel/runtime ~7.20.1
  • @umijs/max ~4.0.47
  • umi-plugin-antd-icon-config 3.0.1
  • webpack 5.89.0
packages/dependencies/package.json
  • @babel/runtime ~7.20.1
  • react ^18.2.0
  • react-dom ^18.2.0
packages/document-title/package.json
  • @babel/runtime ~7.20.1
  • react ^18.2.0
  • react-dom ^18.2.0
  • react >=16.7.0
  • react-dom >=16.7.0
packages/fullscreen/package.json
  • @ant-design/icons ~5.3.5
  • @babel/runtime ~7.20.1
  • react ^18.2.0
  • react-dom ^18.2.0
  • react >=16.7.0
  • react-dom >=16.7.0
packages/hooks/package.json
  • @babel/runtime ~7.20.1
  • ahooks ~3.7.2
  • @umijs/max ~4.0.47
  • react ^18.2.0
  • react-dom ^18.2.0
  • react >=16.7.0
  • react-dom >=16.7.0
packages/icons/package.json
  • @ant-design/icons ~5.3.5
  • @babel/runtime ~7.20.1
packages/layout-tabs/package.json
  • @babel/runtime ~7.20.1
  • react-frame-component 5.2.6
  • @umijs/max ~4.0.47
  • antd 5.6.1
  • react ^18.2.0
  • react-dom ^18.2.0
  • react-router ~6.11.0
  • react-router-dom ~6.11.0
  • prop-types >=15.7.2
  • react >=16.7.0
  • react-dom >=16.7.0
packages/page-loading/package.json
  • @babel/runtime ~7.20.1
  • antd 5.6.1
  • react ^18.2.0
  • react-dom ^18.2.0
  • antd >=4.x
  • react >=16.7.0
  • react-dom >=16.7.0
packages/request/package.json
  • @babel/runtime ~7.20.1
  • umi-request 1.4.0
  • react ^18.2.0
  • react-dom ^18.2.0
  • react >=16.7.0
  • react-dom >=16.7.0
packages/user-login/package.json
  • @ant-design/icons ~5.3.5
  • @babel/runtime ~7.20.1
  • @types/react ~18.2.0
  • @types/react-dom ~18.2.0
  • antd 5.6.1
  • react ^18.2.0
  • react-dom ^18.2.0
  • antd >=4.x
  • prop-types >=15.7.2
  • react >=16.7.0
  • react-dom >=16.7.0

  • Check this box to trigger a request for Renovate to run again on this repository

yarn install 项目报错,提示node版本号不对,文档没及时更新依赖说明

当前node版本 v16.13.1

error [email protected]: The engine "node" is incompatible with this module. Expected version "^14.18.0 || ^16.14.0 || >=18.0.0". Got "16.13.1"
error Found incompatible module.

https://antdpro.github.io/antdp/#/docs/quick-start
文档有问题,没说明具体需要哪个版本的node,只是笼统的说了下需要 14、16、18以上的版本。

image

这里的16.10.0按理说也不能install成功

@antdp/authorized新增localStorage配置

  1. @antdp/authorized默认是获取sessionStorage的authMenu来匹配权限,我现在遇到的问题是后台开发中如果我重新打开一个标签打开页面的话就会停留在登录页,但我的业务需求是需要从新的标签打开,望兼容localStorage。
    WX20240328-191340@2x

  2. 第二个问题从"@antdp/basic-layouts": "2.0.16之后"组件的index.css没有经过编译,样式在safari中不生效
    1711624950515

antdp不支持动态路由

image

路由配置如下

      {
            "path":"/order/orderDetail/:id",
            "name": "订单详情",
            "component": "@/pages/order/orderDetail/$detail.jsx",
            "hideInMenu": true
       }

跳转代码如下

 history.push(`/order/orderDetail/${12}`);

结果:404页面不存在。用umi创建的项目不会出现这个问题

config在没有配置ANTD_AUTH_CONF权限时,一直跳往403页面

Steps to reproduce

config在没有配置ANTD_AUTH_CONF权限

What is expected?

一直跳往403页面

What is actually happening?

一直跳往403页面

Environment Info
@antdp/config 2.0.17
React 18.x
System macOS 13.0 (22A8380)
Browser Chrome Version 114.0.5735.110 (64-bit)

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.