mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-10-14 10:52:28 +08:00
fix: 修复一些问题
This commit is contained in:
parent
449312c146
commit
93aad54918
@ -52,7 +52,7 @@
|
|||||||
"@fesjs/plugin-layout": "^2.0.0",
|
"@fesjs/plugin-layout": "^2.0.0",
|
||||||
"@fesjs/plugin-model": "^2.0.0",
|
"@fesjs/plugin-model": "^2.0.0",
|
||||||
"@fesjs/plugin-enums": "^2.0.0",
|
"@fesjs/plugin-enums": "^2.0.0",
|
||||||
"@fesjs/fes-design": "^0.1.9",
|
"@fesjs/fes-design": "^0.1.10",
|
||||||
"vue": "^3.2.6"
|
"vue": "^3.2.6"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@fesjs/fes": "^2.0.0",
|
"@fesjs/fes": "^2.0.0",
|
||||||
"@fesjs/fes-design": "^0.1.9",
|
"@fesjs/fes-design": "^0.1.10",
|
||||||
"vue": "^3.0.5"
|
"vue": "^3.0.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ const matchName = (config, name) => {
|
|||||||
export const fillMenuByRoute = (menuConfig, routeConfig, dep = 0) => {
|
export const fillMenuByRoute = (menuConfig, routeConfig, dep = 0) => {
|
||||||
dep += 1;
|
dep += 1;
|
||||||
if (dep > 3) {
|
if (dep > 3) {
|
||||||
throw new Error('[plugin-layout]: menu层级不能超出三层!');
|
console.warn('[plugin-layout]: 菜单层级最好不要超出三层!');
|
||||||
}
|
}
|
||||||
const arr = [];
|
const arr = [];
|
||||||
if (Array.isArray(menuConfig) && Array.isArray(routeConfig)) {
|
if (Array.isArray(menuConfig) && Array.isArray(routeConfig)) {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@fesjs/fes": "^2.0.0",
|
"@fesjs/fes": "^2.0.0",
|
||||||
"@fesjs/fes-design": "^0.1.9",
|
"@fesjs/fes-design": "^0.1.10",
|
||||||
"vue": "^3.0.5"
|
"vue": "^3.0.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<FTooltip v-model="isOpened" popperClass="lang-popper" mode="popover">
|
<FTooltip v-model="isOpened" popperClass="lang-popper" mode="popover">
|
||||||
<div class="lang-icon">
|
<div class="lang-icon">
|
||||||
<SettingOutlined />
|
<LanguageOutlined />
|
||||||
</div>
|
</div>
|
||||||
<template #content>
|
<template #content>
|
||||||
<FScrollbar height="274" class="lang-container">
|
<FScrollbar height="274" class="lang-container">
|
||||||
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { FTooltip, FScrollbar } from '@fesjs/fes-design';
|
import { FTooltip, FScrollbar } from '@fesjs/fes-design';
|
||||||
import { SettingOutlined } from '@fesjs/fes-design/icon';
|
import { LanguageOutlined } from '@fesjs/fes-design/icon';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import langUConfigMap from '../langUConfigMap';
|
import langUConfigMap from '../langUConfigMap';
|
||||||
@ -33,7 +33,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
FTooltip,
|
FTooltip,
|
||||||
FScrollbar,
|
FScrollbar,
|
||||||
SettingOutlined
|
LanguageOutlined
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const { messages, locale } = useI18n();
|
const { messages, locale } = useI18n();
|
||||||
@ -69,6 +69,8 @@ export default {
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|
||||||
.lang-icon {
|
.lang-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
margin: 0 8px;
|
margin: 0 8px;
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fesjs/fes": "^2.0.0",
|
"@fesjs/fes": "^2.0.0",
|
||||||
"vue": "^3.0.5",
|
"vue": "^3.0.5",
|
||||||
"@fesjs/fes-design": "^0.1.9"
|
"@fesjs/fes-design": "^0.1.10"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fesjs/fes": "^2.0.0",
|
"@fesjs/fes": "^2.0.0",
|
||||||
"vue": "^3.0.5",
|
"vue": "^3.0.5",
|
||||||
"@fesjs/fes-design": "^0.1.9"
|
"@fesjs/fes-design": "^0.1.10"
|
||||||
},
|
},
|
||||||
"private": true
|
"private": true
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,6 @@
|
|||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@fesjs/fes": "^2.0.0",
|
"@fesjs/fes": "^2.0.0",
|
||||||
"vue": "^3.0.5",
|
"vue": "^3.0.5",
|
||||||
"@fesjs/fes-design": "^0.1.9"
|
"@fesjs/fes-design": "^0.1.10"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ export default {
|
|||||||
access: {
|
access: {
|
||||||
roles: {
|
roles: {
|
||||||
admin: ['*'],
|
admin: ['*'],
|
||||||
menuTest: ['/']
|
menuTest: ['/','/menuTest']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
@ -34,7 +34,7 @@ export default {
|
|||||||
title: 'Fes.js',
|
title: 'Fes.js',
|
||||||
footer: 'Created by MumbleFE',
|
footer: 'Created by MumbleFE',
|
||||||
multiTabs: false,
|
multiTabs: false,
|
||||||
navigation: 'side',
|
navigation: 'mixin',
|
||||||
theme: 'dark',
|
theme: 'dark',
|
||||||
menus: [
|
menus: [
|
||||||
{
|
{
|
||||||
@ -53,6 +53,22 @@ export default {
|
|||||||
icon: 'UserOutlined',
|
icon: 'UserOutlined',
|
||||||
path: 'https://www.baidu.com'
|
path: 'https://www.baidu.com'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '菜单权限测试',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
title: '子菜单',
|
||||||
|
path: '/menuTest',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '子菜单a',
|
||||||
|
path: '/menuTest/a'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'cssModule'
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
locale: {
|
locale: {
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
"@fesjs/plugin-sass": "^2.0.0",
|
"@fesjs/plugin-sass": "^2.0.0",
|
||||||
"@fesjs/plugin-monaco-editor": "^2.0.0-beta.0",
|
"@fesjs/plugin-monaco-editor": "^2.0.0-beta.0",
|
||||||
"@fesjs/plugin-windicss": "^2.0.0",
|
"@fesjs/plugin-windicss": "^2.0.0",
|
||||||
"@fesjs/fes-design": "^0.1.9",
|
"@fesjs/fes-design": "^0.1.10",
|
||||||
"vue": "^3.0.5",
|
"vue": "^3.0.5",
|
||||||
"vuex": "^4.0.0"
|
"vuex": "^4.0.0"
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>{{initialState.userName}}</div>
|
<div class="user-center">{{initialState.userName}}</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { useModel } from '@fesjs/fes';
|
import { useModel } from '@fesjs/fes';
|
||||||
@ -13,3 +13,8 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="less">
|
||||||
|
.user-center {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
24
packages/fes-template/src/pages/cssModule.vue
Normal file
24
packages/fes-template/src/pages/cssModule.vue
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<template>
|
||||||
|
<div :class="$style.red">
|
||||||
|
字体颜色
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<config>
|
||||||
|
{
|
||||||
|
"name": "cssModule",
|
||||||
|
"title": "css Module 测试"
|
||||||
|
}
|
||||||
|
</config>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
setup() {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style module>
|
||||||
|
.red {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
</style>
|
@ -22,6 +22,5 @@ export default {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.page {
|
.page {
|
||||||
min-height: 100vh;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
21
packages/fes-template/src/pages/menuTest/a.vue
Normal file
21
packages/fes-template/src/pages/menuTest/a.vue
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
menuTest-a
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
return {
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.page {
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
21
packages/fes-template/src/pages/menuTest/index.vue
Normal file
21
packages/fes-template/src/pages/menuTest/index.vue
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
menuTest-index
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
return {
|
||||||
|
};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.page {
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
</style>
|
@ -56,6 +56,5 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.page {
|
.page {
|
||||||
min-height: 100vh;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1411,10 +1411,10 @@
|
|||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
strip-json-comments "^3.1.1"
|
strip-json-comments "^3.1.1"
|
||||||
|
|
||||||
"@fesjs/fes-design@^0.1.9":
|
"@fesjs/fes-design@^0.1.10":
|
||||||
version "0.1.9"
|
version "0.1.10"
|
||||||
resolved "https://registry.npmmirror.com/@fesjs/fes-design/download/@fesjs/fes-design-0.1.9.tgz#19847f3de343a2cb0f1d77a1df72e0d5c1a7690d"
|
resolved "https://registry.npmmirror.com/@fesjs/fes-design/download/@fesjs/fes-design-0.1.10.tgz#b7caaec676fcd1b2f86f5626b8b575f8d899b0c8"
|
||||||
integrity sha512-Z5iE935IeonVw5D1H3Yd/OgUGxT9kpa126bJUL9I/zXRtRzilAhR8N0/Vv1/IASKmEDHdt4plMy8YpFNlfjQVg==
|
integrity sha512-VEt3gA6ExM7WRhXE1k98Ufgee8h9tTL6nqJOItqHPB0jEcakW5z/r0tSByJND4es7zthwMUihHBzccwvjOVBCQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/runtime" "^7.16.3"
|
"@babel/runtime" "^7.16.3"
|
||||||
"@juggle/resize-observer" "^3.3.1"
|
"@juggle/resize-observer" "^3.3.1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user