Procházet zdrojové kódy

fix: 数据源增加拖拽的样式

outaozhen před 3 roky
rodič
revize
843993986a

+ 12 - 0
src/pages/Schema/Option/index.less

@@ -0,0 +1,12 @@
+.row-dragging {
+  background: #fafafa;
+  border: 1px solid #ccc;
+}
+
+.row-dragging td {
+  padding: 16px;
+}
+
+.row-dragging .drag-visible {
+  visibility: visible;
+}

+ 2 - 1
src/pages/Schema/Option/index.tsx

@@ -10,6 +10,7 @@ import type { ProFormInstance } from '@ant-design/pro-form'
 import { addDataSourceItem, queryDataSource, updateDataSourceItem } from '@/services/api/schema'
 import { MenuOutlined, PlusOutlined } from '@ant-design/icons'
 import classNames from 'classnames'
+import './index.less'
 import { ModalForm, ProFormRadio, ProFormText } from '@ant-design/pro-form'
 import ProTable from '@ant-design/pro-table'
 import { ModalType } from '@/utils/enum'
@@ -180,7 +181,7 @@ const Option = () => {
     }
   }, [state.activeID])
 
-  const DraggableBodyRow = ({ ...restProps }) => {
+  const DraggableBodyRow = ({ className, style, ...restProps }) => {
     if (state.menuDataItems?.length) {
       const index = state.menuDataItems?.findIndex(x => x.index === restProps['data-row-key'])
       return <SortableItem index={index} {...restProps} />