fix: default category

This commit is contained in:
jialin
2025-01-03 20:51:22 +08:00
parent 2a4ebcaf9c
commit 1d66becff5
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import { createFromIconfontCN } from '@ant-design/icons';
// import './iconfont/iconfont.js';
const IconFont = createFromIconfontCN({
scriptUrl: '//at.alicdn.com/t/c/font_4613488_nlj2pbwi.js'
scriptUrl: '//at.alicdn.com/t/c/font_4613488_pz4284jx1rq.js'
});
export default IconFont;
+1
View File
@@ -81,6 +81,7 @@ const Catalog: React.FC = () => {
...openDeployModal,
show: false
});
setActiveId(-1);
};
const handleResize = useCallback(
@@ -82,7 +82,7 @@ const CatalogItem: React.FC<CatalogItemProps> = (props) => {
{_.map(data.licenses, (license: string, index: number) => {
return (
<span key={license} className="flex-center m-r-16">
<IconFont type="icon-justice" className="m-r-5"></IconFont>
<IconFont type="icon-justice1" className="m-r-5"></IconFont>
<span>{license}</span>
</span>
);
@@ -128,7 +128,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
selectSpecRef.current = spec;
return {
..._.omit(spec, ['name']),
categories: _.get(spec, 'categories.0', null)
categories: _.get(current, 'categories.0', null)
};
};
@@ -136,7 +136,7 @@ const AddModal: React.FC<AddModalProps> = (props) => {
selectSpecRef.current = data;
form.current?.setFieldsValue({
..._.omit(data, ['name']),
categories: _.get(data, 'categories.0', null)
categories: _.get(current, 'categories.0', null)
});
};