diff --git a/.github/ISSUE_TEMPLATE/bug-report---zh-----.md b/.github/ISSUE_TEMPLATE/bug-report---zh-----.md new file mode 100644 index 00000000..e65d69a3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report---zh-----.md @@ -0,0 +1,41 @@ +--- +name: 'Bug report<#!zh: 中文>' +about: Bug Report、反馈问题、提 Bug +title: "[Bug Report/Feeback]" +labels: '' +assignees: '' + +--- + +**问题描述** +简明扼要的描述你的问题 + + + +**环境描述/版本信息 (请完成如下信息)** + - OS: [e.g. Mac/Windows] + - Browser [e.g. chrome, safari] + - Node + - fes -V + - 项目package.json + + +**如何复现** +复现步骤 +1. +2. +3. +4. + +**预期结果** +简明扼要的说明你期待的结果 + + + +**截图** +如果可以的话,附上截图 + + + +**其它补充内容** +任何和这个问题有关的额外内容 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..5dd97eaa --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '[Bug Report]' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +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. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature-request---zh-----.md b/.github/ISSUE_TEMPLATE/feature-request---zh-----.md new file mode 100644 index 00000000..f7555689 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request---zh-----.md @@ -0,0 +1,25 @@ +--- +name: 'Feature request/新需求<#!zh: 中文>' +about: 如果您有好的想法/建议,请提给我们 +title: '[Feature request/新需求]' +labels: '' +assignees: '' + +--- + +**您的Feature Request/想法是否与已有问题有关? 请描述。** +简明扼要的描述你的需求、想法、建议 + + +**简述你想要的解决方案** +没有可以不填写 + + + +**描述你考虑过的替代方案** +是否有替代方案、你看过的不错的参考方案、交互方案等 + + + +**其它补充内容** +任何和这个问题有关的额外内容 diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..214cad85 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '[Feature request]' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/gitee-mirror.yml b/.github/workflows/gitee-mirror.yml index 65943cc1..5513f4c5 100644 --- a/.github/workflows/gitee-mirror.yml +++ b/.github/workflows/gitee-mirror.yml @@ -4,7 +4,7 @@ # This is a basic workflow to help you get started with Actions -name: gitee-mirror +name: Gitee Mirror # Controls when the action will run. Triggers the workflow on push or pull request # events but only for the master branch diff --git a/packages/fes-core/src/instance/page.js b/packages/fes-core/src/instance/page.js index b0b72a30..7a42d7e7 100644 --- a/packages/fes-core/src/instance/page.js +++ b/packages/fes-core/src/instance/page.js @@ -8,6 +8,18 @@ import fesConfig from '../config'; const fesDataCache = {}; +const certainConfig = function (matchPages, prop, n = 1) { + const length = matchPages.length; + if (n > length) { + return matchPages[0].components.default[prop]; + } + const matchPage = matchPages[length - n].components.default; + if (typeof matchPage[prop] === 'boolean') { + return matchPage[prop]; + } + return certainConfig(matchPages, prop, n + 1); +}; + const Page = { install(Vue, App) { Vue.mixin({ @@ -44,20 +56,22 @@ const Page = { return data; }, created() { + const defaultHeader = fesConfig.FesHeader === undefined ? false : fesConfig.FesHeader; + const defaultLeft = fesConfig.FesLeft === undefined ? true : fesConfig.FesLeft; // route切换时,重新设置为初始值 const comp = (this.$route && this.$route.matched) || []; if (comp.length > 0) { const matchPage = comp[comp.length - 1].components.default; if (this.$options.__file === matchPage.__file) { - const defaultHeader = fesConfig.FesHeader === undefined ? false : fesConfig.FesHeader; - const defaultLeft = fesConfig.FesLeft === undefined ? true : fesConfig.FesLeft; - if (typeof matchPage.FesHeader === 'boolean') { - this.$root.header = matchPage.FesHeader; + const header = certainConfig(comp, 'FesHeader'); + if (typeof header === 'boolean') { + this.$root.header = header; } else { this.$root.header = defaultHeader; } - if (typeof matchPage.FesLeft === 'boolean') { - this.$root.left = matchPage.FesLeft; + const left = certainConfig(comp, 'FesLeft'); + if (typeof left === 'boolean') { + this.$root.left = left; } else { this.$root.left = defaultLeft; } diff --git a/packages/fes-core/src/views/styles/layout.scss b/packages/fes-core/src/views/styles/layout.scss index 559a944b..07196b60 100644 --- a/packages/fes-core/src/views/styles/layout.scss +++ b/packages/fes-core/src/views/styles/layout.scss @@ -187,7 +187,7 @@ $dark-selected-color: #ffffff; left: 0; top: 0; width: 100%; - min-width: 1280px; + min-width: 1240px; height: 60px; } .layout-right { @@ -403,12 +403,12 @@ $dark-selected-color: #ffffff; right: 0; top: 0; bottom: 0; - min-width: 1280px; + min-width: 1240px; } .layout-right-header { width: 100%; - min-width: 1280px; + min-width: 1240px; height: 60px; line-height: 60px; position: relative; diff --git a/packages/fes-template/fes.config.js b/packages/fes-template/fes.config.js index 7dcb15ea..1b5a8507 100644 --- a/packages/fes-template/fes.config.js +++ b/packages/fes-template/fes.config.js @@ -1,7 +1,10 @@ module.exports = { - mode: 'vertical', // 可选有vertical、horizontal,默认vertical - theme: 'blue', // 可选有blue、dark,默认blue - fesName: 'xx 运营平台', // 项目名称 + // 可选有vertical、horizontal,默认vertical + mode: 'vertical', + // 可选有blue、dark,默认blue + theme: 'blue', + // 项目名称 + fesName: 'Fes.js 运营平台', favicon: 'static/favicon.ico', // 图标 // 环境变量配置, 默认使用local环境 env: { @@ -25,94 +28,54 @@ module.exports = { }, // map map: { - status: [['1', '成功'], ['2', '失败']] + level: [['1', '青铜'], ['2', '白银'], ['3', '黄金'], ['4', '铂金']] }, // 左侧菜单配置 menu: [ { - title: '$i18n.menu.interface', - path: '/api', + title: '列表页', subMenu: [ { - title: 'Fes', - path: '/api/fes' - }, - { - title: 'FesApp', - path: '/api/fesApp' - }, - { - title: 'FesApi', - path: '/api/fesApi' - }, - { - title: 'FesMenu', - path: '/api/fesMenu' - }, - { - title: 'FesMap', - path: '/api/fesMap' - }, - { - title: 'FesFesx', - path: '/api/fesFesx' - }, - { - title: 'FesStorage', - path: '/api/fesStorage' - }, - { - title: 'FesUtil', - path: '/api/fesUtil' + title: '查询列表', + path: '/list' } ] }, { - title: '路由', - path: '/route' + title: '表单页', + subMenu: [ + { + title: '基础表单', + path: '/form/base' + }, + { + title: '分步表单', + path: '/form/step' + } + ] }, { - icon: 'static/bell.png', - title: '列表页', - path: '/list' - }, - { - title: '内容很多的编辑', - path: '/list/edit' - }, - { - title: '显示头部', - path: '/header' - }, - { - title: '静态资源', - path: '/static' - }, - { - title: '子路由', + title: '功能演示', path: '/layout', subMenu: [ { - title: '子路由A', - path: '/layout/a' + title: '$i18n.menu.internationalization', + path: '/layout/i18n' }, { - title: '子路由B', - path: '/layout/b' + title: '静态资源', + path: '/layout/static' } ] - }, - { - title: '国际化', - path: '/i18n' } ], i18n: { - locale: 'zh-cn', // default zh-cn + // default zh-cn + locale: 'zh-cn', messages: { 'zh-cn': { menu: { - interface: '接口' + internationalization: '国际化' }, overview: '概述', i18n: { @@ -120,11 +83,11 @@ module.exports = { achieve: '实现。', ui: 'UI组件' }, - title: '标题' + title: 'Fes.js 运营平台' }, en: { menu: { - interface: 'interface' + internationalization: 'internationalization' }, overview: 'Overview', i18n: { @@ -132,7 +95,7 @@ module.exports = { achieve: 'to achieve.', ui: 'UI components' }, - title: 'title' + title: 'Fes.js Admin' } } } diff --git a/packages/fes-template/package.json b/packages/fes-template/package.json index 8aac0e06..716bf73d 100644 --- a/packages/fes-template/package.json +++ b/packages/fes-template/package.json @@ -1,6 +1,6 @@ { "name": "@webank/fes-template", - "version": "0.1.3", + "version": "0.1.4", "description": "fes项目模版", "main": "index.js", "scripts": { diff --git a/packages/fes-template/src/assets/images/logo.png b/packages/fes-template/src/assets/images/logo.png index 217f6597..d8b32345 100644 Binary files a/packages/fes-template/src/assets/images/logo.png and b/packages/fes-template/src/assets/images/logo.png differ diff --git a/packages/fes-template/src/assets/styles/main.scss b/packages/fes-template/src/assets/styles/main.scss index 76e41f96..bc4b9434 100644 --- a/packages/fes-template/src/assets/styles/main.scss +++ b/packages/fes-template/src/assets/styles/main.scss @@ -28,12 +28,12 @@ ul { padding-left: 40px; } - li { list-style-type: disc; margin-bottom: 5px; font-size: 14px; } + table{ border-collapse: collapse; border-spacing: 0; @@ -47,4 +47,44 @@ padding: 8px 16px; text-align: left; } -} \ No newline at end of file +} + +.ml-8{ + margin-left: 8px; +} + +.ml-16{ + margin-left: 16px; +} + +// 修复问题 +.ui-modal .ui-modal-dialog{ + overflow: visible; +} + +.page { + display: flex; + flex-direction: column; + background: #f0f2f5; + min-height: 100%; + .page-header{ + padding: 16px 32px 0; + background: #fff; + border-bottom: $border-color-split ; + .page-header-title{ + color: $title-color; + font-weight: 500; + font-size: 16px; + margin-bottom: 16px; + } + .page-header-desc{ + margin-bottom: 16px; + } + } + .page-body{ + flex: auto; + min-height: 0; + margin: 24px 24px; + background: #fff; + } +} diff --git a/packages/fes-template/src/pages/api/fes/index.vue b/packages/fes-template/src/pages/api/fes/index.vue deleted file mode 100644 index f67abf2c..00000000 --- a/packages/fes-template/src/pages/api/fes/index.vue +++ /dev/null @@ -1,74 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/api/fesApi/index.vue b/packages/fes-template/src/pages/api/fesApi/index.vue deleted file mode 100644 index 250925bd..00000000 --- a/packages/fes-template/src/pages/api/fesApi/index.vue +++ /dev/null @@ -1,50 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/api/fesApp/index.vue b/packages/fes-template/src/pages/api/fesApp/index.vue deleted file mode 100644 index f3c5ef9d..00000000 --- a/packages/fes-template/src/pages/api/fesApp/index.vue +++ /dev/null @@ -1,94 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/api/fesFesx/index.vue b/packages/fes-template/src/pages/api/fesFesx/index.vue deleted file mode 100644 index c1dc2d4a..00000000 --- a/packages/fes-template/src/pages/api/fesFesx/index.vue +++ /dev/null @@ -1,26 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/api/fesMap/index.vue b/packages/fes-template/src/pages/api/fesMap/index.vue deleted file mode 100644 index bf0f8cca..00000000 --- a/packages/fes-template/src/pages/api/fesMap/index.vue +++ /dev/null @@ -1,20 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/api/fesMenu/index.vue b/packages/fes-template/src/pages/api/fesMenu/index.vue deleted file mode 100644 index aaffb93e..00000000 --- a/packages/fes-template/src/pages/api/fesMenu/index.vue +++ /dev/null @@ -1,129 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/api/fesStorage/index.vue b/packages/fes-template/src/pages/api/fesStorage/index.vue deleted file mode 100644 index a5e469dd..00000000 --- a/packages/fes-template/src/pages/api/fesStorage/index.vue +++ /dev/null @@ -1,38 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/api/fesUtil/index.vue b/packages/fes-template/src/pages/api/fesUtil/index.vue deleted file mode 100644 index be19be80..00000000 --- a/packages/fes-template/src/pages/api/fesUtil/index.vue +++ /dev/null @@ -1,33 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/form/base.vue b/packages/fes-template/src/pages/form/base.vue new file mode 100644 index 00000000..d7244794 --- /dev/null +++ b/packages/fes-template/src/pages/form/base.vue @@ -0,0 +1,136 @@ + + diff --git a/packages/fes-template/src/pages/form/step.vue b/packages/fes-template/src/pages/form/step.vue new file mode 100644 index 00000000..fccc369f --- /dev/null +++ b/packages/fes-template/src/pages/form/step.vue @@ -0,0 +1,139 @@ + + + diff --git a/packages/fes-template/src/pages/header/index.vue b/packages/fes-template/src/pages/header/index.vue deleted file mode 100644 index 98e5cdfe..00000000 --- a/packages/fes-template/src/pages/header/index.vue +++ /dev/null @@ -1,77 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/home/index.vue b/packages/fes-template/src/pages/home/index.vue index 4d6305e2..d8f4cd1d 100644 --- a/packages/fes-template/src/pages/home/index.vue +++ b/packages/fes-template/src/pages/home/index.vue @@ -3,7 +3,7 @@
@@ -66,7 +66,6 @@ export default { this.$refs.username.focus(); }); this.initStyle(); - if (this.FesStorage.get('userLogin') === true) { this.getRole(); } @@ -74,20 +73,15 @@ export default { methods: { login() { if (this.validate()) { - // this.FesApi.fetch('login').then(() => { - // 设置用户、角色等 + // 设置用户、角色等 this.FesApp.set('FesUserName', 'harrywan'); this.FesApp.set('FesRoleName', '管理员'); this.FesStorage.set('userLogin', true); this.getRole(); - // }); } }, getRole() { - // this.FesApi.fetch('getRoleName').then((res) => { - // 默认跳入rolesConfig的第一项 - this.FesApp.setRole("admin"); - // }); + this.FesApp.setRole('admin'); }, input() { this.error = ''; diff --git a/packages/fes-template/src/pages/layout/a.vue b/packages/fes-template/src/pages/layout/a.vue deleted file mode 100644 index 76f339b3..00000000 --- a/packages/fes-template/src/pages/layout/a.vue +++ /dev/null @@ -1,12 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/layout/b.vue b/packages/fes-template/src/pages/layout/b.vue deleted file mode 100644 index 8a6a578c..00000000 --- a/packages/fes-template/src/pages/layout/b.vue +++ /dev/null @@ -1,12 +0,0 @@ - - diff --git a/packages/fes-template/src/pages/i18n/index.vue b/packages/fes-template/src/pages/layout/i18n.vue similarity index 100% rename from packages/fes-template/src/pages/i18n/index.vue rename to packages/fes-template/src/pages/layout/i18n.vue diff --git a/packages/fes-template/src/pages/layout/layout.vue b/packages/fes-template/src/pages/layout/layout.vue index 32df58ad..2db9cc9a 100644 --- a/packages/fes-template/src/pages/layout/layout.vue +++ b/packages/fes-template/src/pages/layout/layout.vue @@ -1,13 +1,14 @@ - diff --git a/packages/fes-template/src/pages/list/index.vue b/packages/fes-template/src/pages/list/index.vue index 328f3c6a..9bd6a600 100644 --- a/packages/fes-template/src/pages/list/index.vue +++ b/packages/fes-template/src/pages/list/index.vue @@ -1,83 +1,160 @@ -