backstage-vue3
backstage-vue3
一款基于Vue3,JSON配置化UI组件库,同时兼容element-ui、ant-design-vue
接入指南
安装
npm i backstage-vue3
添加babel按需引入插件
module.exports = {
...
plugins: [
...,
[ // 本次增加
'import',
{ // 按需引入backstage-vue3组件
libraryName: 'backstage-vue3',
libraryDirectory: 'lib',
customStyleName: () => {
return 'backstage-vue3/lib/css/index.css'
},
},
],
]
}
使用
<BsForm
v-model="form"
class="BaseForm"
:config="config"
/>
import { BsTable, BsForm } from 'backstage-vue3'
ant-design-vue使用
如果你是使用的element-plus你可以直接忽略此步骤,如果你使用的是ant-design-vue,你需要在main.js顶部添加
window.uiLanguage = 'ant'
注意事项
按需引入会对组件传入的所有props进行类型校验,如下:

可以直接导入内置提供的接口,来保证传入的数据符合类型校验:
<BsForm
v-model="form"
class="BaseForm"
:config="config"
/>
import { BsTable, BsForm, formConfig } from 'backstage-vue3'
const config = ref<formConfig>({
...
})
示例页面
Version History
| Version | Released | License |
|---|---|---|
| 0.2.30 | ||
| 0.2.29 | ||
| 0.2.28 | ||
| 0.2.27 | ||
| 0.2.26 | ||
| 0.2.25 | ||
| 0.2.24 | ||
| 0.2.23 | ||
| 0.2.22 | ||
| 0.2.21 | ||
| 0.2.20 | ||
| 0.2.19 | ||
| 0.2.18 | ||
| 0.2.17 | ||
| 0.2.16 | ||
| 0.2.12 | ||
| 0.2.11 | ||
| 0.2.10 | ||
| 0.2.9 | ||
| 0.2.8 | ||
| 0.2.7 | ||
| 0.2.6 | ||
| 0.2.5 | ||
| 0.2.4 | ||
| 0.2.3 | ||
| 0.2.2 | ||
| 0.2.1 | ||
| 0.1.7 | ||
| 0.1.6 | ||
| 0.1.4 |
Showing the latest 30 of 34. See every release on npm