fetch(add): 账户管理

This commit is contained in:
sexygoat
2026-01-23 17:18:24 +08:00
parent 339abca4c0
commit b53fea43c6
93 changed files with 7094 additions and 3153 deletions

View File

@@ -13,18 +13,18 @@
padding: 0 0 4px;
.avatar-large {
display: flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
margin: 0 10px 0 0;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--el-color-primary);
border-radius: 50%;
color: white;
font-size: 18px;
font-weight: 600;
flex-shrink: 0;
color: white;
background-color: var(--el-color-primary);
border-radius: 50%;
}
.user-wrap {
@@ -364,8 +364,8 @@
.user-info-display {
display: flex;
align-items: center;
gap: 10px;
align-items: center;
padding: 6px 12px;
cursor: pointer;
background-color: transparent;
@@ -373,17 +373,17 @@
transition: all 0.2s;
.avatar {
width: 32px;
height: 32px;
display: flex;
flex-shrink: 0;
align-items: center;
justify-content: center;
background-color: var(--el-color-primary);
border-radius: 50%;
color: white;
width: 32px;
height: 32px;
font-size: 14px;
font-weight: 600;
flex-shrink: 0;
color: white;
background-color: var(--el-color-primary);
border-radius: 50%;
}
.info {
@@ -394,8 +394,8 @@
.username {
font-size: 14px;
color: var(--art-gray-800);
font-weight: 500;
color: var(--art-gray-800);
}
.user-type {

View File

@@ -4,7 +4,7 @@
<el-dialog v-model="visible" :width="370" :show-close="false" @open="handleDialogOpen">
<div class="lock-content">
<img class="cover" src="@imgs/user/avatar.webp" />
<div class="username">{{ userInfo.userName }}</div>
<div class="username">{{ userInfo.username }}</div>
<el-form ref="formRef" :model="formData" :rules="rules" @submit.prevent="handleLock">
<el-form-item prop="password">
<el-input
@@ -33,7 +33,7 @@
<div class="unlock-content" v-else>
<div class="box">
<img class="cover" src="@imgs/user/avatar.webp" />
<div class="username">{{ userInfo.userName }}</div>
<div class="username">{{ userInfo.username }}</div>
<el-form
ref="unlockFormRef"
:model="unlockForm"

View File

@@ -21,6 +21,8 @@
:size="tableSizeComputed"
:stripe="stripeComputed"
:border="borderComputed"
:tree-props="treeProps"
:default-expand-all="defaultExpandAll"
:header-cell-style="{
backgroundColor: showHeaderBackground ? 'var(--el-fill-color-lighter)' : '',
fontWeight: '500'
@@ -123,6 +125,10 @@
marginTop?: number
/** 表格大小 */
size?: 'small' | 'default' | 'large'
/** 树形表格配置 */
treeProps?: { children?: string; hasChildren?: string }
/** 是否默认展开所有行 */
defaultExpandAll?: boolean
}
const props = withDefaults(defineProps<TableProps>(), {
@@ -146,7 +152,9 @@
paginationSize: 'default',
paginationLayout: '',
showHeaderBackground: null,
marginTop: 20
marginTop: 20,
treeProps: undefined,
defaultExpandAll: false
})
/*

View File

@@ -70,6 +70,7 @@
:span="field.span || 1"
>
<template v-if="field.formatter">
<!-- eslint-disable-next-line vue/no-v-text-v-html-on-component -->
<component :is="'div'" v-html="field.formatter(item)" />
</template>
<template v-else>
@@ -83,8 +84,8 @@
<!-- 分页器 -->
<div v-if="showPagination" class="descriptions-pagination">
<ElPagination
v-model:current-page="pagination.currentPage"
v-model:page-size="pagination.pageSize"
:current-page="pagination.currentPage"
:page-size="pagination.pageSize"
:page-sizes="[10, 20, 50, 100]"
:total="pagination.total"
layout="total, sizes, prev, pager, next, jumper"
@@ -182,7 +183,7 @@
}>()
// 当前视图模式
const currentView = ref(props.defaultView)
const currentView = ref<'table' | 'descriptions'>(props.defaultView)
// 表格引用
const tableRef = ref()
@@ -225,11 +226,6 @@
return item[props.rowKey] || index
}
// 获取卡片标题
const getCardTitle = (item: any) => {
return item[props.cardTitleField] || `项目 ${item[props.rowKey] || ''}`
}
// 获取字段值
const getFieldValue = (item: any, prop: string) => {
return item[prop] || '--'
@@ -287,15 +283,15 @@
<style lang="scss" scoped>
.art-data-viewer {
overflow: visible;
width: 100%;
overflow: visible;
.viewer-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
justify-content: space-between;
padding: 16px 0;
margin-bottom: 16px;
.header-left {
flex: 1;
@@ -303,8 +299,8 @@
.header-right {
display: flex;
align-items: center;
gap: 12px;
align-items: center;
}
}
@@ -319,15 +315,15 @@
display: grid;
grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
gap: 16px;
margin-bottom: 20px;
width: 100%;
min-height: 0;
margin-bottom: 20px;
.description-card {
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
position: relative;
cursor: pointer;
border-radius: 8px;
transition: all 0.3s ease;
&.selected {
border: 1px solid var(--el-color-primary);
@@ -335,9 +331,9 @@
// 字段内容样式 - 允许自然换行
.field-content {
word-wrap: break-word;
word-break: break-all;
line-height: 1.5;
word-break: break-all;
word-wrap: break-word;
}
// 针对描述列表的特殊处理
@@ -349,18 +345,18 @@
.el-descriptions__cell {
&.is-bordered-label {
width: v-bind('props.labelWidth');
min-width: v-bind('props.labelWidth');
word-wrap: break-word;
vertical-align: top;
min-width: v-bind('props.labelWidth');
}
&.is-bordered-content {
vertical-align: top;
.el-descriptions__content {
word-wrap: break-word;
word-break: break-all;
line-height: 1.5;
word-break: break-all;
word-wrap: break-word;
}
}
}
@@ -377,7 +373,7 @@
}
// 响应式调整
@media (max-width: 768px) {
@media (width <= 768px) {
.descriptions-grid {
grid-template-columns: 1fr;
gap: 12px;