Vxe Design module for Nuxt
- Automatically import components and styles on demand.
npm install vxe-design-nuxt -Dexport default defineNuxtConfig({
modules: [
'vxe-design-nuxt'
],
vxeDesignSetting: {
// global: true // 是否全局加载,如果 false 则按需加载
}
})<template>
<div>
<vxe-form-design :widgets="formDesignWidgets" :height="800" />
</div>
</template>
<script>
export default {
data() {
const formDesignWidgets = [
{
group: 'base',
children: [
'VxeInput',
'VxeTextarea',
'VxeSelect',
'VxeSwitch',
'VxeRadioGroup',
'VxeCheckboxGroup'
]
}
]
return {
formDesignWidgets
}
}
}
</script>Reference Nuxt documentation and playground use.
- Run
npm run updateto install the dependencies. - Run
npm run runto start playground in development mode. - Run
npm run buildto build this project.