chore: prettier source code

This commit is contained in:
chenjiahan
2020-04-02 15:36:02 +08:00
parent 340c56b3b5
commit 2fb5cca49a
93 changed files with 272 additions and 283 deletions
+1 -1
View File
@@ -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 = '';
+2 -2
View File
@@ -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)) {
+1 -1
View File
@@ -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);