mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
26 lines
557 B
JavaScript
26 lines
557 B
JavaScript
/**
|
|
* Create a component with common options
|
|
*/
|
|
import '../locale';
|
|
import i18n from '../mixins/i18n';
|
|
import install from './install';
|
|
import Icon from '../icon';
|
|
import Loading from '../loading';
|
|
import Cell from '../cell';
|
|
import CellGroup from '../cell-group';
|
|
|
|
export default function(sfc) {
|
|
sfc.name = 'van-' + sfc.name;
|
|
sfc.install = sfc.install || install;
|
|
sfc.mixins = sfc.mixins || [];
|
|
sfc.mixins.push(i18n);
|
|
sfc.components = Object.assign(sfc.components || {}, {
|
|
Icon,
|
|
Loading,
|
|
Cell,
|
|
CellGroup
|
|
});
|
|
|
|
return sfc;
|
|
};
|