|
|
|
@ -359,12 +359,20 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject,
|
|
|
|
|
render: (__: string, record: any) => {
|
|
|
|
|
return (
|
|
|
|
|
<Space>
|
|
|
|
|
<Button type="link" onClick={() => postMessageToParent("EDIT", record)}>
|
|
|
|
|
{i18n?.["编辑"]}
|
|
|
|
|
</Button>
|
|
|
|
|
<Button type="link" onClick={() => postMessageToParent("DEL", record)}>
|
|
|
|
|
{i18n?.["删除"]}
|
|
|
|
|
</Button>
|
|
|
|
|
{record?.opts.includes("admin") ? (
|
|
|
|
|
<Space>
|
|
|
|
|
<Button type="link" onClick={() => postMessageToParent("EDIT", record)}>
|
|
|
|
|
{i18n?.["编辑"]}
|
|
|
|
|
</Button>
|
|
|
|
|
<Button type="link" onClick={() => postMessageToParent("DEL", record)}>
|
|
|
|
|
{i18n?.["删除"]}
|
|
|
|
|
</Button>
|
|
|
|
|
</Space>
|
|
|
|
|
) : (
|
|
|
|
|
<Button type="link" onClick={() => postMessageToParent("VIEW", record)}>
|
|
|
|
|
{i18n?.["查看"]}
|
|
|
|
|
</Button>
|
|
|
|
|
)}
|
|
|
|
|
</Space>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|