@ly-js/ui
Version:
`@ly-js/ui` 是基于`vue3`常用库,会在`@ly-js/element`、`@ly-js/vant`中引入
21 lines (18 loc) • 436 B
JavaScript
import { camelize } from '@ly-js/utils';
function withInstall(options) {
;
options.install = (app) => {
const { name } = options;
app.component(name, options);
app.component(camelize(`-${name}`), options);
};
return options;
}
function directiveWithInstall(name, options) {
;
options.install = (app) => {
app.directive(name, options);
};
return options;
}
export { directiveWithInstall, withInstall };