[improvement] support PascalCase component tag name (#2296)

This commit is contained in:
neverland
2018-12-15 16:59:01 +08:00
committed by GitHub
parent d7975a5270
commit eca1b6970e

View File

@@ -4,10 +4,12 @@
import '../locale';
import bem from '../mixins/bem';
import i18n from '../mixins/i18n';
import { isDef } from '.';
import { isDef, camelize } from '.';
function install(Vue) {
Vue.component(this.name, this);
const { name } = this;
Vue.component(name, this);
Vue.component((camelize(`-${name}`)), this);
}
function returnArray() {