[Improvement] Sku: optimize DOM (#704)

This commit is contained in:
neverland
2018-03-16 20:27:59 +08:00
committed by GitHub
parent ffd72e5442
commit 4c195fd664
26 changed files with 228 additions and 265 deletions

View File

@@ -1,25 +1,18 @@
/**
* Create a component with common options
*/
import '../locale';
import i18n from '../mixins/i18n';
import install from './install';
import createBasic from './create-basic';
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;
return createBasic(sfc);
};