diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md
index 55e6ffd3..483de9e2 100644
--- a/CHANGELOG.zh_CN.md
+++ b/CHANGELOG.zh_CN.md
@@ -7,11 +7,13 @@
### ⚡ Performance Improvements
- 异步引入组件
+- 优化整体结构
### 🎫 Chores
- 返回顶部样式调整,避免遮住其他元素
-- 升级`ant-design-vue`到`2.0.0-rc.4`
+- 升级`ant-design-vue`到`2.0.0-rc.5`
+- 刷新按钮布局调整
### 🐛 Bug Fixes
@@ -23,6 +25,8 @@
- 修复按钮样式问题
- 修复菜单分割模式问题
- 修复 `Modal`与`Drawer`组件在使用 emits 数据传递失效问题
+- 修复菜单已知问题
+- 修复上传组件 api 失效问题
## 2.0.0-rc.13 (2020-12-10)
diff --git a/src/components/Application/index.ts b/src/components/Application/index.ts
index 983b4cfd..eafb2803 100644
--- a/src/components/Application/index.ts
+++ b/src/components/Application/index.ts
@@ -2,9 +2,7 @@ import { withInstall } from '../util';
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
import AppLogo from './src/AppLogo.vue';
-export const AppLocalePicker = createAsyncComponent(() => import('./src/AppLocalePicker.vue'), {
- loading: true,
-});
+export const AppLocalePicker = createAsyncComponent(() => import('./src/AppLocalePicker.vue'));
export const AppProvider = createAsyncComponent(() => import('./src/AppProvider.vue'));
export const AppSearch = createAsyncComponent(() => import('./src/search/AppSearch.vue'), {
loading: true,
diff --git a/src/components/Application/src/AppLocalePicker.vue b/src/components/Application/src/AppLocalePicker.vue
index 72c4c7f9..3a592ffb 100644
--- a/src/components/Application/src/AppLocalePicker.vue
+++ b/src/components/Application/src/AppLocalePicker.vue
@@ -11,8 +11,8 @@
:overlayClassName="`${prefixCls}-overlay`"
>
-
- {{ getLangText }}
+
+ {{ getLangText }}
@@ -30,9 +30,10 @@
import { propTypes } from '/@/utils/propTypes';
import { useDesign } from '/@/hooks/web/useDesign';
+ import Icon from '/@/components/Icon';
export default defineComponent({
name: 'AppLocalPicker',
- components: { GlobalOutlined, Dropdown },
+ components: { GlobalOutlined, Dropdown, Icon },
props: {
// Whether to display text
showText: propTypes.bool.def(true),
@@ -88,8 +89,8 @@
align-items: center;
cursor: pointer;
- &__icon {
- margin-right: 4px;
+ &__text {
+ margin-left: 6px;
}
}
diff --git a/src/components/Application/src/AppLogo.vue b/src/components/Application/src/AppLogo.vue
index 270bb485..17d4b6c5 100644
--- a/src/components/Application/src/AppLogo.vue
+++ b/src/components/Application/src/AppLogo.vue
@@ -87,7 +87,7 @@
}
&__title {
- font-size: 18px;
+ font-size: 16px;
font-weight: 700;
opacity: 0;
transition: all 0.5s;
diff --git a/src/components/Application/src/AppProvider.vue b/src/components/Application/src/AppProvider.vue
index e8d905cd..ddf8c6ce 100644
--- a/src/components/Application/src/AppProvider.vue
+++ b/src/components/Application/src/AppProvider.vue
@@ -3,11 +3,13 @@
diff --git a/src/components/Menu/src/components/MenuItemTag.vue b/src/components/Menu/src/components/MenuItemTag.vue
new file mode 100644
index 00000000..657f8c70
--- /dev/null
+++ b/src/components/Menu/src/components/MenuItemTag.vue
@@ -0,0 +1,56 @@
+
+ {{ getContent }}
+
+
diff --git a/src/components/Menu/src/index.less b/src/components/Menu/src/index.less
index 0a67946d..f00ba361 100644
--- a/src/components/Menu/src/index.less
+++ b/src/components/Menu/src/index.less
@@ -1,6 +1,8 @@
@import (reference) '../../../design/index.less';
@basic-menu-prefix-cls: ~'@{namespace}-basic-menu';
+@basic-menu-content-prefix-cls: ~'@{namespace}-basic-menu-item-content';
+@basic-menu-tag-prefix-cls: ~'@{namespace}-basic-menu-item-tag';
.active-style() {
color: @white;
@@ -41,7 +43,7 @@
// }
// collapsed show title start
- &--show-title {
+ .@{basic-menu-content-prefix-cls}--show-title {
max-width: unset !important;
opacity: 1 !important;
}
@@ -78,104 +80,34 @@
& > li > .ant-menu-submenu-title {
line-height: 24px;
}
- .@{basic-menu-prefix-cls}__content-wrapper {
+ .@{basic-menu-content-prefix-cls}-wrapper {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
- .@{basic-menu-prefix-cls}--show-title {
+ .@{basic-menu-content-prefix-cls}--show-title {
line-height: 30px;
}
}
}
+ .@{basic-menu-content-prefix-cls}-wrapper {
+ width: 100%;
+
+ &__icon {
+ vertical-align: text-top;
+ }
+ }
+
.ant-menu-item {
transition: unset;
}
- // scrollbar -s tart
- // &-wrapper {
-
- /* 滚动槽 */
- // &::-webkit-scrollbar {
- // width: 5px;
- // height: 5px;
- // }
-
- // &::-webkit-scrollbar-track {
- // background: rgba(0, 0, 0, 0);
- // }
-
- // &::-webkit-scrollbar-thumb {
- // background: rgba(255, 255, 255, 0.2);
- // border-radius: 3px;
- // box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
- // }
-
- // ::-webkit-scrollbar-thumb:hover {
- // background: @border-color-dark;
- // }
- // }
-
- // scrollbar end
-
- &-item__level1.light {
- &.top-active-menu {
- top: 0 !important;
- }
-
- &.top-active-menu:not(.ant-menu-item-selected) {
- color: @primary-color;
- border-bottom: 3px solid @primary-color;
- }
- }
-
&__sidebar-hor {
- // overflow: hidden;
-
&.ant-menu-horizontal {
display: flex;
- border: 0;
align-items: center;
- .@{basic-menu-prefix-cls}-item__level1 {
- margin-right: 2px;
- }
-
- &.ant-menu-light {
- .ant-menu-item {
- &.@{basic-menu-prefix-cls}-item__level1 {
- height: @header-height;
- line-height: @header-height;
- }
- }
-
- .ant-menu-submenu:hover,
- .ant-menu-item-open,
- .ant-menu-submenu-open,
- .ant-menu-item-selected,
- .ant-menu-submenu-selected,
- .ant-menu-item:hover,
- .ant-menu-item-active,
- .ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open,
- .ant-menu-submenu-active,
- .ant-menu-submenu-title:hover {
- color: @primary-color !important;
- border-bottom: 3px solid @primary-color;
- }
-
- .ant-menu-submenu {
- &:hover {
- border-bottom: 3px solid @primary-color;
- }
-
- &.ant-menu-selected,
- &.ant-menu-submenu-selected {
- border-bottom: 3px solid @primary-color;
- }
- }
- }
-
&.ant-menu-dark {
background: transparent;
@@ -204,12 +136,6 @@
.@{basic-menu-prefix-cls}-item__level1 {
background: transparent;
- &.top-active-menu {
- color: @white;
- background: @top-menu-active-bg-color;
- border-radius: 2px 2px 0 0;
- }
-
&.ant-menu-item-selected,
&.ant-menu-submenu-selected {
background: @top-menu-active-bg-color !important;
@@ -292,7 +218,7 @@
}
&.ant-menu-light:not(.@{basic-menu-prefix-cls}__sidebar-hor) {
- overflow: hidden;
+ // overflow: hidden;
border-right: none;
.ant-menu-item.ant-menu-item-selected.@{basic-menu-prefix-cls}-menu-item__level1,
@@ -301,26 +227,32 @@
}
}
- // 激活的子菜单样式
- .ant-menu-item.ant-menu-item-selected {
- position: relative;
- }
-
&.@{basic-menu-prefix-cls}__second.ant-menu-inline-collapsed:not(.@{basic-menu-prefix-cls}__sidebar-hor) {
// Reset menu item row height
- .ant-menu-item,
- .ant-menu-sub.ant-menu-inline > .ant-menu-item,
- .ant-menu-sub.ant-menu-inline > .ant-menu-submenu > .ant-menu-submenu-title {
+ .@{basic-menu-prefix-cls}-item__level1 {
display: flex;
height: @app-menu-item-height * 1.4;
padding: 6px 0 !important;
margin: 0;
+ font-size: 12px;
line-height: @app-menu-item-height;
align-items: center;
+ text-align: center;
+
+ > div {
+ padding: 6px 0 !important;
+ font-size: 12px;
+ }
+
+ .@{basic-menu-content-prefix-cls}__name {
+ display: inline-block;
+ width: 50%;
+ overflow: hidden;
+ }
}
}
- .@{basic-menu-prefix-cls}__tag {
+ .@{basic-menu-tag-prefix-cls} {
position: absolute;
top: calc(50% - 8px);
right: 30px;
@@ -332,7 +264,7 @@
color: #fff;
border-radius: 2px;
- &.dot {
+ &--dot {
top: calc(50% - 4px);
width: 8px;
height: 8px;
@@ -340,19 +272,19 @@
border-radius: 50%;
}
- &.primary {
+ &--primary {
background: @primary-color;
}
- &.error {
+ &--error {
background: @error-color;
}
- &.success {
+ &--success {
background: @success-color;
}
- &.warn {
+ &--warn {
background: @warning-color;
}
}
@@ -362,10 +294,6 @@
transition: unset;
}
- // .ant-menu-submenu-arrow {
- // transition: all 0.15s ease 0s;
- // }
-
.ant-menu-inline.ant-menu-sub {
box-shadow: unset !important;
transition: unset;
@@ -384,10 +312,10 @@
// collapsed show title end
.ant-menu-item,
.ant-menu-submenu-title {
- > .@{basic-menu-prefix-cls}__name {
+ > .@{basic-menu-content-prefix-cls}__name {
width: 100%;
- .@{basic-menu-prefix-cls}__tag {
+ .@{basic-menu-tag-prefix-cls} {
float: right;
margin-top: @app-menu-item-height / 2;
transform: translate(0%, -50%);
diff --git a/src/components/Menu/src/props.ts b/src/components/Menu/src/props.ts
index 85aac1f1..4d1cf8b7 100644
--- a/src/components/Menu/src/props.ts
+++ b/src/components/Menu/src/props.ts
@@ -9,7 +9,6 @@ export const basicProps = {
type: Array as PropType