Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@ant-design-vue/pro-layout
Advanced tools
Ant Design Pro Layout of Vue, easy to use pro scaffolding.
# yarn
yarn add @ant-design-vue/pro-layout@next
# npm
npm i @ant-design-vue/pro-layout@next -S
First, you should add the icons that you need into the library.
import 'ant-design-vue/dist/antd.less'; // antd css
import '@ant-design-vue/pro-layout/dist/style.css'; // pro-layout css
import { createApp } from 'vue';
import ProLayout, { PageContainer } from '@ant-design-vue/pro-layout';
const app = createApp();
app.use(ProLayout).use(PageContainer).mount('#app');
After that, you can use pro-layout in your Vue components as simply as this:
<template>
<pro-layout
:locale="locale"
v-bind="state"
v-model:openKeys="state.openKeys"
v-model:collapsed="state.collapsed"
v-model:selectedKeys="state.selectedKeys"
>
<router-view />
</pro-layout>
</template>
<script>
import { defineComponent, reactive } from 'vue';
// import { getMenuData, clearMenuItem } from '@ant-design-vue/pro-layout';
const locale=(i18n: string) => i18n;
export default defineComponent({
setup() {
const state = reactive({
collapsed: false,
openKeys: ['/dashboard'],
selectedKeys: ['/welcome'],
isMobile: false,
fixSiderbar: false,
fixedHeader: false,
menuData: [],
sideWidth: 208,
hasSideMenu: true,
hasHeader: true,
hasFooterToolbar: false,
setHasFooterToolbar: has => (state.hasFooterToolbar = has),
});
return {
locale,
state,
};
},
});
</script>
or TSX
import { defineComponent, reactive } from 'vue';
import { RouterView } from 'vue-router';
import ProLayout from '@ant-design-vue/pro-layout';
import '@ant-design-vue/pro-layout/dist/style.css'; // pro-layout css
export default defineComponent({
setup() {
const state = reactive({
collapsed: false,
openKeys: ['/dashboard'],
selectedKeys: ['/welcome'],
isMobile: false,
fixSiderbar: false,
fixedHeader: false,
menuData: [],
sideWidth: 208,
hasSideMenu: true,
hasHeader: true,
hasFooterToolbar: false,
setHasFooterToolbar: (has: boolean) => (state.hasFooterToolbar = has),
});
return () => (
<ProLayout {...state} locale={(i18n: string) => i18n}>
<RouterView />
</ProLayout>
);
},
});
npm run build # Build library
npm run test # Runing Test
FAQs
Ant Design Pro Layout of Vue, easy to use pro scaffolding.
The npm package @ant-design-vue/pro-layout receives a total of 2,549 weekly downloads. As such, @ant-design-vue/pro-layout popularity was classified as popular.
We found that @ant-design-vue/pro-layout demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.