Git Product home page Git Product logo

webankfintech / fes.js Goto Github PK

View Code? Open in Web Editor NEW
1.3K 26.0 152.0 22.21 MB

Fes.js 是一个基于 Vue 3 好用的前端应用解决方案。以约定、配置化、组件化的设计**,让用户仅仅关心用组件搭建页面内容。技术曲线平缓,上手也简单。在经过多个项目中打磨后趋于稳定。丰富的 Vue 3 生态 和 Fes.js 插件,让业务开发更加简单快捷~

Home Page: http://fesjs.mumblefe.cn/

License: MIT License

JavaScript 75.55% HTML 0.74% Vue 11.03% Less 3.20% Smarty 9.41% SCSS 0.02% CSS 0.03% TypeScript 0.01%
curd-application mock vue ui-design ui vue-admn vue3 vue-framework fesjs fes

fes.js's People

Contributors

1zumii avatar aringlai avatar geeeger avatar hkc452 avatar hollydysania avatar icarusion avatar lucaszhu2zgf avatar lzq920 avatar neostfox avatar nexzhu avatar ocean-gao avatar riesaex avatar ritakang0451 avatar uct8086 avatar wanchun avatar winixt 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fes.js's Issues

[Bug Report/Feeback]

问题描述
简明扼要的描述你的问题
使用this.FesApi.Fetch调接口时,如果resultPath对应字段传过来的是false或者0,会拿不到相应数据。源码中做的判断是返回一个空对象
image

环境描述/版本信息 (请完成如下信息)

  • OS: [e.g. Mac/Windows]
  • Browser [e.g. chrome, safari]
  • Node
  • fes -V
  • 项目package.json

如何复现
复现步骤
1.
2.
3.
4.

预期结果
简明扼要的说明你期待的结果

截图
如果可以的话,附上截图

其它补充内容
任何和这个问题有关的额外内容

侧边栏收起时会被多选框覆盖[Bug Report]

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. 创建一个具有多选框的表格
  2. 点击收起侧边栏
  3. 手表移入侧边栏使侧边栏弹出
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: iOS
  • Browser chrome
  • Version 0.2.5

Additional context
Add any other context about the problem here.

[Bug Report/Feeback] fes runtime error

问题描述
简明扼要的描述你的问题

项目无法跑起来

环境描述/版本信息 (请完成如下信息)

  • OS: MacOS
  • Browser chrome/firfox, 我认为与浏览器无关
  • Node v12.14.0
  • fes -V 0.2.4
  • 项目package.json
{
  "name": "@webank/fes-template",
  "version": "0.1.3",
  "description": "fes项目模版",
  "main": "index.js",
  "scripts": {
    "build": "fes build",
    "dev": "fes dev"
  },
  "keywords": [
    "管理端",
    "fes",
    "fast",
    "easy",
    "strong"
  ],
  "files": [
    ".eslintrc.js",
    ".gitignore",
    "fes.config.js",
    "mock.js",
    "package.json",
    "README.md",
    "/src"
  ],
  "repository": {
    "type": "git"
  },
  "author": "harrywan qlin",
  "license": "MIT",
  "devDependencies": {
    "csp-html-webpack-plugin": "^4.0.0",
    "@webank/eslint-config-webank": "^0.1.4"
  },
  "dependencies": {
    "@webank/fes-core": "^0.1.1",
    "@webank/fes-ui": "^0.1.0",
    "vue": "2.6.12",
    "vue-pdf": "^4.1.0"
  },
  "peerDependencies": {}
}

如何复现
复现步骤

  1. npm install @webank/fes-cli -g
  2. cd <project_path>
  3. fes dev

预期结果
简明扼要的说明你期待的结果

能成功跑起来项目

截图
如果可以的话,附上截图

image

其它补充内容
任何和这个问题有关的额外内容

nodejs log

❯ fes dev
项目没有配置cdn,打包之后将不会请求cdn的地址,请开发者注意!!
------------ find port success. port: 5001
10% building 1/1 modules 0 active[SUCCESS] mock.js 加载成功


 ERROR  Failed to compile with 26 errors                                                                                                 10:55:14

These dependencies were not found:

* @babel/runtime-corejs3/core-js-stable/instance/concat in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/filter in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/find in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/for-each in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/index-of in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/map in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/index.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js& and 1 other
* @babel/runtime-corejs3/core-js-stable/instance/reduce in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/slice in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/sort in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/json/stringify in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/object/assign in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/index.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js& and 1 other
* @babel/runtime-corejs3/core-js-stable/object/keys in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/parse-int in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/set-timeout in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/helpers/asyncToGenerator in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/regenerator in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&

To install them, you can run: npm install --save @babel/runtime-corejs3/core-js-stable/instance/concat @babel/runtime-corejs3/core-js-stable/instance/filter @babel/runtime-corejs3/core-js-stable/instance/find @babel/runtime-corejs3/core-js-stable/instance/for-each @babel/runtime-corejs3/core-js-stable/instance/index-of @babel/runtime-corejs3/core-js-stable/instance/map @babel/runtime-corejs3/core-js-stable/instance/reduce @babel/runtime-corejs3/core-js-stable/instance/slice @babel/runtime-corejs3/core-js-stable/instance/sort @babel/runtime-corejs3/core-js-stable/json/stringify @babel/runtime-corejs3/core-js-stable/object/assign @babel/runtime-corejs3/core-js-stable/object/keys @babel/runtime-corejs3/core-js-stable/parse-int @babel/runtime-corejs3/core-js-stable/set-timeout @babel/runtime-corejs3/helpers/asyncToGenerator @babel/runtime-corejs3/regenerator


 WAIT  Compiling...                                                                                                                      10:55:14

(node:80269) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat '/.VolumeIcon.icns'
(node:80269) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:80269) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


 ERROR  Failed to compile with 26 errors                                                                                                 10:55:14

These dependencies were not found:

* @babel/runtime-corejs3/core-js-stable/instance/concat in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/filter in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/find in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/for-each in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/index-of in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/map in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/index.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js& and 1 other
* @babel/runtime-corejs3/core-js-stable/instance/reduce in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/slice in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/instance/sort in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/json/stringify in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/object/assign in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/index.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js& and 1 other
* @babel/runtime-corejs3/core-js-stable/object/keys in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/parse-int in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/core-js-stable/set-timeout in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/helpers/asyncToGenerator in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&
* @babel/runtime-corejs3/regenerator in /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/file/annotate.vue?vue&type=script&lang=js&, /Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--11-0!/Users/pengliheng/.config/yarn/global/node_modules/thread-loader/dist/cjs.js!/Users/pengliheng/.config/yarn/global/node_modules/@webank/fes-cli/node_modules/babel-loader/lib??ref--11-2!/Users/pengliheng/.config/yarn/global/node_modules/cache-loader/dist/cjs.js??ref--0-0!/Users/pengliheng/.config/yarn/global/node_modules/vue-loader/lib??vue-loader-options!./src/pages/project/view/index.vue?vue&type=script&lang=js&

To install them, you can run: npm install --save @babel/runtime-corejs3/core-js-stable/instance/concat @babel/runtime-corejs3/core-js-stable/instance/filter @babel/runtime-corejs3/core-js-stable/instance/find @babel/runtime-corejs3/core-js-stable/instance/for-each @babel/runtime-corejs3/core-js-stable/instance/index-of @babel/runtime-corejs3/core-js-stable/instance/map @babel/runtime-corejs3/core-js-stable/instance/reduce @babel/runtime-corejs3/core-js-stable/instance/slice @babel/runtime-corejs3/core-js-stable/instance/sort @babel/runtime-corejs3/core-js-stable/json/stringify @babel/runtime-corejs3/core-js-stable/object/assign @babel/runtime-corejs3/core-js-stable/object/keys @babel/runtime-corejs3/core-js-stable/parse-int @babel/runtime-corejs3/core-js-stable/set-timeout @babel/runtime-corejs3/helpers/asyncToGenerator @babel/runtime-corejs3/regenerator

[功能建议] Dropdown 下拉菜单

[功能建议] Dropdown 下拉菜单

当用户选定 DropDown 下拉列表中的一个项目后, 按钮本身的文字修改为:用户选择的项目。

fes dev模式下内存GC

问题描述
fes dev启动开发模式,长时间循环:修改代码 -> 保存 -> 编译,出现内存溢出,直接GC。

--- Last few GCs --->

[83471:0x110008000] 245038697 ms: Mark-sweep 4044.4 (4137.2) -> 4027.0 (4137.9) MB, 1094.9 / 0.3 ms  (average mu = 0.168, current mu = 0.075) allocation failure scavenge might not succeed
[83471:0x110008000] 245039862 ms: Mark-sweep 4043.4 (4137.9) -> 4029.3 (4139.7) MB, 1058.9 / 0.5 ms  (average mu = 0.131, current mu = 0.091) allocation failure scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x1000ab634 node::Abort() [/usr/local/Cellar/node/15.6.0/bin/node]
 2: 0x1000ab7aa node::OnFatalError(char const*, char const*) [/usr/local/Cellar/node/15.6.0/bin/node]
 3: 0x1001e5db9 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/15.6.0/bin/node]
 4: 0x1001e5d63 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/Cellar/node/15.6.0/bin/node]
 5: 0x10032a8cb v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/Cellar/node/15.6.0/bin/node]
 6: 0x10032bbd8 v8::internal::Heap::MarkCompactPrologue() [/usr/local/Cellar/node/15.6.0/bin/node]
 7: 0x100329435 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/Cellar/node/15.6.0/bin/node]
 8: 0x1003279bf v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/Cellar/node/15.6.0/bin/node]
 9: 0x10033078e v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/15.6.0/bin/node]
10: 0x1003307e6 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/Cellar/node/15.6.0/bin/node]
11: 0x100309ada v8::internal::FactoryBase<v8::internal::Factory>::NewRawTwoByteString(int, v8::internal::AllocationType) [/usr/local/Cellar/node/15.6.0/bin/node]
12: 0x1004eeb90 v8::internal::String::SlowFlatten(v8::internal::Isolate*, v8::internal::Handle<v8::internal::ConsString>, v8::internal::AllocationType) [/usr/local/Cellar/node/15.6.0/bin/node]
13: 0x1004f2c8c v8::internal::String::LastIndexOf(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [/usr/local/Cellar/node/15.6.0/bin/node]
14: 0x10027098e v8::internal::Builtin_Impl_StringPrototypeLastIndexOf(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/Cellar/node/15.6.0/bin/node]
15: 0x1008362d9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/usr/local/Cellar/node/15.6.0/bin/node]
[1]    83469 illegal hardware instruction  npm run dev

环境描述/版本信息

  • OS: Mac

  • Node v15.6.0

  • fes v2.0.0-rc.0

  • 项目package.json

{
  "devDependencies": {
    "@webank/eslint-config-webank": "0.2.10"
  },
  "dependencies": {
    "@ant-design-vue/use": "^0.0.1-alpha.9",
    "@ant-design/icons-vue": "^6.0.1",
    "@fesjs/fes": "^2.0.0-rc.0",
    "@fesjs/plugin-access": "^2.0.0-rc.0",
    "@fesjs/plugin-enums": "^2.0.0-rc.0",
    "@fesjs/plugin-layout": "^2.0.0-rc.0",
    "@fesjs/plugin-model": "^2.0.0-rc.0",
    "@fesjs/plugin-qiankun": "2.0.0-rc.8",
    "@fesjs/plugin-request": "2.0.0-rc.13",
    "@fesjs/plugin-vuex": "^2.0.0-rc.16",
    "@webank/we-utils": "1.0.2",
    "ant-design-vue": "^2.0.0",
    "vue": "^3.0.5",
    "vuex": "^4.0.0"
  },
  "private": true
}

如何复现
复现步骤
1.修改代码
2.保存
3.编译
4.重复上面步骤多次

预期结果
正常编译

截图
image

其它补充内容

按照官网生成新项目,会报loader版本不对,重新升级也不行....向往能直接安装使用相同版本

ERROR in ./node_modules/@webank/fes-core/src/views/layout/root.vue
Module Error (from C:/Users/ll/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/vue-loader/lib/index.js):

Vue packages version mismatch:

  • [email protected] (C:\Users\ll\AppData\Roaming\npm\node_modules\vue\dist\vue.runtime.common.js)
  • [email protected] (C:\Users\ll\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\vue-template-compiler\package.json)

This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.

安装时遇错:文件名、目录名或卷标语法不正确

问题描述
安装时遇错,安装成功,创建未成功

文件名、目录名或卷标语法不正确。
error Command failed.
Exit code: 1
Command: D:\nodejs\node_global\bin\create-fes-app
Arguments: vue-fesjs

环境描述/版本信息 (请完成如下信息)

  • OS: Windows
  • Browser:edge
  • Node:14.15.3
  • fes -V1.22.10

如何复现
复现步骤
1.PS D:\DATA\Documents\GitHub> yarn create @fesjs/fes-app vue-fesjs

预期结果
安装成功,创建成功

截图
如果可以的话,附上截图

其它补充内容
任何和这个问题有关的额外内容

[Feature request/config目前只针对路由,希望能针对菜单做配置]

您的Feature Request/想法是否与已有问题有关? 请描述。
简明扼要的描述你的需求、想法、建议

image
请问上面这个config只影响路由,目前layout里面需要重复配置menu:[],能否menu就从各个页面config里抽取?类似的功能是需要做一个定制的layout plugin,还是目前的layout已经支持了,只是文档不好找?
简述你想要的解决方案
没有可以不填写
config里面加个字端就可以判断了,包括子菜单。
menu_level:-1,0,1,2
默认为0,一级菜单。 -1就是不进入菜单。1是子菜单
子菜单需要加一个跟名字对应parent_group:
顺序无所谓了,按汉字来个排序,要指定顺序还得加字段,没啥必要性。

描述你考虑过的替代方案
是否有替代方案、你看过的不错的参考方案、交互方案等
image
image

有个同事做的框架,其实主要是group指明父菜单,noNav判断是否加在导航里,

其它补充内容
任何和这个问题有关的额外内容

[Bug Report] list demo 项目,console 中提示错误信息

问题描述
简明扼要的描述你的问题

执行 fes init [project] 之后,点击菜单:列表
在 console 控制台上看到如下信息:

vue.esm.js?a026:628 [Vue warn]: Invalid prop: type check failed for prop "value". Expected Date, Array, Number, got String with value "".

found in

---> at /Users/harrywan/company/git/fes.js/packages/fes-ui/src/components/date-picker/calendars.vue
at /Users/harrywan/company/git/fes.js/packages/fes-ui/src/components/v-picker-popup/pickerPopup.vue
at /Users/harrywan/company/git/fes.js/packages/fes-ui/src/components/date-picker/datePicker.vue
at /Users/harrywan/company/git/fes.js/packages/fes-ui/src/components/form/formItem.vue
at /Users/harrywan/company/git/fes.js/packages/fes-ui/src/components/form/form.vue
at /Users/harrywan/company/git/fes.js/packages/fes-ui/src/components/modal/modal.vue
at src/pages/list/index.vue

环境描述/版本信息 (请完成如下信息)

  • OS: [e.g. Mac/Windows]
    Ubuntu
  • Browser [e.g. chrome, safari]
    Chrome
  • Node
    v10.19.0
  • fes -V
    0.20
  • 项目package.json

如何复现
复现步骤

  1. fes init [project]
  2. 登录后,点击左侧的列表 /list
  3. 在 browser 的 console 中出现上述 错误信息 (UI显示正常)
  4. 点击其他几个菜单没有上述 console 错误

预期结果
简明扼要的说明你期待的结果

去掉上述错误报错内容。

FesStorage问题

能否把FesStorage设计成使用命名空间区分类型。

我觉得让用户以参数的形式选择储存形式,并不便于维护, 试着写了一下。

class BrowserStorageManager {

    /**
     * if needed
     */
    keyPrefix = '_fes_'

    /**
     * constructor
     */
    constructor() {}

    /**
     * storage a value
     * @param key key
     * @param value the message
     * @param expired for cookie mode
     */
    set(key: string, value: string, expired?: number | string | Date): void {};

    /**
     * get value from storage
     * @param key key
     */
    get(key: string): string | null {
        return null;
    };

    /**
     * clear the storage
     */
    clear(): void {};

    /**
     * remove item from storage
     * @param key key
     */
    remove(key: string): void {};

    /**
     * check item by key
     * @param key key
     */
    has(key: string): boolean {
        return false;
    };

    /**
     * return the storage's keys
     */
    keys(): string[] {
        return [];
    };
}

declare const docCookies: any;

const CookieStorageManager: typeof BrowserStorageManager = class extends BrowserStorageManager {
    constructor() {
        super();
    }
    has(key: string): boolean {
        return docCookies.hasItem(key);
    }
    keys(): string[] {
        return docCookies.keys();
    }
    set(key: string, value: string, expired?: string | number | Date): void {
        if (expired) {
            docCookies.setItem(key, value, expired);
        }
        else {
            docCookies.setItem(key, value);
        }
    }
    get(key: string): string | null {
        return docCookies.getItem(key);
    }
    clear(): void {
        docCookies.keys().forEach((key) => {
            docCookies.removeItem(key);
        });
    }
    remove(key: string): void {
        docCookies.removeItem(key);
    }
}

function makeWebStorageManager(storage: Storage) {
    return class WebStorageMananger extends BrowserStorageManager {
        storage: Storage = storage
        constructor() {
            super();
        }
        has(key: string): boolean {
            return key in this.storage;
        }
        keys(): string[] {
            return Object.keys(this.storage);
        }
        set(key: string, value: string): void {
            // for impliment expired
            // we need to extend props for the message
            // parameter 'expired' should be `seconds` or `utcString` or `Date` or undefined
            // if it is undefined, save permanently
            // i.e. { "t": new Date().toUTCString(), "e": "some utc string", d: "something" }
            // value should `standard` type, a.k.a "string" 
            this.storage.setItem(key, value);
        }
        get(key: string): string | null {
            return this.storage.getItem(key);
        }
        clear(): void {
            return this.storage.clear();
        }
        remove(key: string): void {
            this.storage.removeItem(key);
        }
    }
}
const LocalStorageManager: typeof BrowserStorageManager = makeWebStorageManager(window.localStorage);
const SessionStorageManager: typeof BrowserStorageManager = makeWebStorageManager(window.sessionStorage);

let _cookieStorageManager: BrowserStorageManager;
let _localStorageManager: BrowserStorageManager;
let _sessionStorageManager: BrowserStorageManager;
const storage = {
    get cookie() {
        if (!_cookieStorageManager) {
            return (_cookieStorageManager = new CookieStorageManager());
        }
        return _cookieStorageManager;
    },
    get local() {
        if (!_localStorageManager) {
            return (_localStorageManager = new LocalStorageManager());
        }
        return _localStorageManager;
    },
    get session() {
        if (!_sessionStorageManager) {
            return (_sessionStorageManager = new SessionStorageManager());
        }
        return _sessionStorageManager;
    }
}

export default Object.freeze(storage);

fes design for vue3

fes.js 现状

Fes 本身有存在一些设计上的不足。我们把太多的能力强耦合进 fes-core 里面,例如项目布局、全局状态管理、权限管理等。因为是和 fes-core 强耦合的,有时候想换个布局方式变得不可能。有些项目不需要全局状态管理也被强打包进去。或者想扩展一些能力,例如增加换肤,也只能去改 fes-core,扩展能力不足。fes-plugin 的设计也有类似的问题,因为前期考虑的一些不足,和 fes-core 也有强依赖管理,新增、移除plugin都很麻烦。

借机Vue3.0的升级,Fes 准备进行一次大的重构,提升 Fes 的扩展能力。

fes.js for vue3

重新设计之后我们希望 fes-core 更轻量,大部分能力通过 plugin 去扩展,然后把 storage、DOM 操作函数等功能函数独立出来作为一个 utils 库,让“上帝的归上帝,凯撒的归凯撒”。

那么 fes-core 应该承载的职责是什么呢?

我们认为有三个就够了,一个应用的初始化,一个路由管理,一个 plugin 管理。项目布局、权限管理、国际化等等全部通过插件去实现。这样做的好处在于,如果用户想换一种布局方式,换一个插件就好了。如果用户想实现换肤的能力,写一个插件就好了,不需要改动 fes-core,这样也使得 Fes 更健壮,能力更强大。

大体框架已经搭好。在 vue3 分支。

欢迎大家参与进来一起完善。

[Bug Report/Feeback]

问题描述
简明扼要的描述你的问题
路由history模式,二级页面静态资源路径bug

环境描述/版本信息 (请完成如下信息)

  • OS: [e.g. Mac/Windows]
  • Browser [e.g. chrome, safari]
  • Node
  • fes -V
  • 项目package.json

如何复现
复现步骤

二级页面,如/abc/def里面静态图片资源
image

会被编译为:
image
这个路径不应该带.,即history模式需要考虑当前页面路由算require静态资源的path,nuxt里面这个应该是处理的比较好的。
目前fes.js没有针对history模式二三级页面的路径做处理。

预期结果
简明扼要的说明你期待的结果
期望路径是正确的绝对路径或者相对路径。
/static/images/.....

截图
如果可以的话,附上截图

其它补充内容
任何和这个问题有关的额外内容

mock.js文件里加上proxy代理 项目启动报错

问题描述
简明扼要的描述你的问题
如题 在mock.js文件里加上 cgiMock.proxy('http://192.168.10.221:8090/qualitis')之后 项目启动报错

环境描述/版本信息 (请完成如下信息)

  • OS: MAC

  • Browser chrome

  • Node:v14.17.4

  • fes -V: 执行fes -v提示没有安装fes

  • 项目package.json:

  • {
    "name": "Exchangis",
    "version": "0.5.0",
    "description": "Exchangis",
    "main": "app.js",
    "scripts": {
    "build": "fes build",
    "serve": "fes dev",
    "fix": "eslint --ext .fes src --fix"
    },
    "keywords": [
    "管理端",
    "fes",
    "fast",
    "easy",
    "strong"
    ],
    "files": [
    ".eslintrc.js",
    ".gitignore",
    "fes.config.js",
    "mock.js",
    "package.json",
    "README.md",
    "/src"
    ],
    "repository": {
    "type": "git"
    },
    "author": "harrywan qlin",
    "license": "MIT",
    "devDependencies": {
    "@vue/test-utils": "^1.1.0",
    "@webank/eslint-config-webank": "^0.1.4",
    "@webank/fes-cli": "^0.4.6",
    "chai": "^4.2.0",
    "csp-html-webpack-plugin": "^4.0.0"
    },
    "dependencies": {
    "@webank/fes-core": "^0.4.8",
    "@webank/fes-ui": "^0.4.8",
    "chart.js": "^2.9.4",
    "vue-chartjs": "^3.5.1"
    },
    "gitHead": "357575247bde6d1d24a8d2e11d2bfe7adbe6abd6"
    }

如何复现
mock.js配置如图
image

报错信息如图:
image

[Feature request/新需求]希望cli能增加新增页面的命令

您的Feature Request/想法是否与已有问题有关? 请描述。
希望cli能增加新增页面的命令,如果能提供模板选择就更好了。就目前我的刚需是带搜索的Table页,每次新增页面都需要手动复制粘贴,于是便想起了Taro cli的新增页面命令带给我的便利之处。希望Fes也能提供如此便利的功能

简述你想要的解决方案
比如可以提供newpage的命令,使用方法如下:
fes newpage list
如此便会在pages下新建list/index.vue
或者可以提供模板选择
fes newpage list --template table
如此便会在pages下新建list/index.vue,不同的是它将自带搜索头部和table的示例
我想要的功能大概如此

描述你考虑过的替代方案
由于对node并不熟悉,我曾用go实现过这个功能,用起来也很舒服,但是将其整合进fes的cli会更好。

其它补充内容

[Feature request/新需求] 能否支持 pug

您的Feature Request/想法是否与已有问题有关? 请描述。
简明扼要的描述你的需求、想法、建议

template 不支持 pug 语法

简述你想要的解决方案
没有可以不填写

image

描述你考虑过的替代方案
是否有替代方案、你看过的不错的参考方案、交互方案等

没替代方案.

其它补充内容
任何和这个问题有关的额外内容

[Bug Report/Feeback]T ab 组件删除最后一个tab后, dom还留存.

问题描述

Tab 组件删除最后一个tab后, dom还留存.

环境描述/版本信息 (请完成如下信息)

  • OS: Mac
  • Browser chrome
  • Node
  • fes -V
  • 项目package.json

如何复现
复现步骤
1.打开 Tabs 标签页
2.在 自定义动作 + 可删除 + 滚动 示例中点击删除tab
3.在删除最后一个tab后,发现,dom还在

预期结果
删除干净或隐藏

截图

image

其它补充内容
任何和这个问题有关的额外内容

[Bug Report/Feeback]

问题描述
简明扼要的描述你的问题
登录后,进入首页点击退出,登录界面的左菜单还存在,刷新后正常

环境描述/版本信息 (请完成如下信息)

  • OS: [Windows]
  • Browser [chrome]
  • Node
  • fes 0.2.3
  • 项目package.json
    {
    "name": "@webank/fes-template",
    "version": "0.2.3",
    "description": "fes项目模版",
    "main": "index.js",
    "scripts": {
    "build": "fes build",
    "dev": "fes dev"
    },
    "keywords": [
    "管理端",
    "fes",
    "fast",
    "easy",
    "strong"
    ],
    "files": [
    ".eslintrc.js",
    ".gitignore",
    "fes.config.js",
    "mock.js",
    "package.json",
    "README.md",
    "/src"
    ],
    "repository": {
    "type": "git"
    },
    "author": "harrywan qlin",
    "license": "MIT",
    "devDependencies": {
    "@webank/eslint-config-webank": "^0.1.4",
    "csp-html-webpack-plugin": "^4.0.0"
    },
    "dependencies": {
    "@antv/data-set": "^0.11.7",
    "@antv/g2": "^4.0.15",
    "@babel/runtime-corejs3": "^7.11.2",
    "@webank/fes-cli": "^0.2.3",
    "@webank/fes-core": "^0.2.3",
    "@webank/fes-ui": "^0.2.3",
    "qs": "^6.9.4"
    },
    "gitHead": "65337782e4c87fae9450be6ad0080038d939f235"
    }

如何复现
复现步骤
1.登录页面
2.单击退出

预期结果
简明扼要的说明你期待的结果
退出登录后登录界面做菜单自动隐藏

截图
如果可以的话,附上截图

其它补充内容
任何和这个问题有关的额外内容

建议

能把 组件 Fes-xxx,内置方法之类的全小写吗?
一直切换大小写 痛苦指数++

本来就是fes-cli 搭建的项目,其中各个属性还附带上fes 略显繁琐,重复命名

<Wb-button v-permission:="/hr/shelf-action"></Wb-button>
 this.FesApp.setAllowPage(['/hr/shelf-action', ...])
FesData,
FesSyncData,
FesEnv
#FesStorage
#FesUtil
#FesApi
#FesLeft
#FesHeader
#FesData

[Bug Report/Feeback]

问题描述
FesApi设置Response无效

环境描述/版本信息 (请完成如下信息)

  • OS: [Windows]
  • Browser [chrome]
  • Node
  • fes 0.2.3
  • 项目package.json
    {
    "name": "@webank/fes-template",
    "version": "0.2.3",
    "description": "fes项目模版",
    "main": "index.js",
    "scripts": {
    "build": "fes build",
    "dev": "fes dev"
    },
    "keywords": [
    "管理端",
    "fes",
    "fast",
    "easy",
    "strong"
    ],
    "files": [
    ".eslintrc.js",
    ".gitignore",
    "fes.config.js",
    "mock.js",
    "package.json",
    "README.md",
    "/src"
    ],
    "repository": {
    "type": "git"
    },
    "author": "harrywan qlin",
    "license": "MIT",
    "devDependencies": {
    "@webank/eslint-config-webank": "^0.1.4",
    "csp-html-webpack-plugin": "^4.0.0"
    },
    "dependencies": {
    "@antv/data-set": "^0.11.7",
    "@antv/g2": "^4.0.15",
    "@babel/runtime-corejs3": "^7.11.2",
    "@webank/fes-cli": "^0.2.3",
    "@webank/fes-core": "^0.2.3",
    "@webank/fes-ui": "^0.2.3",
    "qs": "^6.9.4"
    },
    "gitHead": "65337782e4c87fae9450be6ad0080038d939f235"
    }

如何复现
复现步骤
1.在aap.js中设置一下内容
this.FesApi.option({
transformRequest: [function (data) {
return qs.stringify(data)
}]
});

// 设置响应结构
this.FesApi.setResponse({
    resultPath : '*' 
});

this.FesApi.setHeader({
    'Content-Type': 'application/x-www-form-urlencoded'

})
2.任意界面调用如下接口
let datas = {'Code':'admin', 'Password': '123456'}
this.FesApi.fetch('/Authorization/Login',datas).then(res=>{
console.log(res)
})

预期结果
请求接口返回内容正常

截图
如果可以的话,附上截图
image

image

其它补充内容
任何和这个问题有关的额外内容

运行第一个例子时候遇到问题

问题描述
简明扼要的描述你的问题

npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: Use cheerio-select instead
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
npm WARN deprecated [email protected]: this
npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @webank/fes-ui@^0.4.7.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget 
npm ERR! notarget It was specified as a dependency of 'umobox-fes'
npm ERR! notarget 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/lizhifeng/.npm/_logs/2021-01-19T02_04_21_512Z-debug.log

进程已结束,退出代码 1

环境描述/版本信息 (请完成如下信息)

  • OS: Mac Big Sur
  • Browser [e.g. chrome, safari]
  • Node v14.15.4
  • fes -V 0.4..6
  • 项目package.json
  "name": "@webank/fes-template",
  "version": "0.4.7",
  "description": "fes项目模版",
  "main": "index.js",
  "scripts": {
    "build": "fes build",
    "dev": "fes dev",
    "test": "fes test:unit --single-run",
    "cover": "fes test:unit --single-run --coverage",
    "lint": "eslint -c ./.eslintrc.js --fix  --ext .js,.vue,.fes ./src"
  },
  "keywords": [
    "管理端",
    "fes",
    "fast",
    "easy",
    "strong"
  ],
  "files": [
    ".eslintrc.js",
    ".gitignore",
    "fes.config.js",
    "karma.config.js",
    "webpack.config.js",
    "mock.js",
    "package.json",
    "README.md",
    "/src",
    "/test"
  ],
  "repository": {
    "type": "git"
  },
  "author": "harrywan qlin",
  "license": "MIT",
  "devDependencies": {
    "@vue/test-utils": "^1.1.0",
    "@webank/eslint-config-webank": "^0.1.4",
    "@webank/fes-cli": "^0.4.6",
    "chai": "^4.2.0",
    "csp-html-webpack-plugin": "^4.0.0"
  },
  "dependencies": {
    "@antv/data-set": "^0.11.7",
    "@antv/g2": "^4.0.15",
    "@webank/fes-core": "^0.4.5",
    "@webank/fes-ui": "^0.4.7"
  },
  "gitHead": "efd790b7de23ab8cd4340b4601576b6880d4d6dd"
}

[Feature request/新需求]

您的Feature Request/想法是否与已有问题有关? 请描述。
简明扼要的描述你的需求、想法、建议

按照楼主提供的体验地址,简单的体验了一下,发现菜单切换特别的僵硬,太突兀了,希望切换的时候,可以加个简单的动画

简述你想要的解决方案
没有可以不填写

在menu组件外使用 过渡动画实现过渡,不至于切换太过生硬

描述你考虑过的替代方案
是否有替代方案、你看过的不错的参考方案、交互方案等

其它补充内容
任何和这个问题有关的额外内容

建议动画可以增加参数配置,例如衔接的快慢之类的

[Feature request/新需求] 路由默认页面匹配

您的Feature Request/想法是否与已有问题有关? 请描述。
简明扼要的描述你的需求、想法、建议

我想做个404 定制化页面, 目前没有看到相关配置.

    pages
    ├── index.vue         # 根路由页面 路径 index.html#/
    ├── a.vue             # 路径 /a
    ├── b                 # 文件夹b
    │   ├── index.vue     # 路径 /b
    │   ├── @id.vue       # 动态路由 /b/:id
    │   └── c.vue         # 路径 /b/c
    └── layout.vue        # 根路由下所有page共用的外层

简述你想要的解决方案
没有可以不填写

描述你考虑过的替代方案
是否有替代方案、你看过的不错的参考方案、交互方案等

其它补充内容
任何和这个问题有关的额外内容

[Bug Report/Feeback]

问题描述

UI组件Pagination 分页 样式错误

环境描述/版本信息 (请完成如下信息)

  • OS: Mac
  • Browser: Chrome

截图
image

[Feature request] alias 支持?

您的Feature Request/想法是否与已有问题有关? 请描述。
简明扼要的描述你的需求、想法、建议

好像不支持 alias, 也没看到有哪里可以配置它.

https://webpack.js.org/configuration/resolve/#resolvealias

简述你想要的解决方案
没有可以不填写
无.

描述你考虑过的替代方案
是否有替代方案、你看过的不错的参考方案、交互方案等

其它补充内容
任何和这个问题有关的额外内容

怎么生成自动编译后的路由配置菜单

根据文档介绍 这边配置了对应的page文件夹、在fes编译过程中就会自动生成菜单路由、但是目前都是自动修改fes.config.js文件中的menu,并且不会事实编译更新、需要每次重新fes dev?这个是我的处理方式不对么?
image
image
image

[Feature request/新需求]建议将node-sass 替换成 dart-sass

您的Feature Request/想法是否与已有问题有关? 请描述。
fes vue2版本,fes-ui 依赖了 node-sass 这个包,由于众所周知的原因,node-sass 进场安装失败,建议替换成 dart-sass

简述你想要的解决方案
用 sass 包 替换 node-sass 包

FesApi.fetch 的时候碰到 Server-end API error 错误

调用api时候发生错误:
经过测试:

1) 调用服务器 api 接口 /api/v1/search/cms/keywords/add , 可以正常访问
2) fetch 时,提交的 data {} 数据,后台可以正常获得
3) 服务器 api response json数据 : {"status":"you are logged in"} ,状态正常

调用代码:

this.FesApi.fetch('/api/v1/search/cms/keywords/add',{username:'[email protected]',password:'pass'}).then((res) => {
console.log("query_search res:", res);
});

问题描述:
在 FireFox web console 中发现错误信息,如下:

    Uncaught (in promise) Error: Server-end API error, please contact the admin.
        success index.js:141
        promise callback*action index.js:235
        fetch index.js:288
        search index.vue:94
        VueJS 4
        handleClick fes-ui.js:8265
        VueJS 33
    index.js:141

预期结果:在 console 打印:
console.log("query_search res:", res);

Server-end API error 这个错误信息不知道怎么调试,但是不知道那里出现了错误。

补充,如果把上面代码 then 中的 : (res) 替换成 : res ,如下:

this.FesApi.fetch('/api/v1/search/cms/keywords/add',{username:'[email protected]',password:'pass'}).then( res => {
console.log("query_search res:", res);
});

仍然会报错,但是错误 不在 Web console 中出现,而是以: popup message 的方式显示:

Server-end API error, please contact the admin.

多谢

安装fes.js失败

问题描述
简明扼要的描述你的问题
安装fes.js失败

环境描述/版本信息 (请完成如下信息)

  • OS: [e.g. Mac/Windows]
  • Browser [e.g. chrome, safari]
  • Node 16.13.1
  • fes -V
  • 项目package.json

如何复现
复现步骤

  1. 使用 npm install @webank/fes-cli -g 命令安装
    2.提示失败

image

预期结果
简明扼要的说明你期待的结果

截图
如果可以的话,附上截图

image

其它补充内容
任何和这个问题有关的额外内容

[Bug Report/Feeback]

问题描述
升级了 fes 版本到 0.2.4
fes -v 版本是: 0.2.4

升级后发现如下问题:

1) 项目的 Logo 图片无法显示
2) api 调用失败了 ,在 mock 中设置了 proxy  http://127.0.0.1:8080  ,后台没有访问请求。

fes 升级到最新版本后, 老的项目如何兼容到新版本呢?

需要做那些改动?

组件是直接用antd-vue的组件吗 还是fes-ui

您的Feature Request/想法是否与已有问题有关? 请描述。
简明扼要的描述你的需求、想法、建议

简述你想要的解决方案
没有可以不填写

描述你考虑过的替代方案
是否有替代方案、你看过的不错的参考方案、交互方案等

其它补充内容
任何和这个问题有关的额外内容

[Bug Report/Feeback]

问题描述

在项目打包阶段,发现无法 成功运行 build 命令

$ npm run build

@webank/[email protected] build /xxx/xxx/xxx/xxx/
fes build


项目没有配置cdn,打包之后将不会请求cdn的地址,请开发者注意!!

WebpackOptionsValidationError: 
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

 - configuration.plugins[11] should be one of these:
   object { apply, … } | function
   -> Plugin of type object or instanceof Function
   Details:
    * configuration.plugins[11] should be an object.
      -> Plugin instance
    * configuration.plugins[11] should be an instance of function
      -> Function acting as plugin

npm run build 的时候失败!

环境:
只是运行了 fes init [项目名称]
没有安装 webpack 。

[Bug Report/Feeback]

问题描述
使用 yarn 安装fes_cli 后,初始化完的项目无法正常运行

环境描述/版本信息 (请完成如下信息)

  • OS: Mac
  • Browser chrome, safari
  • Node 14
  • fes 0.1.0

如何复现
复现步骤

  1. yarn global add @webank/fes-cli
  2. fes init f1 && cd f1
  3. npm I
  4. npm run dev

会出现报错信息,大意是找不到某些node_modules下的库

预期结果
简明扼要的说明你期待的结果

截图

其它补充内容
使用NPM 安装的fes_cli 初始化的项目是可以正常运行的

[Feature request/新需求]求支持 SSR

您的Feature Request/想法是否与已有问题有关? 请描述。
简明扼要的描述你的需求、想法、建议

简述你想要的解决方案
没有可以不填写

描述你考虑过的替代方案
是否有替代方案、你看过的不错的参考方案、交互方案等

其它补充内容
任何和这个问题有关的额外内容

CORS 跨域请求的问题

碰到了一个CORS 跨域请求的问题

我的环境:
1)本地运行 fes dev
2)本地另一个端口运行api 接口服务

碰到跨域的问题:

1) 跨域访问,根据协议要求,会先发出 OPTIONS 请求

比如访问:
XHR OPTIONS http://localhost:9000/api/v1/search/cms/keywords/add

2)如果服务器没有处理 OPTIONS 请求:
会出现以下错误:

[HTTP/1.1 404 Not Found 1ms]
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:9000/api/v1/search/cms/keywords/add. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:9000/api/v1/search/cms/keywords/add. (Reason: CORS request did not succeed).

3)如果服务器处理了 OPTIONS 请求:

即:OPTIONS 中添加:

Header().Set("Access-Control-Allow-Origin", "*")

会出现以下错误:

Cross-Origin Request Blocked: 
The Same Origin Policy disallows reading the remote resource at ‘http://localhost:9000/api/v1/search/cms/keywords/add’. 
(Reason: Credential is not supported if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’).

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:9000/api/v1/search/cms/keywords/add. 
(Reason: CORS request did not succeed).

4)为什么访问 localhost:9000 仍然有跨域的问题呢?

5)我参考了 MDN 的信息:
To correct this problem on the client side, simply ensure that the credentials flag's value is false when issuing your CORS request.

来源:
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials

是不是应该修改 FesApi 的相关代码?

我的问题:CORS 跨域问题应该如何设置?

安装fes-cli,init了项目后,运行报错缺少fes-code模块

错误代码如下:

ERROR Failed to compile with 1 errors 4:15:07 ├F10: PM┤
This dependency was not found:

  • E:\code\skywares-admin\node_modules@webank\fes-core\src\app.js in multi webpack-hot-middleware/client?reload=true C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/babel-polyfill ./node_modules/@webank/fes-core/src/app.js

To install it, you can run: npm install --save E:\code\skywares-admin\node_modules@webank\fes-core\src\app.js
webpack built 158881a6b07d7f5de2cf in 12851ms
× 「wdm」: Hash: 158881a6b07d7f5de2cf
Version: webpack 4.44.1
Time: 12851ms
Built at: 2020-09-02 4:15:07 ├F10: PM┤
Asset Size Chunks Chunk Names
index.html 1.35 KiB [emitted]
js/app.js 1.5 MiB app [emitted] app
Entrypoint app = js/app.js
[0] multi webpack-hot-middleware/client?reload=true C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/babel-polyfill ./node_modules/@webank/fes-core/src/app.js 52 bytes {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\ansi-html\index.js] C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/ansi-html/index.js 4.64 KiB {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\ansi-regex\index.js] C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/ansi-regex/index.js 136 bytes {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\babel-polyfill\lib\index.js] C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/babel-polyfill/lib/index.js 833 bytes {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\babel-polyfill\node_modules\regenerator-runtime\runtime.js] C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/babel-polyfill/node_modules/regenerator-runtime/runtime.js 24.2 KiB {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\core-js\fn\regexp\escape.js] C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/core-js/fn/regexp/escape.js 108 bytes {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\core-js\modules_core.js] C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/core-js/modules/_core.js 124 bytes {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\core-js\shim.js] C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/core-js/shim.js
8.22 KiB {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\querystring-es3\index.js] C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/querystring-es3/index.js 126 bytes {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\strip-ansi\index.js] C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/strip-ansi/index.js 162 bytes {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\webpack-hot-middleware\client-overlay.js] (webpack)-hot-middleware/client-overlay.js 2.14 KiB {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\webpack-hot-middleware\client.js?reload=true] (webpack)-hot-middleware/client.js?reload=true 7.58 KiB {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\webpack-hot-middleware\process-update.js] (webpack)-hot-middleware/process-update.js 4.25 KiB {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\webpack\buildin\global.js] (webpack)/buildin/global.js 905 bytes {app} [built]
[C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\webpack\buildin\module.js] (webpack)/buildin/module.js 552 bytes {app} [built]
+ 332 hidden modules

ERROR in multi webpack-hot-middleware/client?reload=true C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/babel-polyfill ./node_modules/@webank/fes-core/src/app.js
Module not found: Error: Can't resolve 'E:\code\skywares-admin\node_modules@webank\fes-core\src\app.js' in 'E:\code\skywares-admin'
@ multi webpack-hot-middleware/client?reload=true C:/Users/Admin/AppData/Roaming/npm/node_modules/@webank/fes-cli/node_modules/babel-polyfill ./node_modules/@webank/fes-core/src/app.js app[2]

ERROR in Error: Child compilation failed:
Entry module not found: Error: Can't resolve 'E:\code\skywares-admin\node_modules@webank\fe s-core\src\index.html' in 'E:\code\skywares-admin':
Error: Can't resolve 'E:\code\skywares-admin\node_modules@webank\fes-core\src\index.html' i n 'E:\code\skywares-admin'

  • compiler.js:79
    [npm]/[fes-cli]/[html-webpack-plugin]/lib/compiler.js:79:16

  • Compiler.js:343
    [npm]/[fes-cli]/[webpack]/lib/Compiler.js:343:11

  • Compiler.js:681
    [npm]/[fes-cli]/[webpack]/lib/Compiler.js:681:15

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [npm]/[fes-cli]/[tapable]/lib/Hook.js:154:20

  • Compiler.js:678
    [npm]/[fes-cli]/[webpack]/lib/Compiler.js:678:31

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [npm]/[fes-cli]/[tapable]/lib/Hook.js:154:20

  • Compilation.js:1423
    [npm]/[fes-cli]/[webpack]/lib/Compilation.js:1423:35

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [npm]/[fes-cli]/[tapable]/lib/Hook.js:154:20

  • Compilation.js:1414
    [npm]/[fes-cli]/[webpack]/lib/Compilation.js:1414:32

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [npm]/[fes-cli]/[tapable]/lib/Hook.js:154:20

  • Compilation.js:1409
    [npm]/[fes-cli]/[webpack]/lib/Compilation.js:1409:36

Child html-webpack-plugin for "index.html":

ERROR in Entry module not found: Error: Can't resolve 'E:\code\skywares-admin\node_modules\@webank\fes-core\src\index.html' in 'E:\code\skywares-admin'

i 「wdm」: Failed to compile.
GET /favicon.ico 500 7.516 ms - 2421
[SUCCESS] mock.js 加载成功
TypeError: res.json is not a function
at C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\build\mock\init.js:102:21
at Layer.handle [as handle_request] (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:317:13)
at C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:335:12)
at next (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:275:10)
at C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:635:15
at next (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:260:14)
at Function.handle (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:174:3)
at router (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:47:12)
at C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\build\mock\init.js:88:20
at Layer.handle [as handle_request] (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:317:13)
at C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:335:12)
at next (C:\Users\Admin\AppData\Roaming\npm\node_modules@webank\fes-cli\node_modules\express\lib\router\index.js:275:10)

[Bug Report/Feeback] 关于v-permission的使用

在官方文档里按照样例使用按钮级别的权限控制,发现没有反应

<Wb-button v-permission:="'/hr/shelf-action'"></Wb-button>
这是admin的权限列表
admin: ['/dashboard/console', '/list']
资源列表不包含'/hr/shelf-action',此按钮依旧可见。

控制台报错
vue.esm.js?a026:628 [Vue warn]: Failed to resolve directive: permission:
(found in at src/pages/list/index.vue)
版本0.4.6

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.