[Improvement] Sku: optimize DOM (#704)
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Create a basic component with common options
|
||||
*/
|
||||
import '../locale';
|
||||
import i18n from '../mixins/i18n';
|
||||
|
||||
const install = function(Vue) {
|
||||
Vue.component(this.name, this);
|
||||
};
|
||||
|
||||
export default function(sfc) {
|
||||
sfc.name = 'van-' + sfc.name;
|
||||
sfc.install = sfc.install || install;
|
||||
sfc.mixins = sfc.mixins || [];
|
||||
sfc.mixins.push(i18n);
|
||||
|
||||
return sfc;
|
||||
};
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
/**
|
||||
* Install function to register a component
|
||||
*/
|
||||
export default function(Vue) {
|
||||
Vue.component(this.name, this);
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
/**
|
||||
* VNode helper
|
||||
*/
|
||||
export default {
|
||||
name: 'van-node',
|
||||
functional: true,
|
||||
|
||||
Reference in New Issue
Block a user