mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
[Improvement] Sku: optimize DOM (#704)
This commit is contained in:
18
packages/utils/create-basic.js
Normal file
18
packages/utils/create-basic.js
Normal file
@@ -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;
|
||||
};
|
Reference in New Issue
Block a user