feat: Add base project structure with API and web components
This commit is contained in:
100
web/src/styles/antdThemeConfig.ts
Normal file
100
web/src/styles/antdThemeConfig.ts
Normal file
@@ -0,0 +1,100 @@
|
||||
import type { ThemeConfig } from 'antd';
|
||||
|
||||
// 浅色主题配置
|
||||
export const lightTheme: ThemeConfig = {
|
||||
token: {
|
||||
colorPrimary: '#155EEF',
|
||||
colorBgBase: '#ffffff',
|
||||
colorTextBase: '#212332',
|
||||
colorBorder: '#DFE4ED',
|
||||
colorBgLayout: '#ffffff',
|
||||
colorBgContainer: '#ffffff',
|
||||
colorText: '#212332',
|
||||
colorTextSecondary: '#6b7280',
|
||||
borderRadius: 6,
|
||||
colorSplit: '#DFE4ED',
|
||||
colorBorderBg: '#DFE4ED',
|
||||
colorBgContainerDisabled: '#F6F8FC',
|
||||
colorTextDisabled: '#5B6167',
|
||||
// Card 用到
|
||||
borderRadiusLG: 12,
|
||||
colorBorderSecondary: '#DFE4ED',
|
||||
// colorBgContainer: '#FBFDFF',
|
||||
colorError: '#FF5D34',
|
||||
},
|
||||
components: {
|
||||
Layout: {
|
||||
headerBg: 'transparent',
|
||||
bodyBg: '#FBFDFF',
|
||||
siderBg: 'transparent',
|
||||
headerPadding: '16px 46px 16px 21px',
|
||||
headerHeight: 64,
|
||||
headerColor: '#212332',
|
||||
},
|
||||
Menu: {
|
||||
itemColor: '#5B6167',
|
||||
itemSelectedColor: '#212332',
|
||||
subMenuItemSelectedColor: '#212332',
|
||||
|
||||
itemHoverColor: '#212332',
|
||||
itemHoverBg: '#FFFFFF',
|
||||
|
||||
itemBg: 'transparent',
|
||||
itemSelectedBg: '#FFFFFF',
|
||||
|
||||
subMenuItemBg: 'transparent',
|
||||
|
||||
itemPaddingInline: 12,
|
||||
|
||||
itemHeight: 32,
|
||||
itemMarginBlock: 8,
|
||||
horizontalLineHeight: 32,
|
||||
itemMarginInline: 12,
|
||||
itemBorderRadius: 6,
|
||||
|
||||
iconSize: 16,
|
||||
iconMarginInlineEnd: 8,
|
||||
collapsedIconSize: 12,
|
||||
collapsedWidth: '64px',
|
||||
|
||||
popupBg: '#FBFDFF',
|
||||
},
|
||||
Button: {
|
||||
defaultColor: '#5B6167',
|
||||
defaultBorderColor: '#EBEBEB',
|
||||
defaultShadow: 'none',
|
||||
primaryShadow: 'none',
|
||||
dangerShadow: 'none'
|
||||
},
|
||||
Form: {
|
||||
labelColor: '#212332',
|
||||
},
|
||||
Slider: {
|
||||
// dotSize: 10,
|
||||
controlSize: 8,
|
||||
railSize: 8,
|
||||
handleSize: 10,
|
||||
handleSizeHover: 10,
|
||||
handleColor: '#155EEF',
|
||||
trackBg: '#155EEF',
|
||||
railBg: '#E1E2E7',
|
||||
},
|
||||
Table: {
|
||||
borderColor: '#DFE4ED',
|
||||
headerBg: '#FBFDFF',
|
||||
rowHoverBg: '#F0F3F8',
|
||||
rowSelectedBg: '#E9F1FF',
|
||||
rowSelectedHoverBg: '#F0F3F8',
|
||||
cellPaddingBlock: 8,
|
||||
|
||||
// cellPaddingInline: 24,
|
||||
selectionColumnWidth: 48,
|
||||
},
|
||||
Breadcrumb: {
|
||||
itemColor: '#5B6167',
|
||||
lastItemColor: '#212332',
|
||||
linkColor: '#5B6167',
|
||||
linkHoverColor: '#212332',
|
||||
}
|
||||
}
|
||||
};
|
||||
177
web/src/styles/index.css
Normal file
177
web/src/styles/index.css
Normal file
@@ -0,0 +1,177 @@
|
||||
@import "tailwindcss" prefix(rb);
|
||||
@plugin "@tailwindcss/typography";
|
||||
|
||||
html, body, #root {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
font-family: -apple-system, PingFangSC, 'PingFang SC', BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
/* 全局样式适配 */
|
||||
body {
|
||||
margin: 0;
|
||||
/* min-width: 320px; */
|
||||
min-height: 100vh;
|
||||
max-height: 100vh;
|
||||
/* background-color: var(--bg-color); */
|
||||
/* color: var(--text-color); */
|
||||
/* transition: background-color 0.3s, color 0.3s; */
|
||||
}
|
||||
|
||||
#root {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.ant-menu-light .ant-menu-item-selected,
|
||||
.ant-menu-light>.ant-menu .ant-menu-item-selected,
|
||||
.ant-menu-light:not(.ant-menu-horizontal) .ant-menu-item:not(.ant-menu-item-selected):hover,
|
||||
.ant-menu-light>.ant-menu:not(.ant-menu-horizontal) .ant-menu-item:not(.ant-menu-item-selected):hover {
|
||||
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
.ant-menu-light .ant-menu-item-selected,
|
||||
.ant-menu-light>.ant-menu .ant-menu-item-selected {
|
||||
font-weight: 500;
|
||||
}
|
||||
.ant-menu-inline-collapsed-tooltip .ant-tooltip-arrow {
|
||||
display: none;
|
||||
}
|
||||
.ant-menu-inline-collapsed-tooltip.ant-tooltip .ant-tooltip-inner {
|
||||
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.15);
|
||||
border-radius: 6px;
|
||||
padding: 8px 16px;
|
||||
background: #FFFFFF;
|
||||
color: #212332;
|
||||
}
|
||||
.ant-slider .ant-slider-handle::after {
|
||||
background-color: #155EEF;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
.ant-slider .ant-slider-handle::before {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
.ant-table-container {
|
||||
border: 1px solid #DFE4ED;
|
||||
border-radius: 8px;
|
||||
border-bottom: 0;
|
||||
}
|
||||
.ant-table-wrapper table {
|
||||
border-radius: 8px;
|
||||
}
|
||||
.ant-table-row:last-child .ant-table-cell:first-child {
|
||||
border-bottom-left-radius: 8px;
|
||||
}
|
||||
.ant-table-row:last-child .ant-table-cell:last-child {
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
.ant-table-cell::before {
|
||||
display: none;
|
||||
}
|
||||
.ant-table-cell .ant-btn {
|
||||
padding: 0;
|
||||
}
|
||||
.ant-table-cell.ant-btn-color-dangerous.ant-btn-variant-link {
|
||||
color: #FF5D34;
|
||||
}
|
||||
.ant-table-wrapper .ant-table-thead>tr>th,
|
||||
.ant-table-wrapper .ant-table-thead>tr>td {
|
||||
font-weight: 500;
|
||||
}
|
||||
.ant-table-wrapper .ant-table-pagination.ant-pagination {
|
||||
margin: 24px 0 32px 0;
|
||||
}
|
||||
.ant-pagination .ant-pagination-prev .ant-pagination-item-link,
|
||||
.ant-pagination .ant-pagination-next .ant-pagination-item-link,
|
||||
.ant-pagination .ant-pagination-item:not(.ant-pagination-item-active) {
|
||||
border-color: #DFE4ED;
|
||||
color: #5B6167;
|
||||
}
|
||||
|
||||
.ant-select-dropdown .ant-select-item,
|
||||
.ant-pagination .ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled),
|
||||
.ant-pagination .ant-select-single .ant-select-selector,
|
||||
.ant-pagination,
|
||||
.ant-pagination .ant-pagination-item a,
|
||||
.ant-pagination .ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis,
|
||||
.ant-pagination .ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis {
|
||||
color: #5B6167;
|
||||
}
|
||||
.ant-pagination .ant-pagination-item.ant-pagination-item-active {
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.ant-modal .ant-modal-content {
|
||||
padding: 24px;
|
||||
}
|
||||
.ant-modal .ant-modal-header {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.ant-modal .ant-modal-title {
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.ant-upload-wrapper .ant-upload-drag {
|
||||
height: 270px;
|
||||
background-color: #FBFCFF;
|
||||
border: 1px solid #EBEBEB;
|
||||
}
|
||||
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload.ant-upload-select,
|
||||
.ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload.ant-upload-select {
|
||||
border-style: solid;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture .ant-upload-list-item,
|
||||
.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item,
|
||||
.ant-upload-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item {
|
||||
padding: 0;
|
||||
}
|
||||
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item::before,
|
||||
.ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item::before,
|
||||
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item::before,
|
||||
.ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item::before {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,
|
||||
.ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container,
|
||||
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-container,
|
||||
.ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-container {
|
||||
width: 136px;
|
||||
height: 136px;
|
||||
}
|
||||
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-thumbnail,
|
||||
.ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-thumbnail,
|
||||
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-thumbnail,
|
||||
.ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-thumbnail,
|
||||
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img,
|
||||
.ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img,
|
||||
.ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-thumbnail img,
|
||||
.ant-upload-wrapper.ant-upload-picture-circle-wrapper .ant-upload-list.ant-upload-list-picture-circle .ant-upload-list-item-thumbnail img {
|
||||
border-radius: 8px;
|
||||
}
|
||||
.ant-form-item .ant-form-item-explain,
|
||||
.ant-form-item .ant-form-item-extra {
|
||||
font-size: 12px;
|
||||
line-height: 16px;
|
||||
}
|
||||
.infinite-scroll-component {
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
.ant-slider-horizontal .ant-slider-handle {
|
||||
inset-block-start: 6px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: transparent !important;
|
||||
}
|
||||
.ant-breadcrumb a:hover {
|
||||
background-color: transparent;
|
||||
}
|
||||
Reference in New Issue
Block a user