improve styling

This commit is contained in:
chenos 2021-08-23 12:15:22 +08:00
parent 6f84f925aa
commit 52818bfeb4
2 changed files with 35 additions and 30 deletions

View File

@ -115,6 +115,7 @@ const KanbanColumn = (props) => {
const { field, schemas } = useKanban(); const { field, schemas } = useKanban();
const { items } = props; const { items } = props;
return ( return (
<div className={'nb-kanban-list'}>
<SortableContext <SortableContext
// id={option.value} // id={option.value}
items={items || []} items={items || []}
@ -142,6 +143,7 @@ const KanbanColumn = (props) => {
); );
})} })}
</SortableContext> </SortableContext>
</div>
); );
}; };
@ -414,7 +416,7 @@ Kanban.useCreateAction = () => {
const column = useContext(KanbanColumnContext); const column = useContext(KanbanColumnContext);
const groupField = props.groupField; const groupField = props.groupField;
const form = useForm(); const form = useForm();
const [,setVisible] = useContext(VisibleContext); const [, setVisible] = useContext(VisibleContext);
return { return {
async run() { async run() {
await resource.create({ await resource.create({
@ -432,7 +434,7 @@ Kanban.useUpdateAction = () => {
const { service, resource, props } = useKanban(); const { service, resource, props } = useKanban();
const ctx = useContext(KanbanCardContext); const ctx = useContext(KanbanCardContext);
const form = useForm(); const form = useForm();
const [,setVisible] = useContext(VisibleContext); const [, setVisible] = useContext(VisibleContext);
return { return {
async run() { async run() {
await resource.save(omit(form.values, ['sort']), { await resource.save(omit(form.values, ['sort']), {

View File

@ -14,8 +14,11 @@
background: #f9f9f9; background: #f9f9f9;
margin-right: 12px; margin-right: 12px;
padding: 12px; padding: 12px;
.nb-kanban-list {
height: 60vh; height: 60vh;
overflow: auto; overflow: auto;
margin-bottom: 12px;
}
} }
.nb-kanban-item { .nb-kanban-item {