Merge branch 'main' into feature/linzhijun_扣子智能体_0710
# Conflicts: # src/components/_base/navbar/index.vue # src/main.ts # src/permission/permission.ts # vite.config.ts
This commit is contained in:
@ -1,13 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
<script setup>
|
||||
import { useAppStore } from '@/stores';
|
||||
import { useResponsive } from '@/hooks';
|
||||
import JoinModal from '@/components/join-modal.vue';
|
||||
import { getQueryParam } from '@/utils/helper';
|
||||
import { useUserStore } from '@/stores';
|
||||
|
||||
import { ref, onMounted, computed } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
const joinEnterpriseVisible = ref(false);
|
||||
const joinModalRef = ref(null);
|
||||
const appStore = useAppStore();
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
||||
@ -36,14 +40,15 @@ const paddingStyle = computed(() => {
|
||||
onMounted(() => {
|
||||
checkHasInviteCode();
|
||||
});
|
||||
const setCollapsed = (val: boolean) => {
|
||||
const setCollapsed = (val) => {
|
||||
appStore.updateSettings({ menuCollapse: val });
|
||||
};
|
||||
|
||||
const checkHasInviteCode = () => {
|
||||
const inviteCode = getQueryParam('invite_code');
|
||||
if (inviteCode) {
|
||||
if (userStore.isLogin && inviteCode) {
|
||||
joinEnterpriseVisible.value = true;
|
||||
joinModalRef.value?.getEnterprise?.();
|
||||
}
|
||||
};
|
||||
const drawerVisible = ref(false);
|
||||
@ -57,7 +62,7 @@ provide('toggleDrawerMenu', () => {
|
||||
|
||||
<template>
|
||||
<a-layout :class="['layout', { mobile: appStore.hideMenu }]">
|
||||
<JoinModal v-model:visible="joinEnterpriseVisible" />
|
||||
<JoinModal v-model:visible="joinEnterpriseVisible" ref="joinModalRef" />
|
||||
<div v-if="navbar" class="layout-navbar">
|
||||
<base-navbar />
|
||||
</div>
|
||||
@ -102,9 +107,9 @@ provide('toggleDrawerMenu', () => {
|
||||
</a-layout>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
@nav-size-height: 72px;
|
||||
@layout-max-width: 1100px;
|
||||
<style scoped lang="scss">
|
||||
$nav-size-height: 72px;
|
||||
$layout-max-width: 1100px;
|
||||
|
||||
.layout {
|
||||
width: 100%;
|
||||
@ -116,7 +121,7 @@ provide('toggleDrawerMenu', () => {
|
||||
left: 0;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
height: @nav-size-height;
|
||||
height: $nav-size-height;
|
||||
}
|
||||
.layout-sider {
|
||||
position: fixed;
|
||||
|
||||
@ -14,7 +14,7 @@ const back = () => {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
<style scoped lang="scss">
|
||||
.content {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
|
||||
@ -27,7 +27,7 @@ const hideFooter = computed(() => route.meta?.hideFooter);
|
||||
</router-view>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
<style lang="scss" scoped>
|
||||
.footer {
|
||||
margin: 20px;
|
||||
width: 98%;
|
||||
|
||||
Reference in New Issue
Block a user