导入checker和图片预览

This commit is contained in:
pqcqaq 2024-10-16 14:49:14 +08:00
parent 64abfd5ecd
commit 6ab46415b4
4 changed files with 10 additions and 6 deletions

View File

@ -8,7 +8,7 @@ const checkers: Checker<EntityDict, 'essay', RuntimeCxt>[] = [
action: 'update',
type: 'row',
filter: {
iState: 'unpublished',
$or: [{ iState: 'unpublished' }, { iState: 'withdrawn' }],
},
},
// settop的时候只能是isTop为false的

View File

@ -1,9 +1,12 @@
import { EntityDict } from '@oak-app-domain';
import { Checker } from 'oak-domain/lib/types';
import { RuntimeCxt } from '../types/RuntimeCxt';
import essayCheckers from './essay';
const checkers = [
] as Checker<EntityDict, keyof EntityDict, RuntimeCxt>[];
const checkers = [...essayCheckers] as Checker<
EntityDict,
keyof EntityDict,
RuntimeCxt
>[];
export default checkers;

View File

@ -8,7 +8,7 @@ import {
} from 'oak-frontend-base';
import PageHeader from 'oak-frontend-base/es/components/pageHeader2';
import Styles from './web.pc.module.less';
import { Button, Tag } from 'antd';
import { Button, Image, Tag } from 'antd';
import Modal from 'antd/es/modal/Modal';
import EssayUpsert from '@project/components/console/essay/upsert';
@ -46,7 +46,7 @@ const EssayList = (
return (
<>
{row.cover ? (
<img
<Image
src={row.cover}
alt={row.title}
className={Styles.cover}

View File

@ -50,6 +50,7 @@ export const essayProjection: EntityDict['essay']['Selection']['data'] = {
name: 1,
},
iState: 1,
isTop: 1,
// 相关labels
essayLabels$essay: {
$entity: 'essayLabels',