ant-design / ant-design-pro

👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
https://pro.ant.design
MIT License
36.51k stars 8.15k forks source link

🐛[BUG]升级到AntDesign4.6.0后,Pro中布局都乱套了. #7249

Closed l745230 closed 4 years ago

l745230 commented 4 years ago

🐛 bug 描述

1.Layout顶部菜单栏不会自动隐藏为... 省略号了 与右边操作栏重叠 2.pro-table 小屏访问(移动端)搜索框显示不正常,原先只默认展示1个搜索项,现在会默认把全部的搜索项显示出来,并且展示错位.

📷 复现步骤

{
  "name": "ant-design-pro",
  "version": "1.0.0",
  "private": true,
  "description": "An out-of-box UI solution for enterprise applications",
  "scripts": {
    "analyze": "cross-env ANALYZE=1 umi build",
    "build": "umi build",
    "deploy": "npm run site && npm run gh-pages",
    "dev": "npm run start:dev",
    "fetch:blocks": "pro fetch-blocks --branch antd@4 && npm run prettier",
    "format-imports": "cross-env import-sort --write '**/*.{js,jsx,ts,tsx}'",
    "gh-pages": "cp CNAME ./dist/ && gh-pages -d dist",
    "i18n-remove": "pro i18n-remove --locale=zh-CN --write",
    "lint": "npm run lint:js && npm run lint:style && npm run lint:prettier",
    "lint-staged": "lint-staged",
    "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx ",
    "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src && npm run lint:style",
    "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./src",
    "lint:prettier": "check-prettier lint",
    "lint:style": "stylelint --fix \"src/**/*.less\" --syntax less",
    "prettier": "prettier -c --write \"**/*\"",
    "start": "umi dev",
    "start:dev": "cross-env REACT_APP_ENV=dev MOCK=none umi dev",
    "start:118": "REACT_APP_ENV=118 umi dev",
    "start:no-mock": "cross-env MOCK=none umi dev",
    "start:no-ui": "cross-env UMI_UI=none umi dev",
    "start:pre": "cross-env REACT_APP_ENV=pre umi dev",
    "start:test": "cross-env REACT_APP_ENV=test MOCK=none umi dev",
    "test": "umi test",
    "test:all": "node ./tests/run-tests.js",
    "test:component": "umi test ./src/components",
    "tsc": "tsc",
    "ui": "umi ui"
  },
  "husky": { "hooks": { "pre-commit": "npm run lint-staged" } },
  "lint-staged": {
    "**/*.less": "stylelint --syntax less",
    "**/*.{js,jsx,ts,tsx}": "npm run lint-staged:js",
    "**/*.{js,jsx,tsx,ts,less,md,json}": ["prettier --write"]
  },
  "browserslist": ["> 1%", "last 2 versions", "not ie <= 10"],
  "dependencies": {
    "@ant-design/icons": "^4.0.0",
    "@ant-design/pro-layout": "^5.0.9",
    "@ant-design/pro-table": "^2.4.2",
    "@antv/data-set": "^0.11.1",
    "antd": "^4.4.2",
    "classnames": "^2.2.6",
    "bizcharts": "^3.5.3-beta.0",
    "bizcharts-plugin-slider": "^2.1.1-beta.1",
    "dva": "^2.6.0-beta.16",
    "js-cookie": "^2.2.1",
    "copy-to-clipboard": "^3.3.1",
    "numeral": "^2.0.6",
    "lodash": "^4.17.11",
    "lodash.debounce": "^4.0.8",
    "moment": "^2.24.0",
    "omit.js": "^1.0.2",
    "path-to-regexp": "2.4.0",
    "qs": "^6.9.0",
    "react": "^16.8.6",
    "react-copy-to-clipboard": "^5.0.1",
    "react-dom": "^16.8.6",
    "react-helmet": "^5.2.1",
    "react-fittext": "^1.0.0",
    "redux": "^4.0.1",
    "umi": "^2.13.0",
    "umi-plugin-antd-icon-config": "^1.0.2",
    "umi-plugin-antd-theme": "^1.0.1",
    "umi-plugin-pro-block": "^1.3.2",
    "umi-plugin-react": "^1.14.10",
    "umi-request": "^1.0.8",
    "use-merge-value": "^1.0.1"
  },
  "devDependencies": {
    "@ant-design/pro-cli": "^1.0.18",
    "@types/classnames": "^2.2.7",
    "@types/express": "^4.17.0",
    "@types/history": "^4.7.2",
    "@types/jest": "^25.1.0",
    "@types/lodash": "^4.14.144",
    "@types/qs": "^6.5.3",
    "@types/react": "^16.9.17",
    "@types/react-dom": "^16.8.4",
    "@types/react-helmet": "^5.0.13",
    "@types/lodash.debounce": "^4.0.6",
    "@umijs/fabric": "^2.0.2",
    "@types/numeral": "^0.0.25",
    "chalk": "^3.0.0",
    "check-prettier": "^1.0.3",
    "cross-env": "^7.0.0",
    "cross-port-killer": "^1.1.1",
    "enzyme": "^3.11.0",
    "express": "^4.17.1",
    "gh-pages": "^2.0.1",
    "husky": "^4.0.7",
    "import-sort-cli": "^6.0.0",
    "import-sort-parser-babylon": "^6.0.0",
    "import-sort-parser-typescript": "^6.0.0",
    "import-sort-style-module": "^6.0.0",
    "jest-puppeteer": "^4.4.0",
    "jsdom-global": "^3.0.2",
    "lint-staged": "^10.0.0",
    "mockjs": "^1.0.1-beta3",
    "node-fetch": "^2.6.0",
    "prettier": "^1.19.1",
    "pro-download": "1.0.1",
    "stylelint": "^13.0.0",
    "umi-plugin-antd-icon-config": "^1.0.2",
    "umi-plugin-ga": "^1.1.3",
    "umi-plugin-pro": "^1.0.2",
    "umi-types": "^0.5.9"
  },
  "optionalDependencies": { "puppeteer": "^2.0.0" },
  "engines": { "node": ">=10.0.0" },
  "checkFiles": [
    "src/**/*.js*",
    "src/**/*.ts*",
    "src/**/*.less",
    "config/**/*.js*",
    "scripts/**/*.js"
  ]
}
layout: 'topmenu',
  contentWidth: 'Fluid',
  fixedHeader: true,
  autoHideHeader: false,
  fixSiderbar: false,
  colorWeak: false,
  menu: {
    locale: false,
  },
  pwa: false,

🏞 期望结果

💻 复现代码

© 版本信息

🚑 其他信息

image

image image

l745230 commented 4 years ago

尝试删除node_modules,重新安装,还是这样.

然后 pro-table中设置 sticky | 设置粘性头部和滚动条 .没有效果

liangxp commented 4 years ago

一样的情况,悲催得要死

aoyinke commented 4 years ago

+1,让人疯狂挠头的错误

l745230 commented 4 years ago

有一说一,这个AntDesign升级依赖的机制太蛋疼了. 我就改了下AntDesign的版本号,给过下载了13个包. 想回退到上个正常版本都搞不定... 太南了

liangxp commented 4 years ago

@l745230 改了你还想回去?兄弟回不去了!至今各种纠结中!

l745230 commented 4 years ago

@l745230 改了你还想回去?兄弟回不去了!至今各种纠结中!

给Pro跪了

liujiayii commented 4 years ago

pro-layout 和pro-table多回滚几个版本试试,我这layout也是这样,table没事

l745230 commented 4 years ago

pro-layout 和pro-table多回滚几个版本试试,我这layout也是这样,table没事

我用的pro-layout 和pro-table版本没追V5, 已经是挺旧的版本了, 还是被影响到了 回滚要尝试太多版本了,有些功能太旧版本还不支持.. 不折腾了,摸鱼一天,坐等修复.