样式修正,支持配置登录方式、icon等

This commit is contained in:
2025-12-24 14:12:44 +08:00
parent 3d1e19030a
commit 3499a516fe
33 changed files with 246 additions and 345 deletions

View File

@@ -155,13 +155,13 @@ function isActive(menu: RouteRecordRaw): boolean {
}
&:hover {
color: #165DFF;
color: #C62828;
}
&.active {
color: #165DFF;
color: #C62828;
font-weight: 500;
border-bottom-color: #165DFF;
border-bottom-color: #C62828;
}
}
}

View File

@@ -28,16 +28,17 @@
<el-empty v-if="!loading && knowledgeCards.length === 0" description="暂无知识库" />
<el-pagination
v-if="total >= 0"
:current-page="pageParam.pageNumber"
:page-size="pageParam.pageSize"
:total="total"
:page-sizes="[9, 18, 36]"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handlePageChange"
@size-change="handleSizeChange"
/>
<div class="pagination-container" v-if="total >= 0">
<el-pagination
:current-page="pageParam.pageNumber"
:page-size="pageParam.pageSize"
:total="total"
:page-sizes="[9, 18, 36]"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handlePageChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<!-- 层级2: 知识库详情覆盖在列表上方 -->

View File

@@ -1231,13 +1231,6 @@ onMounted(() => {
}
}
// 分页组件
// .pagination-container {
// margin-top: 24px;
// display: flex;
// justify-content: center;
// padding: 20px 0;
// }
// ==================== 下拉选择器样式 ====================
.select-container {

View File

@@ -70,9 +70,8 @@
</el-table>
<!-- 分页 -->
<div class="pagination-container">
<el-pagination
class="pagination-container"
v-model:current-page="pageParam.pageNumber"
v-model:page-size="pageParam.pageSize"
:page-sizes="[10, 20, 50, 100]"
@@ -81,6 +80,7 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
</div>
@@ -361,11 +361,6 @@ onMounted(() => {
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
//.pagination-container {
// display: flex;
// justify-content: center;
// margin-top: 20px;
// }
}
.dialog-footer {

View File

@@ -753,12 +753,6 @@ onMounted(() => {
}
}
.pagination-container {
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
.cron-examples {
div {
padding: 6px 0;

View File

@@ -526,11 +526,6 @@ function handleSizeChange(size: number) {
// el-table和el-button会自动处理样式和交互
.pagination-container {
display: flex;
justify-content: center;
margin-top: 20px;
}

View File

@@ -200,16 +200,18 @@
</el-table>
<!-- 分页 -->
<el-pagination
v-model:current-page="pagination.page"
v-model:page-size="pagination.size"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
@size-change="loadMessages"
@current-change="loadMessages"
style="margin-top: 20px; justify-content: flex-end"
/>
<div class="pagination-container" v-if="pagination.total >= 0">
<el-pagination
v-model:current-page="pagination.page"
v-model:page-size="pagination.size"
:total="pagination.total"
:page-sizes="[10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
@size-change="loadMessages"
@current-change="loadMessages"
style="margin-top: 20px; justify-content: flex-end"
/>
</div>
</el-card>
<!-- 创建/编辑对话框 -->

View File

@@ -44,15 +44,16 @@
</el-table-column>
</el-table>
<el-pagination
class="pagination-container"
v-model:current-page="pageParam.pageNumber"
v-model:page-size="pageParam.pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
<div class="pagination-container">
<el-pagination
v-model:current-page="pageParam.pageNumber"
v-model:page-size="pageParam.pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
/>
</div>
<!-- 文章查看弹窗 -->
<ArticleShowView

View File

@@ -768,14 +768,6 @@ onMounted(() => {
}
}
}
// 分页容器
.pagination-container {
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
// 详情对话框样式
.detail-content {
max-height: 70vh;

View File

@@ -111,19 +111,16 @@
:label="item.configName || item.configKey"
:prop="item.configKey"
>
<el-upload
:action="uploadUrl"
:headers="uploadHeaders"
:show-file-list="true"
:limit="1"
list-type="picture-card"
:on-success="(response: any) => handleUploadSuccess(response, group.groupKey, item.configKey)"
:on-remove="() => handleRemove(group.groupKey, item.configKey)"
:file-list="getFileList(group.groupKey, item.configKey)"
>
<el-icon><Plus /></el-icon>
</el-upload>
<span v-if="item.remark" class="form-item-remark">{{ item.remark }}</span>
<FileUpload
list-type="cover"
:cover-url="configData[group.groupKey][item.configKey]"
@update:cover-url="(url) => handleCoverUpdate(url, group.groupKey, item.configKey)"
accept="image/*"
:max-size="5"
module="system"
:as-dialog="false"
:tip="item.remark || '点击上传图片支持jpg、png格式'"
/>
</el-form-item>
</template>
@@ -146,14 +143,12 @@
</template>
<script setup lang="ts">
import { ref, reactive, onMounted, computed } from 'vue';
import { ref, reactive, onMounted } from 'vue';
import { AdminLayout } from '@/views/admin';
import { ElMessage } from 'element-plus';
import { Plus } from '@element-plus/icons-vue';
import { configApi } from '@/apis/system';
import type { ConfigItem } from '@/types/system/config';
import { APP_CONFIG, FILE_DOWNLOAD_URL } from '@/config';
import { useStore } from 'vuex';
import FileUpload from '@/components/file/FileUpload.vue';
defineOptions({
name: 'SystemConfigView'
@@ -170,13 +165,6 @@ interface ConfigGroup {
const loading = ref(false);
const saving = ref(false);
const activeTab = ref('');
const store = useStore();
// 上传配置
const uploadUrl = APP_CONFIG.file.uploadUrl;
const uploadHeaders = computed(() => ({
Authorization: `Bearer ${store.state.auth.token}`
}));
// 配置分组列表
const configGroups = ref<ConfigGroup[]>([]);
@@ -364,38 +352,10 @@ async function loadConfigs() {
}
/**
* 获取文件列表(用于显示已上传的图片)
* 处理封面URL更新
*/
function getFileList(groupKey: string, configKey: string): any[] {
const fileId = configData[groupKey]?.[configKey];
if (fileId) {
return [{
name: 'image',
url: `${FILE_DOWNLOAD_URL}${fileId}`
}];
}
return [];
}
/**
* 处理上传成功
*/
function handleUploadSuccess(response: any, groupKey: string, configKey: string) {
if (response.success && response.data) {
// 后端返回的是fileId
configData[groupKey][configKey] = response.data;
ElMessage.success('图片上传成功');
} else {
ElMessage.error(response.message || '图片上传失败');
}
}
/**
* 处理删除图片
*/
function handleRemove(groupKey: string, configKey: string) {
configData[groupKey][configKey] = '';
ElMessage.success('图片已删除');
function handleCoverUpdate(url: string, groupKey: string, configKey: string) {
configData[groupKey][configKey] = url;
}
/**

View File

@@ -603,11 +603,6 @@ function handleSizeChange(size: number) {
}
}
.pagination-container {
display: flex;
justify-content: flex-end;
margin-top: 24px;
}
.tag-container {
display: flex;