Commit 9243cbde authored by 邓晓峰's avatar 邓晓峰

fix: 修复style variables

parent 53d4ee39
...@@ -65,6 +65,7 @@ export default { ...@@ -65,6 +65,7 @@ export default {
edge: false, edge: false,
ios: false, ios: false,
}, },
dynamicImport: {},
theme: { theme: {
'@s-site-menu-width': '258px', '@s-site-menu-width': '258px',
}, },
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
"stylelint": "^13.0.0", "stylelint": "^13.0.0",
"terser-webpack-plugin": "^5.1.1", "terser-webpack-plugin": "^5.1.1",
"typescript": "^4.1.2", "typescript": "^4.1.2",
"umi": "^3.4.0", "umi": "^3.5.20",
"umi-request": "^1.3.5", "umi-request": "^1.3.5",
"umi-test": "^1.9.6", "umi-test": "^1.9.6",
"umi-types": "^0.5.11", "umi-types": "^0.5.11",
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@basic-chart-prefix-cls: ~'@{ant-prefix}-basic-chart'; @basic-chart-prefix-cls: ~'@{ant-prefix}-basic-chart';
.@{basic-chart-prefix-cls} { .@{basic-chart-prefix-cls} {
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@basic-table-prefix-cls: ~'@{ant-prefix}-basic-table'; @basic-table-prefix-cls: ~'@{ant-prefix}-basic-table';
.@{basic-table-prefix-cls} { .@{basic-table-prefix-cls} {
......
import React, { useContext, useEffect, useState } from 'react'; // eslint-disable-next-line no-unused-vars
import PropTypes from 'prop-types'; import React from 'react';
import classNames from 'classnames';
import moment from 'moment'; import moment from 'moment';
// eslint-disable-next-line no-unused-vars
import { DatePicker } from 'antd'; import { DatePicker } from 'antd';
const FORMATS = { const FORMATS = {
day: 'YYYY-MM-DD', day: 'YYYY-MM-DD',
...@@ -57,7 +57,9 @@ const DatePickerCustom = (props) => { ...@@ -57,7 +57,9 @@ const DatePickerCustom = (props) => {
} }
break; break;
case 'week': case 'week':
// eslint-disable-next-line no-use-before-define
name = getMonthWeek(value); name = getMonthWeek(value);
// eslint-disable-next-line no-use-before-define
if (value.format('YYYY-wo') === getTime(0, 'week', FORMATS[modes])) { if (value.format('YYYY-wo') === getTime(0, 'week', FORMATS[modes])) {
name = '本周'; name = '本周';
} else if (value.format('YYYY-wo') === getTime(1, 'week', FORMATS[modes])) { } else if (value.format('YYYY-wo') === getTime(1, 'week', FORMATS[modes])) {
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@device-tree-prefix-cls: ~'@{ant-prefix}-device-tree'; @device-tree-prefix-cls: ~'@{ant-prefix}-device-tree';
.@{device-tree-prefix-cls} { .@{device-tree-prefix-cls} {
...@@ -8,31 +8,31 @@ ...@@ -8,31 +8,31 @@
height: 100%; height: 100%;
padding: 5px; padding: 5px;
.ant-divider { .@{ant-prefix}-divider {
margin: 6px 0 12px 0; margin: 6px 0 12px 0;
} }
.ant-tree-checkbox { .@{ant-prefix}-tree-checkbox {
margin: 7px 2px 0 0; margin: 7px 2px 0 0;
} }
.ant-tree-title { .@{ant-prefix}-tree-title {
white-space: nowrap; white-space: nowrap;
} }
.ant-tree-treenode { .@{ant-prefix}-tree-treenode {
width: 100%; width: 100%;
} }
.ant-tree-switcher { .@{ant-prefix}-tree-switcher {
line-height: 30px; line-height: 30px;
} }
.ant-tree-switcher-noop { .@{ant-prefix}-tree-switcher-noop {
width: 14px; width: 14px;
} }
.ant-tree-node-content-wrapper { .@{ant-prefix}-tree-node-content-wrapper {
flex: 1; flex: 1;
min-height: 30px; min-height: 30px;
overflow: hidden; overflow: hidden;
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
border-radius: 3px; border-radius: 3px;
} }
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected { .@{ant-prefix}-tree .@{ant-prefix}-tree-node-content-wrapper.@{ant-prefix}-tree-node-selected {
color: #1890ff; color: #1890ff;
background-color: #eaf1fe; background-color: #eaf1fe;
} }
......
// eslint-disable-next-line no-unused-vars
import React, { useContext } from 'react'; import React, { useContext } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
...@@ -9,9 +10,11 @@ import errorDark from './assets/errorDark.png'; ...@@ -9,9 +10,11 @@ import errorDark from './assets/errorDark.png';
import './index.less'; import './index.less';
const Empty = ({ description, image, theme, size, statusCode, imageStyle, children }) => { const Empty = ({ description, image, theme, size, statusCode, imageStyle, children }) => {
const alt = description ? description : 'empty'; const alt = description || 'empty';
const des = description ? description : DESC_DATA[`${statusCode}`]; // eslint-disable-next-line no-use-before-define
const imageSrc = image ? image : IMAGE_DATA[theme][statusCode == '0' ? 0 : 1]; const des = description || DESC_DATA[`${statusCode}`];
// eslint-disable-next-line no-use-before-define
const imageSrc = image || IMAGE_DATA[theme][statusCode == '0' ? 0 : 1];
const { getPrefixCls } = useContext(ConfigProvider.ConfigContext); const { getPrefixCls } = useContext(ConfigProvider.ConfigContext);
const prefixCls = getPrefixCls('panda-empty'); const prefixCls = getPrefixCls('panda-empty');
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@panda-empty-prefix-cls: ~'@{ant-prefix}-panda-empty'; @panda-empty-prefix-cls: ~'@{ant-prefix}-panda-empty';
.@{panda-empty-prefix-cls} { .@{panda-empty-prefix-cls} {
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@history-info-prefix-cls: ~'@{ant-prefix}-history-info'; @history-info-prefix-cls: ~'@{ant-prefix}-history-info';
.@{history-info-prefix-cls} { .@{history-info-prefix-cls} {
height: 100%; height: 100%;
.ant-tabs, .@{ant-prefix}-tabs,
.ant-tabs-content { .@{ant-prefix}-tabs-content {
height: 100%; height: 100%;
} }
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
right: -20px; right: -20px;
} }
.ant-radio-group, .@{ant-prefix}-radio-group,
.ant-select { .@{ant-prefix}-select {
margin-right: 16px; margin-right: 16px;
} }
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@image-select-prefix-cls: ~'@{ant-prefix}-image-select'; @image-select-prefix-cls: ~'@{ant-prefix}-image-select';
.@{image-select-prefix-cls} { .@{image-select-prefix-cls} {
...@@ -41,22 +41,22 @@ ...@@ -41,22 +41,22 @@
white-space: nowrap; white-space: nowrap;
} }
.ant-input-affix-wrapper { .@{ant-prefix}-input-affix-wrapper {
width: 313px; width: 313px;
height: 29px; height: 29px;
background-color: #eef1f9; background-color: #eef1f9;
border-radius: 15px; border-radius: 15px;
.ant-input-prefix { .@{ant-prefix}-input-prefix {
color: #5a6c8a; color: #5a6c8a;
} }
.ant-input { .@{ant-prefix}-input {
background: #eef1f9; background: #eef1f9;
} }
} }
.ant-input-affix-wrapper:hover { .@{ant-prefix}-input-affix-wrapper:hover {
background-color: #eef1f9; background-color: #eef1f9;
} }
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
white-space: nowrap; white-space: nowrap;
} }
.ant-modal-body { .@{ant-prefix}-modal-body {
max-height: 600px; max-height: 600px;
overflow-y: auto; overflow-y: auto;
} }
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@quota-select-prefix-cls: ~'@{ant-prefix}-quota-select'; @quota-select-prefix-cls: ~'@{ant-prefix}-quota-select';
.@{quota-select-prefix-cls} { .@{quota-select-prefix-cls} {
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
background-color: #eef1f9; background-color: #eef1f9;
border-radius: 15px; border-radius: 15px;
.ant-input-prefix { .@{ant-prefix}-input-prefix {
color: #5a6c8a; color: #5a6c8a;
} }
} }
...@@ -87,8 +87,8 @@ ...@@ -87,8 +87,8 @@
height: calc(100% - 47px); height: calc(100% - 47px);
overflow-y: auto; overflow-y: auto;
.ant-tree-treenode, .@{ant-prefix}-tree-treenode,
.ant-tree-node-content-wrapper { .@{ant-prefix}-tree-node-content-wrapper {
width: 100%; width: 100%;
} }
} }
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@realtime-info-prefix-cls: ~'@{ant-prefix}-realtime-info'; @realtime-info-prefix-cls: ~'@{ant-prefix}-realtime-info';
.@{realtime-info-prefix-cls} { .@{realtime-info-prefix-cls} {
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@time-range-picker-prefix-cls: ~'@{ant-prefix}-time-range-picker'; @time-range-picker-prefix-cls: ~'@{ant-prefix}-time-range-picker';
.@{time-range-picker-prefix-cls} { .@{time-range-picker-prefix-cls} {
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@ec-configuration-view-prefix-cls: ~'@{ant-prefix}-ec-configuration-view'; @ec-configuration-view-prefix-cls: ~'@{ant-prefix}-ec-configuration-view';
.@{ec-configuration-view-prefix-cls} { .@{ec-configuration-view-prefix-cls} {
...@@ -68,34 +68,34 @@ ...@@ -68,34 +68,34 @@
} }
//:global { //:global {
.ant-input-affix-wrapper { .@{ant-prefix}-input-affix-wrapper {
background: #1c202c; background: #1c202c;
border: none; border: none;
} }
.ant-input-affix-wrapper:focus, .@{ant-prefix}-input-affix-wrapper:focus,
.ant-input-affix-wrapper-focused { .@{ant-prefix}-input-affix-wrapper-focused {
box-shadow: none; box-shadow: none;
} }
.ant-input:focus { .@{ant-prefix}-input:focus {
border: none; border: none;
box-shadow: none; box-shadow: none;
} }
.ant-input, .@{ant-prefix}-input,
.ant-btn { .@{ant-prefix}-btn {
color: white; color: white;
background: #1c202c; background: #1c202c;
border: none; border: none;
} }
.ant-input-group-addon { .@{ant-prefix}-input-group-addon {
background: #1c202c; background: #1c202c;
border: none; border: none;
} }
.ant-input-suffix { .@{ant-prefix}-input-suffix {
color: #646977; color: #646977;
} }
//} //}
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
//:global { //:global {
.ant-col.ant-form-item-label { .@{ant-prefix}-col.@{ant-prefix}-form-item-label {
margin-right: 10px; margin-right: 10px;
label { label {
...@@ -120,39 +120,39 @@ ...@@ -120,39 +120,39 @@
} }
} }
.ant-form-item-control-input-content { .@{ant-prefix}-form-item-control-input-content {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.ant-input-affix-wrapper { .@{ant-prefix}-input-affix-wrapper {
background: #1c202c; background: #1c202c;
border: none; border: none;
} }
.ant-input-affix-wrapper:focus, .@{ant-prefix}-input-affix-wrapper:focus,
.ant-input-affix-wrapper-focused { .@{ant-prefix}-input-affix-wrapper-focused {
box-shadow: none; box-shadow: none;
} }
.ant-input:focus { .@{ant-prefix}-input:focus {
border: none; border: none;
box-shadow: none; box-shadow: none;
} }
.ant-input, .@{ant-prefix}-input,
.ant-btn { .@{ant-prefix}-btn {
color: white; color: white;
background: #1c202c; background: #1c202c;
border: none; border: none;
} }
.ant-input-group-addon { .@{ant-prefix}-input-group-addon {
background: #1c202c; background: #1c202c;
border: none; border: none;
} }
.ant-input-suffix { @{ant-prefix}-input-suffix {
color: #646977; color: #646977;
} }
} }
...@@ -164,36 +164,36 @@ ...@@ -164,36 +164,36 @@
} }
//:global{ //:global{
.ant-modal-content { .@{ant-prefix}-modal-content {
color: white; color: white;
background: #282d3b; background: #282d3b;
border: 1px solid #31374a; border: 1px solid #31374a;
.ant-modal-close { .@{ant-prefix}-modal-close {
color: white; color: white;
} }
.ant-modal-close-x { .@{ant-prefix}-modal-close-x {
line-height: 42px; line-height: 42px;
} }
.ant-modal-header { .@{ant-prefix}-modal-header {
background: none; background: none;
border-color: #1c202c; border-color: #1c202c;
.ant-modal-title { .@{ant-prefix}-modal-title {
color: white; color: white;
} }
} }
.ant-modal-body { .@{ant-prefix}-modal-body {
} }
.ant-modal-footer { .@{ant-prefix}-modal-footer {
background: none; background: none;
border-color: #1c202c; border-color: #1c202c;
.ant-btn:first-of-type { .@{ant-prefix}-btn:first-of-type {
color: white; color: white;
background-color: #838a9d; background-color: #838a9d;
border: none; border: none;
...@@ -209,7 +209,7 @@ ...@@ -209,7 +209,7 @@
.historyInfoModal { .historyInfoModal {
//:global { //:global {
.ant-modal-body { .@{ant-prefix}-modal-body {
height: 680px; height: 680px;
} }
//} //}
...@@ -220,29 +220,29 @@ ...@@ -220,29 +220,29 @@
//:global { //:global {
.ant-modal { .@{ant-prefix}-modal {
padding-bottom: 0; padding-bottom: 0;
} }
.ant-modal, .@{ant-prefix}-modal,
.ant-modal-content { .@{ant-prefix}-modal-content {
background: #282d3b; background: #282d3b;
} }
.ant-modal-content { .@{ant-prefix}-modal-content {
height: 100%; height: 100%;
} }
.ant-modal-header { .@{ant-prefix}-modal-header {
background: #282d3b; background: #282d3b;
} }
.ant-modal-title, .@{ant-prefix}-modal-title,
.ant-modal-close-x { .@{ant-prefix}-modal-close-x {
color: white; color: white;
} }
.ant-modal-body { .@{ant-prefix}-modal-body {
height: calc(100% - 55px); height: calc(100% - 55px);
} }
} }
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@ec-device-tree-prefix-cls: ~'@{ant-prefix}-ec-device-tree'; @ec-device-tree-prefix-cls: ~'@{ant-prefix}-ec-device-tree';
.@{ec-device-tree-prefix-cls} { .@{ec-device-tree-prefix-cls} {
...@@ -12,27 +12,27 @@ ...@@ -12,27 +12,27 @@
margin: 6px 0 12px 0; margin: 6px 0 12px 0;
} }
.ant-tree-checkbox { .@{ant-prefix}-tree-checkbox {
margin: 7px 2px 0 0; margin: 7px 2px 0 0;
} }
.ant-tree-title { .@{ant-prefix}-tree-title {
white-space: nowrap; white-space: nowrap;
} }
.ant-tree-treenode { .@{ant-prefix}-tree-treenode {
width: 100%; width: 100%;
} }
.ant-tree-switcher { .@{ant-prefix}-tree-switcher {
line-height: 30px; line-height: 30px;
} }
.ant-tree-switcher-noop { .@{ant-prefix}-tree-switcher-noop {
width: 14px; width: 14px;
} }
.ant-tree-node-content-wrapper { .@{ant-prefix}-tree-node-content-wrapper {
flex: 1; flex: 1;
min-height: 30px; min-height: 30px;
overflow: hidden; overflow: hidden;
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
border-radius: 3px; border-radius: 3px;
} }
.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected { .@{ant-prefix}-tree .@{ant-prefix}-tree-node-content-wrapper.@{ant-prefix}-tree-node-selected {
color: #1890ff; color: #1890ff;
background-color: #eaf1fe; background-color: #eaf1fe;
} }
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
overflow-y: scroll; overflow-y: scroll;
} }
.ant-spin-nested-loading { .@{ant-prefix}-spin-nested-loading {
height: 100%; height: 100%;
} }
...@@ -59,13 +59,13 @@ ...@@ -59,13 +59,13 @@
margin: 10px auto; margin: 10px auto;
} }
&-total.ant-divider-horizontal.ant-divider-with-text { &-total.@{ant-prefix}-divider-horizontal.@{ant-prefix}-divider-with-text {
margin: 10px auto; margin: 10px auto;
color: #a4b1c7; color: #a4b1c7;
} }
.ant-divider-horizontal.ant-divider-with-text::before, .@{ant-prefix}-divider-horizontal.@{ant-prefix}-divider-with-text::before,
.ant-divider-horizontal.ant-divider-with-text::after { .@{ant-prefix}-divider-horizontal.@{ant-prefix}-divider-with-text::after {
top: 0; top: 0;
} }
} }
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@history-info-prefix-cls: ~'@{ant-prefix}-history-info'; @history-info-prefix-cls: ~'@{ant-prefix}-history-info';
.@{history-info-prefix-cls} { .@{history-info-prefix-cls} {
height: 100%; height: 100%;
.ant-tabs, .@{ant-prefix}-tabs,
.ant-tabs-content { .@{ant-prefix}-tabs-content {
height: 100%; height: 100%;
} }
...@@ -22,13 +22,13 @@ ...@@ -22,13 +22,13 @@
height: calc(100% - 108px); height: calc(100% - 108px);
} }
&-spin > .ant-spin-container { &-spin > .@{ant-prefix}-spin-container {
display: flex; display: flex;
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
} }
&-spin > div > .ant-spin { &-spin > div > .@{ant-prefix}-spin {
max-height: none; max-height: none;
} }
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
right: -20px; right: -20px;
} }
.ant-radio-group, .@{ant-prefix}-radio-group,
.ant-select { .@{ant-prefix}-select {
margin-right: 16px; margin-right: 16px;
} }
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@ec-quota-select-prefix-cls: ~'@{ant-prefix}-ec-quota-select'; @ec-quota-select-prefix-cls: ~'@{ant-prefix}-ec-quota-select';
.@{ec-quota-select-prefix-cls} { .@{ec-quota-select-prefix-cls} {
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
background-color: #eef1f9; background-color: #eef1f9;
border-radius: 15px; border-radius: 15px;
.ant-input-prefix { .@{ant-prefix}-input-prefix {
color: #5a6c8a; color: #5a6c8a;
} }
} }
...@@ -111,8 +111,8 @@ ...@@ -111,8 +111,8 @@
height: calc(100% - 47px); height: calc(100% - 47px);
overflow-y: auto; overflow-y: auto;
.ant-tree-treenode, .@{ant-prefix}-tree-treenode,
.ant-tree-node-content-wrapper { .@{ant-prefix}-tree-node-content-wrapper {
width: 100%; width: 100%;
} }
} }
......
@import (reference) '../../../../node_modules/antd/es/style/themes/default'; @import '~antd/es/style/themes/default';
@realtime-info-prefix-cls: ~'@{ant-prefix}-realtime-info'; @realtime-info-prefix-cls: ~'@{ant-prefix}-realtime-info';
.@{realtime-info-prefix-cls} { .@{realtime-info-prefix-cls} {
padding: 10px; padding: 10px;
.ant-btn-link { .@{ant-prefix}-btn-link {
color: #d0d6e8; color: #d0d6e8;
} }
...@@ -32,30 +32,30 @@ ...@@ -32,30 +32,30 @@
} }
.@{realtime-info-prefix-cls}-modal { .@{realtime-info-prefix-cls}-modal {
.ant-modal-header { .@{ant-prefix}-modal-header {
height: 63px; height: 63px;
padding: 16px 48px 0 24px; padding: 16px 48px 0 24px;
} }
&-title { &-title {
.ant-tabs-nav { .@{ant-prefix}-tabs-nav {
margin: 0; margin: 0;
} }
.ant-tabs-nav:before { .@{ant-prefix}-tabs-nav:before {
border: none; border: none;
} }
.ant-tabs-extra-content { .@{ant-prefix}-tabs-extra-content {
margin-right: 10px; margin-right: 10px;
} }
.ant-tabs-content-holder { .@{ant-prefix}-tabs-content-holder {
display: none; display: none;
} }
} }
.ant-modal-content { .@{ant-prefix}-modal-content {
height: 705px; height: 705px;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment