Skip to content

Commit

Permalink
refactor: 💡 linkage -> cascader-plus, dict -> pro-enum
Browse files Browse the repository at this point in the history
  • Loading branch information
charlzyx committed Feb 21, 2024
1 parent a83a636 commit 26c1890
Show file tree
Hide file tree
Showing 21 changed files with 842 additions and 601 deletions.
3 changes: 2 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"noExplicitAny": "off"
},
"complexity": {
"noForEach": "off"
"noForEach": "off",
"noStaticOnlyClass": "off"
},
"a11y": {
"useKeyWithClickEvents": "off",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Button, Divider, Space } from "antd";
import { Linkage } from "@pro.formily/antd";
import list from "china-location/dist/location.json";
import { CascaderPlus } from "@pro.formily/antd";
import React, { useEffect, useState } from "react";
import localtionList from "china-location/dist/location.json";

export interface OptionData {
label?: string;
Expand Down Expand Up @@ -82,10 +82,10 @@ const buildTree = (parent: ReturnType<typeof flat>["tree"]) => {
return tree;
};

const fake = (): Promise<typeof list> => {
const fake = (): Promise<typeof localtionList> => {
return new Promise((resolve) => {
setTimeout(() => {
resolve(list);
resolve(localtionList);
}, 500);
});
};
Expand Down Expand Up @@ -182,15 +182,15 @@ export const LinkageDemo1 = () => {
</Button>
</Space>
<div>
<Linkage
<CascaderPlus
key={forceUpdateKey}
value={value}
onChange={onChange}
all={all}
loadData={all ? (loadAll as any) : loadData}
multiple={mul}
labelInValue={labelInValue}
></Linkage>
></CascaderPlus>
</div>
</div>
);
Expand Down Expand Up @@ -238,13 +238,13 @@ export const LinkageDemo2 = () => {
</Button>
</Space>
<div>
<Linkage
<CascaderPlus
key={forceUpdateKey}
value={mul ? mValue : value}
multiple={mul}
onChange={onChange}
loadData={loadData as any}
></Linkage>
></CascaderPlus>
</div>
</div>
);
Expand Down Expand Up @@ -332,14 +332,14 @@ export const LinkageDemo3 = () => {
</Button>
</Space>
<div>
<Linkage
<CascaderPlus
key={forceUpdateKey}
value={mul ? mValue : value}
multiple={mul}
labelInValue
onChange={onChange}
loadData={loadData as any}
></Linkage>
></CascaderPlus>
</div>
</div>
);
Expand Down
254 changes: 0 additions & 254 deletions docs/components/demos/DictDemo.tsx

This file was deleted.

Loading

0 comments on commit 26c1890

Please sign in to comment.