perf: 调整

This commit is contained in:
rd
2025-07-17 09:58:49 +08:00
parent 0f94c630b6
commit 123f2ce3db
4 changed files with 19 additions and 59 deletions

View File

@ -138,7 +138,7 @@ const setServerMenu = () => {
font-size: 16px; font-size: 16px;
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
line-height: 22px; /* 137.5% */ line-height: 22px;
} }
} }
.arco-dropdown-option-content { .arco-dropdown-option-content {
@ -147,7 +147,6 @@ const setServerMenu = () => {
&:not(.arco-dropdown-option-disabled):hover { &:not(.arco-dropdown-option-disabled):hover {
background-color: transparent; background-color: transparent;
.arco-dropdown-option-content { .arco-dropdown-option-content {
// border-radius: 8px;
background: var(--BG-200, #f2f3f5); background: var(--BG-200, #f2f3f5);
} }
} }
@ -182,51 +181,4 @@ const setServerMenu = () => {
} }
} }
} }
// .layout-avatar-dropdown {
// .arco-dropdown {
// border-radius: 8px;
// border: 1px solid var(--BG-300, #e6e6e8);
// background: var(--BG-white, #fff);
// padding: 12px 0px;
// .arco-dropdown-option {
// padding: 0 12px;
// margin-bottom: 4px;
// &-content {
// display: flex;
// height: 40px;
// width: 100%;
// padding: 10px 24px;
// align-items: center;
// .menu-item-text {
// color: var(--Text-2, #3c4043);
// font-family: 'PuHuiTi-Regular';
// font-size: 16px;
// font-style: normal;
// font-weight: 400;
// line-height: 22px; /* 137.5% */
// }
// }
// &:not(.arco-dropdown-option-disabled):hover {
// background-color: transparent;
// .arco-dropdown-option-content {
// border-radius: 8px;
// background: var(--BG-200, #f2f3f5);
// }
// }
// }
// }
// }
// .layout-avatar-dropdown {
// width: 200px;
// .arco-dropdown {
// padding: 12px 4px;
// .arco-dropdown-option {
// padding: 0 !important;
// &-content {
// padding: 0 12px !important;
// }
// }
// }
// }
</style> </style>

View File

@ -99,7 +99,9 @@ const addAccountVisible = ref(false);
const deleteVisible = ref(false); const deleteVisible = ref(false);
const deleteTitle = ref(''); const deleteTitle = ref('');
const enterpriseInfo = store.enterpriseInfo; const enterpriseInfo = computed(() => {
return store.enterpriseInfo ?? {};
});
const okText = computed(() => { const okText = computed(() => {
if (!canAddAccount.value) { if (!canAddAccount.value) {
@ -109,9 +111,9 @@ const okText = computed(() => {
}); });
const customerServiceVisible = ref(false); const customerServiceVisible = ref(false);
const canAddAccount = computed(() => { const canAddAccount = computed(() => {
if (!enterpriseInfo) return false; if (!enterpriseInfo.value) return false;
return enterpriseInfo.sub_account_quota > enterpriseInfo.used_sub_account_count; return enterpriseInfo.value.sub_account_quota > enterpriseInfo.value.used_sub_account_count;
}); });
const currentSelectAccount = ref(); const currentSelectAccount = ref();

View File

@ -48,7 +48,9 @@ const form = reactive({
name: '', name: '',
}); });
const enterpriseInfo = store.enterpriseInfo; const enterpriseInfo = computed(() => {
return store.enterpriseInfo ?? {};
});
const columns = [ const columns = [
{ {
@ -65,11 +67,13 @@ const infoVisible = ref(false);
const customerServiceVisible = ref(false); const customerServiceVisible = ref(false);
const dataSource = computed(() => { const dataSource = computed(() => {
return enterpriseInfo ? [enterpriseInfo] : []; return enterpriseInfo.value ? [enterpriseInfo.value] : [];
}); });
console.log({ dataSource });
const canUpdate = computed(() => { const canUpdate = computed(() => {
if (!enterpriseInfo) return false; if (!enterpriseInfo.value) return false;
return enterpriseInfo.update_name_quota > enterpriseInfo.used_update_name_count; return enterpriseInfo.value.update_name_quota > enterpriseInfo.value.used_update_name_count;
}); });
const okText = computed(() => { const okText = computed(() => {
@ -81,7 +85,7 @@ const okText = computed(() => {
function handleUpdate() { function handleUpdate() {
if (!canUpdate.value) { if (!canUpdate.value) {
form.name = enterpriseInfo!.name; form.name = enterpriseInfo.value?.name;
} }
infoVisible.value = true; infoVisible.value = true;
} }

View File

@ -91,7 +91,9 @@ import axios from 'axios';
import { useUserStore } from '@/stores'; import { useUserStore } from '@/stores';
const store = useUserStore(); const store = useUserStore();
const userInfo = store.userInfo; const userInfo = computed(() => {
return store.userInfo ?? {};
});
const columns = [ const columns = [
{ {
@ -115,7 +117,7 @@ const isSendCaptcha = ref(false);
const uploadInputRef = ref(); const uploadInputRef = ref();
const dataSource = computed(() => { const dataSource = computed(() => {
return userInfo ? [userInfo] : []; return userInfo.value ? [userInfo.value] : [];
}); });
// 表单校验规则 // 表单校验规则