chain-saasui
Version:
chain-saasui
49 lines (45 loc) • 1.18 kB
JavaScript
// lib/index.js
import SDrawer from './SDrawer/index';
import SDialog from './SDialog/index';
import SPagedetail from './SPage/Pagedetail';
import SPagetable from './SPage/Pagetable';
import SUnit from './SUnit/index';
import SCard from './SCard/index';
import SGroup from './SGroup/index';
import STableButtons from './STableButtons/index';
import SMessagebox from './SMessagebox/index';
import STable from './STable/index';
import SContainer from './SContainer/index';
import STablecolumn from './STable/STablecolumn';
import * as baseComponents from './SForm';
console.log(baseComponents);
const components = {
SDrawer,
SDialog,
SPagedetail,
SUnit,
SCard,
SGroup,
SPagetable,
STable,
STableButtons,
SContainer,
STablecolumn,
...baseComponents,
};
const install = function (Vue) {
if (install.installed) return;
Object.keys(components).forEach(key => {
Vue.component(components[key].name, components[key]);
});
};
/* istanbul ignore if */
if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
}
export default {
version: '1.0.0',
install,
SMessagebox,
...components,
};