component.ts 316 B

12345678910
  1. import { parse } from "@/cool";
  2. import type { ClCascaderOption, ClListViewItem } from "../types";
  3. export function useListView(data: UTSJSONObject[]) {
  4. return data.map((e) => parse<ClListViewItem>(e)!);
  5. }
  6. export function useCascader(data: UTSJSONObject[]) {
  7. return data.map((e) => parse<ClCascaderOption>(e)!);
  8. }