导入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', action: 'update',
type: 'row', type: 'row',
filter: { filter: {
iState: 'unpublished', $or: [{ iState: 'unpublished' }, { iState: 'withdrawn' }],
}, },
}, },
// settop的时候只能是isTop为false的 // settop的时候只能是isTop为false的

View File

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

View File

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

View File

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