chore: prettier source code
This commit is contained in:
@@ -30,7 +30,7 @@ function gen(name: string, mods?: Mods): string {
|
||||
}
|
||||
|
||||
export function createBEM(name: string) {
|
||||
return function(el?: Mods, mods?: Mods): Mods {
|
||||
return function (el?: Mods, mods?: Mods): Mods {
|
||||
if (el && typeof el !== 'string') {
|
||||
mods = el;
|
||||
el = '';
|
||||
|
||||
@@ -43,7 +43,7 @@ export function unifySlots(context: RenderContext) {
|
||||
const scopedSlots = context.scopedSlots || context.data.scopedSlots || {};
|
||||
const slots = context.slots();
|
||||
|
||||
Object.keys(slots).forEach(key => {
|
||||
Object.keys(slots).forEach((key) => {
|
||||
if (!scopedSlots[key]) {
|
||||
scopedSlots[key] = () => slots[key];
|
||||
}
|
||||
@@ -66,7 +66,7 @@ function transformFunctionComponent(
|
||||
}
|
||||
|
||||
export function createComponent(name: string) {
|
||||
return function<Props = DefaultProps, Events = {}, Slots = {}>(
|
||||
return function <Props = DefaultProps, Events = {}, Slots = {}>(
|
||||
sfc: VantComponentOptions | FunctionComponent
|
||||
): TsxComponent<Props, Events, Slots> {
|
||||
if (isFunction(sfc)) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import locale from '../../locale';
|
||||
export function createI18N(name: string) {
|
||||
const prefix = camelize(name) + '.';
|
||||
|
||||
return function(path: string, ...args: any[]): string {
|
||||
return function (path: string, ...args: any[]): string {
|
||||
const messages = locale.messages();
|
||||
const message = get(messages, prefix + path) || get(messages, path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user