icon-groups.js 763 B

12345678910111213141516171819
  1. import { aq as o } from "./index2.js";
  2. const i = [
  3. { value: "all", label: "全部", suffix: "" },
  4. { value: "outlined", label: "线框", suffix: "Outlined" },
  5. { value: "filled", label: "实底", suffix: "Filled" },
  6. { value: "twoTone", label: "双色", suffix: "TwoTone" }
  7. ], t = Object.keys(o).filter(
  8. (e) => i.some((l) => l.suffix && e.endsWith(l.suffix))
  9. ), a = i.reduce((e, l) => (e[l.value] = l.suffix ? t.filter((s) => s.endsWith(l.suffix)) : t, e), {}), u = (e) => a[e] || t, r = (e, l) => {
  10. const s = u(e), n = String(l || "").trim().toLowerCase();
  11. return n ? s.filter((f) => f.toLowerCase().includes(n)) : s;
  12. }, d = () => i.map((e) => ({
  13. value: e.value,
  14. label: window.$l ? window.$l(e.label) : e.label
  15. }));
  16. export {
  17. r as f,
  18. d as g
  19. };