chain-saasui
Version:
chain-saasui
59 lines (54 loc) • 1.4 kB
JavaScript
// lib/index.js
import SDrawer from './SDrawer/index';
import SDialog from './SDialog/index';
import SPagetable from './SPage/Pagetable';
import SUnit from './SUnit/index';
import SCard from './SCard/index';
import SGroup from './SGroup/index';
import SMessagebox from './SMessagebox/index';
import STable from './STable/index';
import SContainer from './SContainer/index';
import STablecolumn from './STable/STablecolumn';
import SSteps from './SSteps/index';
import SSegmented from './SSegmented/segmented';
import SIcon from './SIcon/Icon';
import STooltipWrap from './STooltipWrap/index';
import * as BaseComponents from './SForm';
import * as Pages from './SPage';
import * as Buttons from './SButton';
import * as Spaces from './SSpace';
const components = {
SDrawer,
SDialog,
SUnit,
SCard,
SGroup,
SPagetable,
STable,
SContainer,
STablecolumn,
SSteps,
SSegmented,
SIcon,
STooltipWrap,
...Pages,
...Buttons,
...Spaces,
...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,
};