import { useAjax } from "@/Hook/useAjax" import { getSysAdcreativeInfo } from "@/services/launchAdq/creative" import { EyeOutlined } from "@ant-design/icons" import { Popover, Spin } from "antd" import React, { useState } from "react" import AdcreativeCol from "../../launchManage/createAd/adcreativeCol" import style from '../targetingPopover/index.less' interface Props { id: number, name: string } /** * 表格查看创意基本信息 * @returns */ const AdcreativePopover: React.FC = (props) => { /*************************/ const { id, name } = props const [visible, setVisible] = useState(false) const getSysAdcreative = useAjax((params) => getSysAdcreativeInfo(params)) /*************************/ const handleVisibleChange = (newVisible: boolean) => { setVisible(newVisible) if (id && newVisible) { getSysAdcreative.run(id) } } return
{getSysAdcreative?.data && }
} trigger="click" placement="left" visible={visible} onVisibleChange={handleVisibleChange} > {/* 查看创意 */} {name || id}
} export default React.memo(AdcreativePopover)