diff --git a/bun.lockb b/bun.lockb index ed2483f..4bdf062 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/docs/components/demos/ArrayTablePro.tsx b/docs/components/demos/ArrayTablePro.tsx index 4ff43d3..d4b9e33 100644 --- a/docs/components/demos/ArrayTablePro.tsx +++ b/docs/components/demos/ArrayTablePro.tsx @@ -5,7 +5,7 @@ import { FormItem, Input, Submit, -} from "@formily/antd-v5"; +} from "@formily/antd"; import { createForm, onFieldValueChange, @@ -13,7 +13,7 @@ import { } from "@formily/core"; import { FormProvider, ISchema, createSchemaField } from "@formily/react"; import { Button, ConfigProvider, Divider, Space } from "antd"; -import "antd/dist/reset.css"; +import "antd/dist/antd.css"; // import "antd/dist/antd.css"; import zhCN from "antd/lib/locale/zh_CN"; import moment from "moment"; @@ -24,7 +24,7 @@ import { ArrayTablePro, useArrayCompPropsOf, useFormArrayProps, -} from "@proformily/antd-v5"; +} from "@proformily/antd"; import { useEffect } from "react"; const CustomeToolbar = () => { diff --git a/docs/components/demos/DictDemo.tsx b/docs/components/demos/DictDemo.tsx index 519e715..92b5741 100644 --- a/docs/components/demos/DictDemo.tsx +++ b/docs/components/demos/DictDemo.tsx @@ -7,10 +7,10 @@ import { Radio, Select, Space, -} from "@formily/antd-v5"; +} from "@formily/antd"; import { createForm } from "@formily/core"; import { FormProvider, createSchemaField } from "@formily/react"; -import { Dict, dict, dictEffects, registerDictLoader } from "@proformily/antd-v5"; +import { Dict, dict, dictEffects, registerDictLoader } from "@proformily/antd"; import React, { useMemo } from "react"; const loaders = { diff --git a/docs/components/demos/EditablePro.tsx b/docs/components/demos/EditablePro.tsx index 56fd019..c729f93 100644 --- a/docs/components/demos/EditablePro.tsx +++ b/docs/components/demos/EditablePro.tsx @@ -5,11 +5,11 @@ import { FormItem, FormLayout, Input, -} from "@formily/antd-v5"; +} from "@formily/antd"; import { createForm } from "@formily/core"; import { FormProvider, ISchema, createSchemaField } from "@formily/react"; import { ConfigProvider } from "antd"; -import "antd/dist/reset.css"; +import "antd/dist/antd.css"; // import "antd/dist/antd.css"; import zhCN from "antd/lib/locale/zh_CN"; import moment from "moment"; @@ -21,7 +21,7 @@ import { QueryForm, QueryList, QueryTable, -} from "@proformily/antd-v5"; +} from "@proformily/antd"; import { useMemo } from "react"; const form = createForm({}); diff --git a/docs/components/demos/EditableProWithArray.tsx b/docs/components/demos/EditableProWithArray.tsx index 9806462..e1de1e6 100644 --- a/docs/components/demos/EditableProWithArray.tsx +++ b/docs/components/demos/EditableProWithArray.tsx @@ -5,11 +5,11 @@ import { FormItem, FormLayout, Input, -} from "@formily/antd-v5"; +} from "@formily/antd"; import { createForm } from "@formily/core"; import { FormProvider, ISchema, createSchemaField } from "@formily/react"; import { ConfigProvider } from "antd"; -import "antd/dist/reset.css"; +import "antd/dist/antd.css"; // import "antd/dist/antd.css"; import zhCN from "antd/lib/locale/zh_CN"; import moment from "moment"; @@ -22,7 +22,7 @@ import { QueryList, QueryTable, useQueryListRef, -} from "@proformily/antd-v5"; +} from "@proformily/antd"; import { useMemo } from "react"; const log = (label: string, x: any) => { diff --git a/docs/components/demos/ImageView.tsx b/docs/components/demos/ImageView.tsx index 0e9d907..79631b0 100644 --- a/docs/components/demos/ImageView.tsx +++ b/docs/components/demos/ImageView.tsx @@ -1,4 +1,4 @@ -import { ImageView } from "@proformily/antd-v5"; +import { ImageView } from "@proformily/antd"; import { Divider } from "antd"; import React from "react"; diff --git a/docs/components/demos/Linkage.tsx b/docs/components/demos/Linkage.tsx new file mode 100644 index 0000000..85f9e40 --- /dev/null +++ b/docs/components/demos/Linkage.tsx @@ -0,0 +1,358 @@ +import { Linkage } from "@proformily/antd"; +import { Button, Divider, Space } from "antd"; +import list from "china-location/dist/location.json"; +import React, { useEffect, useState } from "react"; + +export interface OptionData { + label?: string; + value?: string | number; + isLeaf?: boolean; + children?: OptionData[]; + loading?: boolean; +} + +export const flat = ( + json: Record< + string, + { + name: string; + code: string; + children?: { + name: string; + code: string; + children?: { name: string; code: string }[]; + }[]; + cities: Record< + string, + { + name: string; + code: string; + children?: { + name: string; + code: string; + }[]; + districts: Record; + } + >; + } + >, +) => { + const flatten: { parent?: string; code: string; name: string }[] = []; + + const tree = Object.values(json).map((province) => { + flatten.push({ code: province.code, name: province.name }); + province.children = Object.values(province.cities).map((city) => { + // 拍平的结构要求 parentId 不能重复, 这个数据里面直辖市是一样的, 搞一下 + const cityCode = + city.code === province.code ? `${city.code}00` : city.code; + + flatten.push({ + code: cityCode, + name: city.name, + parent: province.code, + }); + city.code = cityCode; + city.children = Object.entries(city.districts).map(([code, name]) => { + const distCode = + code === cityCode || code === province.code ? `${code}0000` : code; + flatten.push({ code: distCode, name, parent: cityCode }); + return { code, name } as any; + }); + return city; + }); + return province; + }); + return { flatten, tree }; +}; + +const buildTree = (parent: ReturnType["tree"]) => { + const tree = parent.reduce((root, item) => { + // item.children = + const node: OptionData = { + label: item.name, + value: item.code, + isLeaf: !(Array.isArray(item.children) && item.children.length > 0), + }; + if (!node.isLeaf) { + node.children = buildTree(item.children as any); + } + root.push(node); + return root; + }, [] as OptionData[]); + return tree; +}; + +const fake = (): Promise => { + return new Promise((resolve) => { + setTimeout(() => { + resolve(list); + }, 500); + }); +}; + +export const loadAll = () => { + return fake() + .then((origin) => flat(origin)) + .then(({ tree }) => buildTree(tree)); +}; +export const getById = (parent?: React.Key) => { + return fake() + .then((origin) => flat(origin)) + .then(({ flatten }) => { + return flatten.filter((x) => x.parent === parent); + }); +}; +export const loadData = (options: OptionData[]): Promise => { + const keys = [undefined, ...options.map((x) => x.value)]; + const last = options[options.length - 1]; + return getById(last?.value).then((opts) => + opts.map((item) => { + return { + value: item.code, + label: item.name, + // 需要给出叶子条件, 这里我们是省市区3级, 所以keys长度是3的时候就到最后一级别了 + isLeaf: keys.length === 3, + }; + }), + ); +}; + +export const LinkageDemo1 = () => { + const [value, setValue] = useState([]); + const [mul, setMul] = useState(false); + const [all, setAll] = useState(false); + const [labelInValue, setLabelInValue] = useState(false); + const [forceUpdateKey, setForceUpdateKey] = useState(1); + + useEffect(() => { + setValue([]); + setForceUpdateKey((x) => x + 1); + }, [mul, labelInValue, all]); + const onChange = (v: any) => { + console.log("🚀 ~ onChange ~ v:", v); + setValue(v); + }; + useEffect(() => { + console.log("🚀 ~ Linkage ~ value:", value); + }, [value]); + return ( +
+ + + + + + + + +
+ +
+
+ ); +}; +export const LinkageDemo2 = () => { + const [value, setValue] = useState(["110000", "11000000", "110105"]); + const [mValue, setMValue] = useState([ + ["110000", "11000000", "110105"], + ["410000", "410600", "410621"], + ]); + const [mul, setMul] = useState(false); + const [forceUpdateKey, setForceUpdateKey] = useState(1); + + useEffect(() => { + setForceUpdateKey((x) => x + 1); + }, [mul]); + const onChange = (v: any) => { + console.log("🚀 ~ onChange ~ v:", v); + if (mul) { + setMValue(v); + } else { + setValue(v); + } + }; + + useEffect(() => { + console.log("🚀 ~ Linkage ~ value:", value); + }, [value]); + return ( +
+ + + + +
+ +
+
+ ); +}; + +export const LinkageDemo3 = () => { + const [value, setValue] = useState([ + { + label: "北京市", + value: "110000", + }, + { + label: "北京市", + value: "11000000", + }, + { + label: "朝阳区", + value: "110105", + }, + ]); + const [mValue, setMValue] = useState([ + [ + { + label: "北京市", + value: "110000", + }, + { + label: "北京市", + value: "11000000", + }, + { + label: "朝阳区", + value: "110105", + }, + ], + [ + { + label: "河南省", + value: "410000", + }, + { + label: "鹤壁市", + value: "410600", + }, + { + label: "浚县", + value: "410621", + }, + ], + ]); + const [mul, setMul] = useState(false); + const [forceUpdateKey, setForceUpdateKey] = useState(1); + + useEffect(() => { + setForceUpdateKey((x) => x + 1); + }, [mul]); + const onChange = (v: any) => { + console.log("🚀 ~ onChange ~ v:", v); + if (mul) { + setMValue(v); + } else { + setValue(v); + } + }; + + useEffect(() => { + console.log("🚀 ~ Linkage ~ value:", value); + }, [value]); + return ( +
+ + + + +
+ +
+
+ ); +}; +export default () => { + return ( +
+ 基本属性 + + Lazy Load 反显 + + Lazy Load & labelInValue 反显 + +
+ ); +}; diff --git a/docs/components/demos/QueryList.tsx b/docs/components/demos/QueryList.tsx index 2b06941..59693a5 100644 --- a/docs/components/demos/QueryList.tsx +++ b/docs/components/demos/QueryList.tsx @@ -9,18 +9,18 @@ import { Input, Select, Submit, -} from "@formily/antd-v5"; +} from "@formily/antd"; import { createForm } from "@formily/core"; import { FormProvider, ISchema, createSchemaField } from "@formily/react"; import { ConfigProvider, Divider } from "antd"; -import "antd/dist/reset.css"; +import "antd/dist/antd.css"; // import "antd/dist/antd.css"; import zhCN from "antd/lib/locale/zh_CN"; import moment from "moment"; import "moment/locale/zh-cn"; moment.locale("zh-cn"); -import { QueryForm, QueryList, QueryTable } from "@proformily/antd-v5"; +import { QueryForm, QueryList, QueryTable } from "@proformily/antd"; const log = (label: string, x: any) => { console.log("LABEL:", label); diff --git a/docs/components/demos/Suggestion.tsx b/docs/components/demos/Suggestion.tsx index 33df89a..dd69d61 100644 --- a/docs/components/demos/Suggestion.tsx +++ b/docs/components/demos/Suggestion.tsx @@ -1,7 +1,7 @@ -import { FormGrid, FormItem, FormLayout } from "@formily/antd-v5"; +import { FormGrid, FormItem, FormLayout } from "@formily/antd"; import { createForm } from "@formily/core"; import { FormProvider, createSchemaField } from "@formily/react"; -import { Suggestion } from "@proformily/antd-v5"; +import { Suggestion } from "@proformily/antd"; import jsonp from "fetch-jsonp"; import qs from "qs"; import React, { useMemo } from "react"; diff --git a/docs/components/index.md b/docs/components/index.md deleted file mode 100644 index 41fc3a5..0000000 --- a/docs/components/index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -overview: true ---- diff --git a/docs/components/index.tsx b/docs/components/index.tsx new file mode 100644 index 0000000..41ac4c2 --- /dev/null +++ b/docs/components/index.tsx @@ -0,0 +1,208 @@ +const prefix = window.location.pathname.replace(/\.html$/, ""); +import { Card, Col, Divider, Row, Space, Tag, Typography } from "antd"; + +import { useState } from "react"; + +const groups = [ + { + title: "专业级组件", + prefix: `${prefix}/pro`, + children: [ + { + title: "QueryList", + subtitle: "查询列表", + cover: + "https://gw.alipayobjects.com/zos/antfincdn/AwU0Cv%26Ju/bianzu%2525208.svg", + link: "/query-list", + }, + { + title: "ArrayTablePro", + subtitle: "专业Table", + cover: + "https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*3yz3QqMlShYAAAAAAAAAAAAADrJ8AQ/original", + link: "/array-table-pro", + }, + { + title: "EditablePro", + subtitle: "专业对象编辑器", + cover: + "https://gw.alipayobjects.com/zos/antfincdn/mStei5BFC/bianzu%2525207.svg", + link: "/editable-pro", + }, + ], + }, + { + title: "增强型组件", + prefix: `${prefix}/plus`, + children: [ + { + title: "Dict", + subtitle: "远程词典", + cover: + "https://mdn.alipayobjects.com/huamei_7uahnr/afts/img/A*I5a2Tpqs3y0AAAAAAAAAAAAADrJ8AQ/original", + link: "/dict", + }, + { + title: "Suggestion", + subtitle: "搜索建议", + cover: + "https://gw.alipayobjects.com/zos/alicdn/qtJm4yt45/AutoComplete.svg", + link: "/suggestion", + }, + { + title: "Linkage", + subtitle: "级联选择", + cover: "https://gw.alipayobjects.com/zos/alicdn/UdS8y8xyZ/Cascader.svg", + link: "/linkage", + }, + ], + }, + { + title: "优雅阅读态组件", + prefix: `${prefix}/pretty`, + children: [ + { + title: "ImageView", + subtitle: "图片查看", + cover: + "https://gw.alipayobjects.com/zos/antfincdn/D1dXz9PZqa/image.svg", + link: "/image-view", + }, + ], + }, +]; + +const style = { + components_overview: { + padding: "0", + }, + components_overview_group_title: { + marginBottom: "24px !important", + }, + components_overview_a_hover: { + textDecoration: "none", + }, + components_overview_title: { + overflow: "hidden", + color: "black", + textOverflow: "ellipsis", + }, + components_overview_img: { + display: "flex", + alignItems: "center", + justifyContent: "center", + height: "152px", + }, + components_overview_card: { + cursor: "pointer", + transition: "all 0.5s", + }, + components_overview_card_hover: { + boxShadow: + "0 6px 16px -8px rgba(0,0,0,0.08), 0 9px 28px 0 rgba(0,0,0,0.05), 0 12px 48px 16px rgba(0,0,0,0.03)", + }, +}; + +const { Title } = Typography; + +export const Overview = (props: { + groups: { + title: string; + prefix: string; + children: { + filename: string; + title: string; + subtitle: string; + cover: string; + link: string; + tag: string; + }[]; + }[]; +}) => { + const { groups } = props; + const [hover, setHover] = useState({ overview: false, card: "" }); + return ( +
+ {groups.map((group, gidx) => { + const components = group.children; + return components.length ? ( +
+ {gidx === 0 ? null : } + + <Space align="center"> + {group.title} + <Tag style={{ display: "block" }}>{components.length}</Tag> + </Space> + + + {components.map((component, idx) => { + const uri = `${`${group.prefix}${component.link}`.replace( + "//", + "/", + )}.html`; + + return ( + + + { + setHover((x) => ({ ...x, card: `${gidx}${idx}` })); + }} + onMouseLeave={() => { + setHover((x) => ({ ...x, card: "" })); + }} + size="small" + className="components-overview-card" + title={ +
+ {component.title} {component.subtitle} +
+ } + > +
+ {component.title} +
+
+
+ + ); + })} +
+
+ ) : null; + })} +
+ ); +}; + +export default () => { + return ; +}; diff --git a/docs/components/plus/linkage.mdx b/docs/components/plus/linkage.mdx new file mode 100644 index 0000000..d267bee --- /dev/null +++ b/docs/components/plus/linkage.mdx @@ -0,0 +1,6 @@ +# Linkage + +## 高级级联选择 + + + diff --git a/package.json b/package.json index 3c39ed6..6201a7b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@proformily/antd-v5", + "name": "@proformily/antd", "version": "1.0.0", "private": true, "scripts": { @@ -22,8 +22,8 @@ "react": "^18.2.0", "react-dom": "^18.2.0", "react-resizable": "^3.0.5", - "@formily/antd-v5": "^1.*.*", - "antd": "^5.*.*" + "@formily/antd": "^2.*.*", + "antd": "^4.*.*" }, "devDependencies": { "@biomejs/biome": "^1.5.0", @@ -34,6 +34,7 @@ "@types/react": "^18.2.47", "@types/react-dom": "^18.2.18", "@types/react-resizable": "^3.0.7", + "china-location": "^2.1.0", "fetch-jsonp": "^1.3.0", "qs": "^6.11.2", "rimraf": "^5.0.5", diff --git a/rspress.config.ts b/rspress.config.ts index 773d5ac..922f08d 100644 --- a/rspress.config.ts +++ b/rspress.config.ts @@ -5,9 +5,9 @@ import RsBuildConfig from "./rsbuild.config"; import { pluginFixCss } from "./scripts/fixcss"; export default defineConfig({ - base: "/pro.formily/antd-v5/", + base: "/pro.formily/antd/", root: path.join(__dirname, "docs"), - outDir: "./doc_build/antd-v5", + outDir: "./doc_build/antd", title: "ProFormily", description: "Pro Formily, 启动!", icon: "/rspress-icon.png", diff --git a/src/index.ts b/src/index.ts index a9ebb70..669a2b2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,3 +8,4 @@ export * from "./long-text"; export * from "./suggestion"; export * from "./editable-pro"; export * from "./shared"; +export * from './linkage' diff --git a/src/linkage/index.tsx b/src/linkage/index.tsx new file mode 100644 index 0000000..64cc875 --- /dev/null +++ b/src/linkage/index.tsx @@ -0,0 +1,218 @@ +import { observer } from "@formily/react"; +import { model } from "@formily/reactive"; +import React, { useEffect, useMemo, useRef } from "react"; +import { Cascader, CascaderProps } from "../adaptor"; + +export interface LinkageOption { + label?: string; + value?: Value; + isLeaf?: boolean; + children?: LinkageOption[]; + disabled?: boolean; + loading?: boolean; +} + +const fullWithStyle = { + width: "100%", +}; + +type ValueType = string | number; +type LabelValueType = { label: string; value: ValueType }; + +export type LinkageValueType = LabelValueType[] | ValueType[]; + +const display: CascaderProps["displayRender"] = (label, options) => { + return label.join("/"); +}; + +const mapProps = (props: React.ComponentProps) => { + // type ChangeFnParams = Parameters['onChange']>; + const onChange = (values: any, options: any) => { + let next = values; + if (props.labelInValue) { + next = props.multiple + ? options.map((arr: LabelValueType[]) => + arr.map((item) => { + return { + label: item.label, + value: item.value, + }; + }), + ) + : options.map((item: LabelValueType) => { + return { + label: item.label, + value: item.value, + }; + }); + } + props.onChange?.(next); + }; + + const getValue = (val: any): ValueType[] => { + return Array.isArray(val) + ? val.map((item) => { + // multiple mode + if (Array.isArray(item)) { + return getValue(item); + } else if (item.label) { + // labelInValue + return item.value; + } else { + return item; + } + }) + : []; + }; + return { onChange, value: getValue(props.value) }; +}; + +const fill = < + Option extends LinkageOption = LinkageOption, +>( + $options: Option[], + loader: (opts: Option[]) => Promise, + cache: Record, + values?: ValueType[], +) => { + if (!Array.isArray(values) || values.length === 0) return; + let should = false; + // 反向排列value值 [河南省->鹤壁市->浚县] => [浚县->鹤壁市->河南省] + const asOptions = [] as Option[]; + values.reduce((parent, v) => { + // biome-ignore lint/suspicious/noDoubleEquals: + const has = parent ? parent.find((x) => x.value == v) : false; + if (!has) { + should = true; + asOptions.unshift({ value: v } as Option); + return []; + } else { + asOptions.unshift({ value: v } as Option); + return has.children as Option[]; + } + }, $options); + + return should + ? Promise.all( + asOptions.map((optLike) => { + return ( + cache[optLike.value!] ?? + loader([optLike]).then((list) => { + // cache + cache[optLike.value!] = { + key: optLike.value!, + list: list, + }; + return cache[optLike.value!]; + }) + ); + }), + ).then((childList) => { + // 在这里返回来 [浚县->鹤壁市->河南省] => [河南省->鹤壁市->浚县] + return childList.reduceRight((parent, item) => { + // biome-ignore lint/suspicious/noDoubleEquals: + const me = parent.find((x) => x.value == item.key); + me!.children = item.list; + return me!.children! as Option[]; + }, $options); + }) + : Promise.resolve([]); +}; + +export const Linkage = observer( + < + TLabelInValue extends boolean, + TValueType = TLabelInValue extends true ? ValueType[] : LabelValueType[], + >( + props: Omit & { + value: TValueType; + onChange: (neo: TValueType) => void; + multiple?: boolean; + disabled?: boolean; + labelInValue?: TLabelInValue; + /** 懒加载, 与整棵树加载不能共存 */ + loadData?: ( + selectOptions: TLabelInValue[], + ) => Promise[]>; + /** loadData 是否返回整棵树加载, 与懒加载不能共存 */ + all?: boolean; + }, + ) => { + const { loadData, all, labelInValue, disabled, multiple, ...others } = + props; + + const state = useMemo(() => { + return model({ + loading: false, + options: [] as LinkageOption[], + }); + }, []); + const { onChange, value } = mapProps(props as any); + const loaderCache = useRef({}); + + useEffect(() => { + if (!loadData) return; + state.loading = true; + loadData([]) + .then((options) => { + state.options = options; + console.log("🚀 ~ .then ~ options:", options); + const values = value.map((x) => x); + state.loading = true; + return all + ? null + : Promise.all( + (multiple ? values : [values]).map((valueList) => { + return fill( + state.options, + loadData as any, + loaderCache.current, + valueList as any, + ); + }), + ); + }) + .finally(() => { + state.loading = false; + }); + }, [loadData, state]); + + const _loadData = + all || !loadData + ? undefined + : (options: LinkageOption[]) => { + const last = options[options.length - 1]; + if (last.children) return; + last.loading = true; + // 触发组件更新啦 state.loading -> [...state.options] + state.loading = true; + return loadData(options as any) + .then((children) => { + if (Array.isArray(children) && children.length > 0) { + last.children = children; + } else { + last.isLeaf = true; + } + }) + .finally(() => { + last.loading = false; + // 触发组件更新啦 state.loading -> [...state.options] + state.loading = false; + }); + }; + return ( + + ); + }, +); diff --git a/tsconfig.json b/tsconfig.json index 386f899..986efb2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,7 @@ "declaration": true, "moduleResolution": "node", "paths": { - "@proformily/antd-v5": ["src"] + "@proformily/antd": ["src"] } }, "include": [ diff --git a/ui/antd-v5/index.ts b/ui/antd-v5/index.ts index db9e7d6..27aee8c 100644 --- a/ui/antd-v5/index.ts +++ b/ui/antd-v5/index.ts @@ -2,6 +2,10 @@ export { ColumnHeightOutlined, SettingOutlined, SyncOutlined, + CopyOutlined, + DeleteOutlined, + PlusOutlined, + ToTopOutlined, } from "@ant-design/icons"; export { Alert, @@ -13,6 +17,7 @@ export { Table, Button, ConfigProvider, + Cascader, Popover, Popconfirm, Row, @@ -31,4 +36,5 @@ export type { BadgeProps, TablePaginationConfig, TableProps, + CascaderProps, } from "antd"; diff --git a/ui/antd/index.ts b/ui/antd/index.ts index fee53be..888a3bb 100644 --- a/ui/antd/index.ts +++ b/ui/antd/index.ts @@ -1,10 +1,15 @@ export { - SyncOutlined, ColumnHeightOutlined, SettingOutlined, + SyncOutlined, + CopyOutlined, + DeleteOutlined, + PlusOutlined, + ToTopOutlined, } from "@ant-design/icons"; export { Alert, + Cascader, Divider, Badge, Select, @@ -26,6 +31,7 @@ export { import "antd/lib/alert/style/index"; import "antd/lib/badge/style/index"; import "antd/lib/button/style/index"; +import "antd/lib/cascader/style/index"; import "antd/lib/divider/style/index"; import "antd/lib/drawer/style/index"; import "antd/lib/image/style/index"; @@ -49,4 +55,5 @@ export type { BadgeProps, TablePaginationConfig, TableProps, + CascaderProps, } from "antd"; diff --git a/ui/overview/overview.less b/ui/overview/overview.less deleted file mode 100644 index d3e2800..0000000 --- a/ui/overview/overview.less +++ /dev/null @@ -1,52 +0,0 @@ - -.components-overview { - padding: 0; - - &-group-title { - margin-bottom: 24px !important; - } - - a:hover { - text-decoration: none; - } - - &-title { - overflow: hidden; - color: black; - text-overflow: ellipsis; - } - - &-img { - display: flex; - align-items: center; - justify-content: center; - height: 152px; - } - - &-card { - cursor: pointer; - transition: all 0.5s; - - &:hover { - box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), - 0 12px 48px 16px rgba(0, 0, 0, 0.03); - } - } -} - -.components-overview-search.ant-input-affix-wrapper { - width: 100%; - padding: 0; - font-size: 20px; - border: 0; - box-shadow: none; - - input { - color: rgba(0, 0, 0, 0.85); - font-size: 20px; - } - - .anticon { - color: #bbb; - } -}