mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 11:17:41 +00:00
[improvement] support PascalCase component tag name (#2296)
This commit is contained in:
@@ -4,10 +4,12 @@
|
|||||||
import '../locale';
|
import '../locale';
|
||||||
import bem from '../mixins/bem';
|
import bem from '../mixins/bem';
|
||||||
import i18n from '../mixins/i18n';
|
import i18n from '../mixins/i18n';
|
||||||
import { isDef } from '.';
|
import { isDef, camelize } from '.';
|
||||||
|
|
||||||
function install(Vue) {
|
function install(Vue) {
|
||||||
Vue.component(this.name, this);
|
const { name } = this;
|
||||||
|
Vue.component(name, this);
|
||||||
|
Vue.component((camelize(`-${name}`)), this);
|
||||||
}
|
}
|
||||||
|
|
||||||
function returnArray() {
|
function returnArray() {
|
||||||
|
Reference in New Issue
Block a user