Commit 8c5b330cc8739659ab52e55191bafbf68ef27a8a
1 parent
7df72c4d
fix: todo
Showing
3 changed files
with
9 additions
and
3 deletions
yudao-ui-admin-vue3/src/components/Descriptions/src/Descriptions.vue
| ... | ... | @@ -19,6 +19,7 @@ const props = defineProps({ |
| 19 | 19 | title: propTypes.string.def(''), |
| 20 | 20 | message: propTypes.string.def(''), |
| 21 | 21 | collapse: propTypes.bool.def(true), |
| 22 | + columns: propTypes.number.def(1), | |
| 22 | 23 | schema: { |
| 23 | 24 | type: Array as PropType<DescriptionsSchema[]>, |
| 24 | 25 | default: () => [] |
| ... | ... | @@ -94,7 +95,7 @@ const toggleClick = () => { |
| 94 | 95 | <ElCollapseTransition> |
| 95 | 96 | <div v-show="show" :class="[`${prefixCls}-content`, 'p-10px']"> |
| 96 | 97 | <ElDescriptions |
| 97 | - :column="1" | |
| 98 | + :column="props.columns" | |
| 98 | 99 | border |
| 99 | 100 | :direction="mobile ? 'vertical' : 'horizontal'" |
| 100 | 101 | v-bind="getBindValue" | ... | ... |
yudao-ui-admin-vue3/src/views/system/notice/index.vue
| ... | ... | @@ -51,7 +51,11 @@ |
| 51 | 51 | v-if="actionType === 'detail'" |
| 52 | 52 | :schema="allSchemas.detailSchema" |
| 53 | 53 | :data="detailRef" |
| 54 | - /> | |
| 54 | + > | |
| 55 | + <template #content="{ row }"> | |
| 56 | + <Editor :model-value="row.content" read-only="true" /> | |
| 57 | + </template> | |
| 58 | + </Descriptions> | |
| 55 | 59 | <template #footer> |
| 56 | 60 | <!-- 按钮:保存 --> |
| 57 | 61 | <XButton |
| ... | ... | @@ -77,6 +81,7 @@ import { FormExpose } from '@/components/Form' |
| 77 | 81 | // 业务相关的 import |
| 78 | 82 | import * as NoticeApi from '@/api/system/notice' |
| 79 | 83 | import { rules, allSchemas } from './notice.data' |
| 84 | +import { Editor } from '@/components/Editor' | |
| 80 | 85 | |
| 81 | 86 | const { t } = useI18n() // 国际化 |
| 82 | 87 | const message = useMessage() // 消息弹窗 | ... | ... |
yudao-ui-admin-vue3/src/views/system/notice/notice.data.ts