|
@@ -2,8 +2,9 @@ import { getDishList, addDish, updataDish, deleteDish } from '@/services/dish';
|
2
|
2
|
import { queryTable } from '@/utils/request';
|
3
|
3
|
import { PageContainer, ProTable } from '@ant-design/pro-components';
|
4
|
4
|
import { useNavigate, Link } from 'react-router-dom';
|
5
|
|
-import { Button, message, Popconfirm } from 'antd';
|
|
5
|
+import { Button, message, Popconfirm, Popover } from 'antd';
|
6
|
6
|
import { useRef, useState } from 'react';
|
|
7
|
+import DishCotent from './components/DishCotent';
|
7
|
8
|
|
8
|
9
|
const DishList = (props) => {
|
9
|
10
|
console.log(props, '===');
|
|
@@ -34,7 +35,11 @@ const DishList = (props) => {
|
34
|
35
|
{
|
35
|
36
|
title: '菜肴名称',
|
36
|
37
|
dataIndex: 'name',
|
37
|
|
- render: (t, row) => <Link to={`/stock/dish/detail?id=${row.id}`}>{t}</Link>
|
|
38
|
+ render: (t, row) => (
|
|
39
|
+ <Popover placement="right" content={<DishCotent dish={row} />}>
|
|
40
|
+ <Link to={`/stock/dish/detail?id=${row.id}`}>{t}</Link>
|
|
41
|
+ </Popover>
|
|
42
|
+ )
|
38
|
43
|
},
|
39
|
44
|
|
40
|
45
|
{
|