chore: classNames es
							parent
							
								
									87aa5ecbd8
								
							
						
					
					
						commit
						7cec8614b0
					
				|  | @ -1,9 +1,27 @@ | |||
| import { isArray, isString, isObject } from './util'; | ||||
| function classNames() { | ||||
|   let classes = []; | ||||
|   for (let i = 0; i < arguments.length; i++) { | ||||
|     const value = arguments[i]; | ||||
|     if (!value) continue; | ||||
| 
 | ||||
| export type ClassArray = ClassValue[]; | ||||
| 
 | ||||
| export interface ClassDictionary { | ||||
|   [id: string]: any; | ||||
| } | ||||
| 
 | ||||
| export type ClassValue = | ||||
|   | string | ||||
|   | number | ||||
|   | ClassDictionary | ||||
|   | ClassArray | ||||
|   | undefined | ||||
|   | null | ||||
|   | boolean; | ||||
| 
 | ||||
| function classNames(...args: ClassValue[]): string { | ||||
|   const classes = []; | ||||
|   for (let i = 0; i < args.length; i++) { | ||||
|     const value = args[i]; | ||||
|     if (!value) { | ||||
|       continue; | ||||
|     } | ||||
|     if (isString(value)) { | ||||
|       classes.push(value); | ||||
|     } else if (isArray(value)) { | ||||
|  | @ -1,21 +1,5 @@ | |||
| <<<<<<< HEAD:components/_util/props-util.ts | ||||
| import isPlainObject from 'lodash/isPlainObject'; | ||||
| import classNames from 'classnames'; | ||||
| import { | ||||
|   isVNode, | ||||
|   Fragment, | ||||
|   Comment, | ||||
|   Text, | ||||
|   h, | ||||
|   VNode, | ||||
|   ComponentPublicInstance, | ||||
|   PropOptions, | ||||
| } from 'vue'; | ||||
| ======= | ||||
| import { isVNode, Fragment, Comment, Text, h, VNode, ComponentPublicInstance } from 'vue'; | ||||
| import isPlainObject from 'lodash-es/isPlainObject'; | ||||
| import classNames from './classNames'; | ||||
| import { isVNode, Fragment, Comment, Text, h } from 'vue'; | ||||
| >>>>>>> @{-1}:components/_util/props-util.js | ||||
| import { camelize, hyphenate, isOn, resolvePropValue } from './util'; | ||||
| import isValid from './isValid'; | ||||
| // function getType(fn) {
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Amour1688
						Amour1688