feat(admin): 商品编辑页增加上一个/下一个导航
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -27,7 +27,7 @@ function QualityBadge({ score }: { score: number }) {
|
||||
export default function ProductList({
|
||||
onOpen,
|
||||
}: {
|
||||
onOpen: (id: string) => void;
|
||||
onOpen: (id: string, ids: string[]) => void;
|
||||
}) {
|
||||
const [q, setQ] = useState("");
|
||||
const [input, setInput] = useState("");
|
||||
@@ -165,7 +165,7 @@ export default function ProductList({
|
||||
onClose={() => setCreating(false)}
|
||||
onCreated={(id) => {
|
||||
setCreating(false);
|
||||
onOpen(id);
|
||||
onOpen(id, [id]);
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
@@ -271,7 +271,7 @@ export default function ProductList({
|
||||
rows.map((r) => (
|
||||
<tr
|
||||
key={r.id}
|
||||
onClick={() => onOpen(r.id)}
|
||||
onClick={() => onOpen(r.id, rows.map((x) => x.id))}
|
||||
className={`cursor-pointer hover:bg-emerald-50/50 ${
|
||||
selected.has(r.id) ? "bg-emerald-50/60" : ""
|
||||
}`}
|
||||
|
||||
Reference in New Issue
Block a user