Pro Design Vue Component Library
Pro Design Vue is an enterprise-class UI component library for Vue 3, built on top of Ant Design Vue. It provides a set of high-quality, ready-to-use Vue components primarily targeted at desktop applications. The library is currently at version 1.3.41 and maintains a frequent release cadence, primarily with patch versions, indicating active development and continuous improvements. Key differentiators include its robust foundation leveraging Ant Design Vue's established patterns, ensuring a consistent and performant user experience for complex enterprise interfaces. It fully supports modern browsers and Vue 3, shipping with TypeScript types for enhanced developer experience. Unlike standalone UI libraries, it extends the Ant Design Vue ecosystem with additional 'pro' components, focusing on common enterprise application scenarios.
Common errors
-
Error: Failed to resolve component: ProLayout
cause The `ProLayout` component (or any other Pro Design Vue component) was not correctly imported or registered with the Vue application instance.fixEnsure you either globally register the entire library using `app.use(ProDesignVue)` or locally import and register specific components using `import { ProLayout } from 'pro-design-vue';` and add it to the `components` option in your Vue component. -
TypeError: Cannot read properties of undefined (reading 'use')
cause This typically happens if you try to use `app.use()` on something that isn't a Vue application instance, or if `ProDesignVue` itself wasn't imported correctly as a plugin.fixVerify that `app` is a valid Vue application created with `createApp(App)`, and that `ProDesignVue` is imported as the default export for global registration: `import ProDesignVue from 'pro-design-vue';`.
Warnings
- gotcha Pro Design Vue relies heavily on Ant Design Vue as a peer dependency. Mismatched versions between `pro-design-vue` and `ant-design-vue` can lead to styling issues, runtime errors, or unexpected component behavior.
- gotcha Both `pro-design-vue` and its underlying `ant-design-vue` library require their respective CSS files to be imported for correct styling. Forgetting one or both will result in unstyled components.
- gotcha As `pro-design-vue` builds upon Ant Design Vue, any breaking changes or significant updates in a new major version of `ant-design-vue` might implicitly affect `pro-design-vue` users.
Install
-
npm install pro-design-vue -
yarn add pro-design-vue -
pnpm add pro-design-vue
Imports
- ProLayout
import ProLayout from 'pro-design-vue'
import { ProLayout } from 'pro-design-vue' - ProTable
const { ProTable } = require('pro-design-vue')import { ProTable } from 'pro-design-vue' - createApp
import { ProDesignVue } from 'pro-design-vue'; // Incorrect for global registrationimport { createApp } from 'vue'; import ProDesignVue from 'pro-design-vue'; const app = createApp(App); app.use(ProDesignVue);
Quickstart
import { createApp, defineComponent } from 'vue';
import ProDesignVue from 'pro-design-vue';
import { ProLayout, ProTable, ProCard } from 'pro-design-vue';
import 'pro-design-vue/dist/pro-design-vue.css';
import 'ant-design-vue/dist/reset.css'; // Important for Ant Design Vue 4
const App = defineComponent({
components: { ProLayout, ProTable, ProCard },
setup() {
const columns = [
{ title: 'Name', dataIndex: 'name', key: 'name' },
{ title: 'Age', dataIndex: 'age', key: 'age' }
];
const data = [
{ key: '1', name: 'John Brown', age: 32 },
{ key: '2', name: 'Jim Green', age: 40 }
];
return { columns, data };
},
template: `
<ProLayout>
<template #headerContent>
<h1>My Pro App</h1>
</template>
<ProCard title="Data Table">
<ProTable :columns="columns" :data-source="data"></ProTable>
</ProCard>
</ProLayout>
`
});
const app = createApp(App);
app.use(ProDesignVue);
app.mount('#app');