[Improvement] optimize isDef (#1109)

This commit is contained in:
neverland
2018-05-19 18:43:44 +08:00
committed by GitHub
parent 249e2400a3
commit d15efd756e
9 changed files with 5 additions and 28 deletions

View File

@@ -4,6 +4,7 @@
import '../locale';
import bem from '../mixins/bem';
import i18n from '../mixins/i18n';
import { isDef } from './';
const install = function(Vue) {
Vue.component(this.name, this);
@@ -14,6 +15,8 @@ export default function(sfc) {
sfc.install = sfc.install || install;
sfc.mixins = sfc.mixins || [];
sfc.mixins.push(i18n, bem);
sfc.methods = sfc.methods || {};
sfc.methods.isDef = isDef;
return sfc;
};