refactor: 版权、登录必读和租户选择
This commit is contained in:
@@ -7,25 +7,18 @@ import { computed, onMounted, ref, watch } from 'vue';
|
|||||||
|
|
||||||
import { useAccess } from '@vben/access';
|
import { useAccess } from '@vben/access';
|
||||||
import { AuthenticationLoginExpiredModal, useVbenModal } from '@vben/common-ui';
|
import { AuthenticationLoginExpiredModal, useVbenModal } from '@vben/common-ui';
|
||||||
import { VBEN_DOC_URL, VBEN_GITHUB_URL } from '@vben/constants';
|
|
||||||
import { isTenantEnable, useTabs, useWatermark } from '@vben/hooks';
|
import { isTenantEnable, useTabs, useWatermark } from '@vben/hooks';
|
||||||
import {
|
import { AntdProfileOutlined } from '@vben/icons';
|
||||||
AntdProfileOutlined,
|
|
||||||
BookOpenText,
|
|
||||||
CircleHelp,
|
|
||||||
MdiGithub,
|
|
||||||
} from '@vben/icons';
|
|
||||||
import {
|
import {
|
||||||
BasicLayout,
|
BasicLayout,
|
||||||
Help,
|
Help,
|
||||||
LockScreen,
|
LockScreen,
|
||||||
Notification,
|
Notification,
|
||||||
TenantDropdown,
|
|
||||||
UserDropdown,
|
UserDropdown,
|
||||||
} from '@vben/layouts';
|
} from '@vben/layouts';
|
||||||
import { preferences } from '@vben/preferences';
|
import { preferences } from '@vben/preferences';
|
||||||
import { useAccessStore, useUserStore } from '@vben/stores';
|
import { useAccessStore, useUserStore } from '@vben/stores';
|
||||||
import { formatDateTime, openWindow } from '@vben/utils';
|
import { formatDateTime } from '@vben/utils';
|
||||||
|
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
|
|
||||||
@@ -41,6 +34,8 @@ import { router } from '#/router';
|
|||||||
import { useAuthStore } from '#/store';
|
import { useAuthStore } from '#/store';
|
||||||
import LoginForm from '#/views/_core/authentication/login.vue';
|
import LoginForm from '#/views/_core/authentication/login.vue';
|
||||||
|
|
||||||
|
import TenantDropdown from './components/tenant-dropdown.vue';
|
||||||
|
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const accessStore = useAccessStore();
|
const accessStore = useAccessStore();
|
||||||
@@ -52,7 +47,7 @@ const notifications = ref<NotificationItem[]>([]);
|
|||||||
const unreadCount = ref(0);
|
const unreadCount = ref(0);
|
||||||
const showDot = computed(() => unreadCount.value > 0);
|
const showDot = computed(() => unreadCount.value > 0);
|
||||||
|
|
||||||
const [HelpModal, helpModalApi] = useVbenModal({
|
const [HelpModal] = useVbenModal({
|
||||||
connectedComponent: Help,
|
connectedComponent: Help,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const accessStore = useAccessStore();
|
|||||||
|
|
||||||
const tenantEnable = isTenantEnable();
|
const tenantEnable = isTenantEnable();
|
||||||
|
|
||||||
const value = ref<number>(accessStore.visitTenantId ?? undefined); // 当前访问的租户 ID
|
const value = ref<number | undefined>(accessStore.visitTenantId ?? undefined); // 当前访问的租户 ID
|
||||||
const tenants = ref<SystemTenantApi.Tenant[]>([]); // 租户列表
|
const tenants = ref<SystemTenantApi.Tenant[]>([]); // 租户列表
|
||||||
|
|
||||||
// TODO @xingyu:这个有可能 3 端复用么?
|
// TODO @xingyu:这个有可能 3 端复用么?
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export const overridesPreferences = defineOverridesPreferences({
|
|||||||
fixed: false,
|
fixed: false,
|
||||||
},
|
},
|
||||||
copyright: {
|
copyright: {
|
||||||
companyName: import.meta.env.VITE_APP_TITLE,
|
companyName: '深圳千通科技有限公司',
|
||||||
companySiteLink: 'https://www.agrandtech.com.cn',
|
companySiteLink: 'https://www.agrandtech.com.cn',
|
||||||
date: '2025',
|
date: '2025',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import { useVbenForm } from '@vben-core/form-ui';
|
|||||||
import { VbenButton, VbenCheckbox } from '@vben-core/shadcn-ui';
|
import { VbenButton, VbenCheckbox } from '@vben-core/shadcn-ui';
|
||||||
|
|
||||||
import Title from './auth-title.vue';
|
import Title from './auth-title.vue';
|
||||||
import DocLink from './doc-link.vue';
|
|
||||||
import ThirdPartyLogin from './third-party-login.vue';
|
import ThirdPartyLogin from './third-party-login.vue';
|
||||||
|
|
||||||
interface Props extends AuthenticationProps {
|
interface Props extends AuthenticationProps {
|
||||||
@@ -198,6 +197,6 @@ defineExpose({
|
|||||||
</slot>
|
</slot>
|
||||||
|
|
||||||
<!-- 萌新必读 -->
|
<!-- 萌新必读 -->
|
||||||
<DocLink />
|
<!-- <DocLink /> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user