整理框架和新建基础模块

This commit is contained in:
linxd
2025-06-17 18:32:33 +08:00
parent 08424ecdb8
commit ebc4dfe1f9
51 changed files with 2200 additions and 2850 deletions

View File

@ -0,0 +1,73 @@
// 通用容器样式
.common-container {
background: #fff;
padding: 15px;
// 按钮组样式
.action-buttons {
display: flex;
align-items: center;
margin-bottom: 15px;
}
// 内容区样式
.content-area {
min-height: 500px;
}
// 表格样式优化
.ant-table-wrapper {
.ant-table-thead > tr > th {
background-color: #fafafa;
font-weight: 500;
}
}
// 分页样式
.ant-pagination {
margin-top: 16px;
text-align: right;
}
// 按钮间距
.action-space {
button {
margin-right: 8px;
&:last-child {
margin-right: 0;
}
}
}
}
// 筛选条件和操作按钮区域样式
.filter-action-row {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
.filter-form {
flex: 1;
.filter-btns {
button {
margin-right: 8px;
}
}
}
.right-buttons {
display: flex;
align-items: center;
button {
margin-right: 8px;
&:last-child {
margin-right: 0;
}
}
.selected-count {
margin-left: 8px;
}
}
}

View File

@ -52,11 +52,12 @@ const codeMessage = {
* 配置request请求时的默认参数
*/
const request = extend({
prefix: '/api',
// errorHandler, // 默认错误处理
credentials: 'include' // 默认请求是否带上cookie
});
// request拦截器, 改变url 或 options.
request.interceptors.request.use(async (url, options) => {
request.interceptors.request.use((url, options) => {
if (
options.method === 'post' ||
options.method === 'put' ||
@ -72,7 +73,7 @@ request.interceptors.request.use(async (url, options) => {
// options.headers = headers;
}
return {
url,
url: url,
options: { ...options },
};
});