🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@yqg/max-layout-plugin

Package Overview
Dependencies
Maintainers
25
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yqg/max-layout-plugin - npm Package Compare versions

Comparing version
1.1.14-beta.1
to
1.1.14-beta.2
+26
-4
dist/index.js

@@ -31,2 +31,15 @@ "use strict";

const config = api.config;
const menusValueTpl = api.userConfig.microMenu
? `
patchMenu((result) => {
menus.value = LayoutConfig?.fn?.menusFilter
? LayoutConfig?.fn?.menusFilter(route2menu(result as any), {localStorage, route, user})
: route2menu(result as any);
})
`
: `
menus.value = LayoutConfig?.fn?.menusFilter
? LayoutConfig?.fn?.menusFilter(route2menu(routes as any), {localStorage, route, user})
: route2menu(routes as any);
`;
api.writeTmpFile({

@@ -108,3 +121,3 @@ path: 'layout.vue',

<script setup lang="ts">
import { reactive, ref, onMounted, computed, watch, defineAsyncComponent } from "vue";
import { reactive, ref, onMounted, computed, watch, defineAsyncComponent, provide } from "vue";
import { useRoute, useRouter, RouteRecordName } from "vue-router";

@@ -117,2 +130,3 @@ import { Layout, ILayoutProps } from "@yqg/max-design";

import {getLayoutConfig} from '@/app';
import * as AppConfig from '@/app';
import { Spin, ConfigProvider } from 'ant-design-vue';

@@ -123,2 +137,5 @@ import { userConfigRoutes as configRoutes } from '../exports'

: ''}
${config.microMenu
? `import {patchMenu} from '@yqg/micro-menu-next';`
: ''}

@@ -157,2 +174,9 @@ const LayoutConfig = getLayoutConfig();

const userStore = useUserStore();
if(AppConfig?.microMenuConfig?.code) {
provide('extraMicroProps', {
userState: userStore,
...(AppConfig.microMenuConfig.extraMicroProps || {})
});
}
const {configProvider} = useConfigProviderStore();

@@ -302,5 +326,3 @@ const { hasAnyAuthorized, fetch, logout } = userStore;

LayoutConfig?.fn?.useFetchSuccess && LayoutConfig?.fn?.useFetchSuccess();
menus.value = LayoutConfig?.fn?.menusFilter
? LayoutConfig?.fn?.menusFilter(route2menu(routes as any), {localStorage, route, user})
: route2menu(routes as any);
${menusValueTpl}
`

@@ -307,0 +329,0 @@ : ''}

+2
-2
{
"name": "@yqg/max-layout-plugin",
"version": "1.1.14-beta.1",
"version": "1.1.14-beta.2",
"description": "",

@@ -17,3 +17,3 @@ "keywords": [],

"devDependencies": {
"@yqg/max": "1.2.20-beta.4"
"@yqg/max": "1.2.20-beta.5"
},

@@ -20,0 +20,0 @@ "scripts": {