UNPKG

element-plus-jsx

Version:

基于 Element Plus 扩展 JSX 语法的组件库

24 lines (21 loc) 698 B
import { ElTablex } from './table/index.js'; import { ElFormx } from './form/index.js'; import { ElProviderx } from './provider/index.js'; import { setGlobalConfig } from './_utils/index.js'; const components = { ElTablex, ElFormx, ElProviderx }; const install = (app, options) => { if (options?.tablePlugins) { setGlobalConfig(app, { tablePlugins: options.tablePlugins }); } if (options?.formPlugins) { setGlobalConfig(app, { formPlugins: options.formPlugins }); } for (const key of Object.keys(components)) { app.use(components[key], options); } }; const ElementPlusJsx = { install, ...components }; export { ElementPlusJsx as default };