Commit 8c5b330cc8739659ab52e55191bafbf68ef27a8a

Authored by xingyu
1 parent 7df72c4d

fix: todo

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 = () =&gt; {
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 &#39;@/components/Form&#39;
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
... ... @@ -39,7 +39,7 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({
39 39 title: '公告内容',
40 40 field: 'content',
41 41 table: {
42   - type: 'html' // TODO 芋艿:详情展示,会是 html 的原始内容。要不改成直接使用富文本展示,设置个 readonly?
  42 + type: 'html'
43 43 },
44 44 form: {
45 45 component: 'Editor',
... ...