{
+ setSearchMode(true);
+ if (searchMode && inputRef.current) {
+ inputRef.current.focus();
+ }
+ }}
+ onTransitionEnd={({ propertyName }) => {
+ if (propertyName === 'width' && !searchMode) {
+ if (onVisibleChange) {
+ onVisibleChange(searchMode);
+ }
+ }
+ }}
+ >
+
+
+ {
+ if (e.key === 'Enter') {
+ if (restProps.onSearch) {
+ restProps.onSearch(value);
+ }
+ }
+ }}
+ onBlur={() => {
+ setSearchMode(false);
+ }}
+ />
+
+
+ );
+};
+
+export default HeaderSearch;
diff --git a/src/global.less b/src/global.less
index a30358b..7c21bde 100644
--- a/src/global.less
+++ b/src/global.less
@@ -1,7 +1,15 @@
@import '~antd/es/style/themes/default.less';
+
@import './baseStyle.less';
// 页面公用样式
@import './utils/componentStyle.less';
+@font-face {
+ font-family: 'HarmonyOS Sans SC';
+ src: url('./assets/HarmonyOS_Sans_SC_Regular.ttf') format('truetype');
+ font-weight: normal;
+ font-style: normal;
+ font-display: swap;
+}
html,
body,
@@ -16,6 +24,7 @@ body {
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
+ font-family: 'HarmonyOS Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.ant-layout-header {
@@ -28,3 +37,41 @@ body {
padding: 4px 8px;
}
}
+
+.ant-layout {
+ // min-height: 100vh;
+}
+
+canvas {
+ display: block;
+}
+
+ul,
+ol {
+ list-style: none;
+}
+
+@media (max-width: @screen-xs) {
+ .ant-table {
+ width: 100%;
+ overflow-x: auto;
+ &-thead > tr,
+ &-tbody > tr {
+ > th,
+ > td {
+ white-space: pre;
+ > span {
+ display: block;
+ }
+ }
+ }
+ }
+}
+
+// Compatible with IE11
+@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
+ body .ant-design-pro > .ant-layout {
+ // min-height: 100vh;
+ }
+}
+
diff --git a/src/layouts/BlankLayout.tsx b/src/layouts/BlankLayout.tsx
new file mode 100644
index 0000000..28a0a8d
--- /dev/null
+++ b/src/layouts/BlankLayout.tsx
@@ -0,0 +1,10 @@
+import React from 'react';
+import { Inspector } from 'react-dev-inspector';
+
+const InspectorWrapper = process.env.NODE_ENV === 'development' ? Inspector : React.Fragment;
+
+const Layout: React.FC = ({ children }) => {
+ return