mirror of
https://github.com/rustfs/console.git
synced 2026-08-31 01:37:52 +08:00
c019276fcb
Signed-off-by: junxiang Mu <1948535941@qq.com>
13 lines
437 B
TypeScript
13 lines
437 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;
|
|
}
|