列表综合筛选

This commit is contained in:
juguohong
2025-08-24 16:24:49 +08:00
parent e6124131e7
commit 8cfe0ab0b0
34 changed files with 620 additions and 1339 deletions

View File

@@ -1,34 +1,7 @@
import React, { useState, useEffect } from "react";
import styles from "./index.module.scss";
import BubbleItem from "./BubbleItem";
export interface BubbleOption {
id: string | number;
label: string;
value: string | number;
disabled?: boolean;
icon?: React.ReactNode;
description?: string;
}
export interface BubbleProps {
options: BubbleOption[];
value?: string | number | (string | number)[];
onChange?: (
name: string,
value: string | number | (string | number)[],
option: BubbleOption | BubbleOption[]
) => void;
multiple?: boolean;
layout?: "horizontal" | "vertical" | "grid";
columns?: number;
size?: "small" | "medium" | "large";
className?: string;
itemClassName?: string;
style?: React.CSSProperties;
disabled?: boolean;
name: string;
}
import {BubbleProps} from '../../../types/list/types'
const Bubble: React.FC<BubbleProps> = ({
options,
@@ -79,6 +52,7 @@ const Bubble: React.FC<BubbleProps> = ({
);
onChange(name, newSelectedValues, selectedOptions);
} else {
console.log('===111', name, option.value)
onChange(name, option.value, option);
}
}