mirror of
https://github.com/rustfs/console.git
synced 2026-10-31 12:13:27 +08:00
- Auto-format all files to comply with Prettier rules - Fix code style issues in 545 files
13 lines
431 B
TypeScript
13 lines
431 B
TypeScript
import type { Updater } from '@tanstack/vue-table'
|
|
import { type ClassValue, clsx } from 'clsx'
|
|
import { twMerge } from 'tailwind-merge'
|
|
import type { Ref } from 'vue'
|
|
|
|
export function cn(...inputs: ClassValue[]) {
|
|
return twMerge(clsx(inputs))
|
|
}
|
|
|
|
export function valueUpdater<T extends Updater<any>>(updaterOrValue: T, ref: Ref) {
|
|
ref.value = typeof updaterOrValue === 'function' ? updaterOrValue(ref.value) : updaterOrValue
|
|
}
|