[improvement] optimize utils (#3104)

This commit is contained in:
neverland
2019-04-08 17:21:05 +08:00
committed by GitHub
parent 1a7daecdbc
commit d3054fd4b0
3 changed files with 20 additions and 11 deletions

View File

@@ -85,10 +85,8 @@ function defaultProps(props: any) {
function install(this: ComponentOptions<Vue>, Vue: VueConstructor) {
const { name } = this;
if (name) {
Vue.component(name, this);
Vue.component(camelize(`-${name}`), this);
}
Vue.component(name as string, this);
Vue.component(camelize(`-${name}`), this);
}
// unify slots & scopedSlots