feat: new page
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { EllipsisOutlined, PlusOutlined } from '@ant-design/icons';
|
||||
import type { ActionType, ProColumns } from '@ant-design/pro-components';
|
||||
import { useNavigate } from '@umijs/max';
|
||||
import type { MenuProps, TabsProps } from 'antd';
|
||||
import { Button, Dropdown, Space, Tabs } from 'antd';
|
||||
import { useCallback, useRef, useState } from 'react';
|
||||
@@ -25,6 +26,7 @@ const ProdList = () => {
|
||||
const [type, setType] = useState<'create' | 'update' | 'test'>('create');
|
||||
const [status, setStatus] = useState<number>();
|
||||
const detailRef = useRef<ConfigurableDrawerFormRef>(null);
|
||||
const navigator = useNavigate();
|
||||
// const editRef = useRef<ConfigurableDrawerFormRef>(null);
|
||||
const [id, setId] = useState<number>(0);
|
||||
const onChange = useCallback(
|
||||
@@ -89,6 +91,12 @@ const ProdList = () => {
|
||||
[id, type],
|
||||
);
|
||||
|
||||
const handleLink = (key: string, row: Prod) => {
|
||||
if (key === 'sku') {
|
||||
// navigator(`/prod/list/sku/${row.prodId}`);
|
||||
}
|
||||
console.log(key, row);
|
||||
};
|
||||
// const renderDetailFooter = () => {
|
||||
// if (type === "update") {
|
||||
// return (
|
||||
@@ -118,7 +126,11 @@ const ProdList = () => {
|
||||
},
|
||||
{
|
||||
key: 'sku',
|
||||
label: <Button type="link">SKU管理</Button>,
|
||||
label: (
|
||||
<Button type="link" onClick={() => handleLink('sku', row)}>
|
||||
SKU管理
|
||||
</Button>
|
||||
),
|
||||
},
|
||||
{
|
||||
key: 'rules-service',
|
||||
@@ -155,7 +167,9 @@ const ProdList = () => {
|
||||
<Button type="link" onClick={() => handleEdit(record)}>
|
||||
商品编辑
|
||||
</Button>
|
||||
<Button type="link">SKU管理</Button>
|
||||
<Button type="link" onClick={() => handleLink('sku', record)}>
|
||||
SKU管理
|
||||
</Button>
|
||||
</Space.Compact>
|
||||
<Space.Compact direction="vertical" block key="2">
|
||||
<Button type="link">服务规则</Button>
|
||||
|
||||
Reference in New Issue
Block a user