chore: message link

This commit is contained in:
jialin
2025-01-15 12:42:09 +08:00
parent 9553aa944a
commit 5bfca0f86f
5 changed files with 51 additions and 14 deletions
@@ -304,13 +304,29 @@ const AddModal: React.FC<AddModalProps> = (props) => {
return groupList[item.value];
});
const defaultSpec =
_.find(res.items, (item: CatalogSpec) => {
return getDefaultQuant({
category: _.get(current, 'categories.0', ''),
quantOption: item.quantization
});
}) || _.get(res.items, `0`, {});
const list72B = _.filter(res.items, (item: CatalogSpec) => {
return item.size === 72;
});
let defaultSpec: any = {};
if (list72B.length) {
defaultSpec =
_.find(list72B, (item: CatalogSpec) => {
return getDefaultQuant({
category: _.get(current, 'categories.0', ''),
quantOption: item.quantization
});
}) || _.get(list72B, `0`, {});
} else {
defaultSpec =
_.find(res.items, (item: CatalogSpec) => {
return getDefaultQuant({
category: _.get(current, 'categories.0', ''),
quantOption: item.quantization
});
}) || _.get(res.items, `0`, {});
}
selectSpecRef.current = defaultSpec;
setSourceList(sources);