feat: 富文本编辑器
Some checks failed
coverage CI / build (push) Has been cancelled

This commit is contained in:
2025-09-24 15:47:28 +08:00
parent 12495b6d85
commit 82d043a414
8 changed files with 1160 additions and 35 deletions

View File

@@ -4,6 +4,7 @@ import type {
} from '@ant-design/pro-components';
import dayjs from 'dayjs';
import TagEditor from '@/components/TagEditor';
import TinyMCEEditor from '@/components/Tinymce';
export const baseTenantColumns: ProColumns<API.CategoryDO>[] = [
{
title: '类目名称',
@@ -86,7 +87,7 @@ export const formColumns = (data: {
dataIndex: 'description',
valueType: 'textarea',
renderFormItem: () => {
return 1;
return <TinyMCEEditor />;
},
},
{

View File

@@ -1,9 +1,5 @@
import { PlusOutlined } from '@ant-design/icons';
import {
type ActionType,
type ProColumns,
ProCoreActionType,
} from '@ant-design/pro-components';
import type { ActionType, ProColumns } from '@ant-design/pro-components';
import type { TabsProps } from 'antd';
import { Tabs } from 'antd';
import { useCallback, useRef, useState } from 'react';
@@ -97,6 +93,7 @@ const ProdCategory = () => {
<ConfigurableDrawerForm
ref={configurableDrawerRef}
title={formStatusType[type]}
// width="50vw"
columns={formColumns({ grade: Number(grade), type })}
onSubmit={handleSubmit}
/>