diff --git a/web-react/src/assets/style/lib/table.less b/web-react/src/assets/style/lib/table.less
index 6d9e08d..2094f66 100644
--- a/web-react/src/assets/style/lib/table.less
+++ b/web-react/src/assets/style/lib/table.less
@@ -1,190 +1,214 @@
@import (reference) '../extend.less';
.yo-query-bar {
- margin-bottom: @padding-md;
+ margin-bottom: @padding-md;
}
.yo-action-bar {
- display: flex;
- justify-content: space-between;
+ display: flex;
+ justify-content: space-between;
- margin-bottom: @padding-md;
+ margin-bottom: @padding-md;
- &--actions {
-
- >.ant-btn,
- >.ant-btn-group {
-
- +.ant-btn,
- +.ant-btn-group {
- margin-left: @padding-xs;
- }
+ &--actions {
+ > .ant-btn,
+ > .ant-btn-group {
+ + .ant-btn,
+ + .ant-btn-group {
+ margin-left: @padding-xs;
+ }
+ }
}
- }
}
.ant-table-thead {
- th.ant-table-column-has-sorters {
- &:hover {
- background-color: darken(@background-color-base, 5%);
+ th.ant-table-column-has-sorters {
+ &:hover {
+ background-color: darken(@background-color-base, 5%);
+ }
}
- }
}
.ant-table-tbody {
- >tr {
- >td {
- transition-property: background, border-bottom-color;
+ > tr {
+ > td {
+ transition-property: background, border-bottom-color;
+ }
}
- }
- >tr.ant-table-row:hover {
- >td {
- border-bottom-color: lighten(@primary-color, 30%);
+ > tr.ant-table-row:hover {
+ > td {
+ border-bottom-color: lighten(@primary-color, 30%);
+ }
}
- }
}
.ant-table-small {
- >.ant-table-content {
- >.ant-table-body {
- margin: 0;
+ > .ant-table-content {
+ > .ant-table-body {
+ margin: 0;
- >table {
- >.ant-table-thead {
- >tr {
- >th {
- background-color: @table-selected-row-bg;
+ > table {
+ > .ant-table-thead {
+ > tr {
+ > th {
+ background-color: @table-selected-row-bg;
+ }
+ }
+ }
}
- }
}
- }
}
- }
}
.ant-table-thead {
- >tr {
- >th {
- font-weight: bold;
+ > tr {
+ > th {
+ font-weight: bold;
+ }
}
- }
}
.yo-table {
- .ant-table {
- margin: 0 !important;
- }
-
- .border-right-none() {
- border-right-width: 0 !important;
-
- &:last-child {
- border-right-width: 1px !important;
+ .ant-table {
+ margin: 0 !important;
}
- }
- .ant-table-content {
- .ant-table-body {
- overflow-x: auto !important;
+ .border-right-none() {
+ border-right-width: 0 !important;
- >table {
- >.ant-table-thead {
- >tr {
- >th {
- .border-right-none();
+ &:last-child {
+ border-right-width: 1px !important;
+ }
+ }
+
+ .ant-table-content {
+ .ant-table-body {
+ overflow-x: auto !important;
+
+ > table {
+ > .ant-table-thead {
+ > tr {
+ > th {
+ .border-right-none();
+ }
+ }
+ }
+
+ > .ant-table-tbody {
+ > tr {
+ > td {
+ .border-right-none();
+ }
+ }
+ }
}
- }
}
- >.ant-table-tbody {
- >tr {
- >td {
- .border-right-none();
+ .ant-table-fixed-left {
+ .ant-table-thead {
+ > tr {
+ > th {
+ border-right-width: 0 !important;
+ }
+ }
+ }
+
+ .ant-table-tbody {
+ > tr {
+ > td {
+ border-right-width: 0 !important;
+ }
+ }
+ }
+ }
+
+ .ant-table-fixed-right {
+ .ant-table-fixed {
+ border-left-width: 0 !important;
+ }
+
+ .ant-table-thead {
+ > tr {
+ > th {
+ .border-right-none();
+ }
+ }
+ }
+
+ .ant-table-tbody {
+ > tr {
+ > td {
+ .border-right-none();
+ }
+ }
}
- }
}
- }
}
- .ant-table-fixed-left {
- .ant-table-thead {
- >tr {
- >th {
- border-right-width: 0 !important;
- }
+ .ant-table-bordered {
+ > .ant-table-container {
+ border-top: @border-width-base @border-style-base @table-border-color;
}
- }
-
- .ant-table-tbody {
- >tr {
- >td {
- border-right-width: 0 !important;
- }
- }
- }
}
-
- .ant-table-fixed-right {
- .ant-table-fixed {
- border-left-width: 0 !important;
- }
-
- .ant-table-thead {
- >tr {
- >th {
- .border-right-none();
- }
- }
- }
-
- .ant-table-tbody {
- >tr {
- >td {
- .border-right-none();
- }
- }
- }
- }
- }
-
- .ant-table-bordered {
- >.ant-table-container {
- border-top: @border-width-base @border-style-base @table-border-color;
- }
- }
}
.yo-table-actions {
- display: inline-block;
+ display: inline-block;
- vertical-align: middle;
+ vertical-align: middle;
- &--inner {
- display: flex;
- align-items: center;
+ &--inner {
+ display: flex;
+ align-items: center;
- height: 18px;
-
- }
+ height: 18px;
+ }
}
.yo-table--column-setting {
- width: 240px;
+ width: 240px;
- .ant-dropdown-menu-item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
+ .ant-dropdown-menu-item {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
- .anticon-pushpin {
- color: darken(@white, 40%);
- transition: @animation-duration-slow;
- transform: rotate(45deg);
- }
+ .anticon-pushpin {
+ color: darken(@white, 40%);
+ transition: @animation-duration-slow;
+ transform: rotate(45deg);
+ }
- .yo-table--fixed {
- transform: rotate(-45deg);
- }
-}
\ No newline at end of file
+ .yo-table--fixed {
+ transform: rotate(-45deg);
+ }
+}
+
+.yo-inner-table {
+ .ant-table {
+ .ant-table-tbody {
+ > .ant-table-expanded-row-level-1 > td {
+ padding: 0;
+ border-right: none !important;
+ .ant-table-wrapper {
+ border: none;
+ .ant-table {
+ margin: 0 !important;
+ }
+ .ant-table-container {
+ border: none;
+ .ant-table-cell:first-child {
+ padding-left: 25px;
+ }
+ .ant-table-expanded-row-level-1 > td {
+ border-right: @border-width-base @border-style-base @table-border-color !important;
+ padding: @padding-sm @padding-xs @padding-sm @padding-xl;
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/web-react/src/pages/system/menu/index.jsx b/web-react/src/pages/system/menu/index.jsx
index bcde83a..c4f44d8 100644
--- a/web-react/src/pages/system/menu/index.jsx
+++ b/web-react/src/pages/system/menu/index.jsx
@@ -1,5 +1,5 @@
import React, { Component } from 'react'
-import { Button, Card, Form, Input, Popconfirm, message as Message } from 'antd'
+import { Button, Table, Card, Form, Input, Popconfirm, message as Message, Tag } from 'antd'
import { isEqual } from 'lodash'
import { AntIcon, Auth, Container, ModalForm, QueryTable, QueryTableActions } from 'components'
import { api } from 'common/api'
@@ -13,19 +13,18 @@ const apiAction = {
page: api.getMenuList,
add: api.sysMenuAdd,
edit: api.sysMenuEdit,
- delete: api.sysMenuDelete
+ delete: api.sysMenuDelete,
}
// 用于弹窗标题
const name = '菜单'
export default class index extends Component {
-
state = {
codes: {
menuType: [],
- menuWeight: []
- }
+ menuWeight: [],
+ },
}
// 表格实例
@@ -53,7 +52,7 @@ export default class index extends Component {
title: '图标',
width: 100,
dataIndex: 'icon',
- render: text => text &&