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,6 +19,7 @@ const props = defineProps({
19 title: propTypes.string.def(''), 19 title: propTypes.string.def(''),
20 message: propTypes.string.def(''), 20 message: propTypes.string.def(''),
21 collapse: propTypes.bool.def(true), 21 collapse: propTypes.bool.def(true),
  22 + columns: propTypes.number.def(1),
22 schema: { 23 schema: {
23 type: Array as PropType<DescriptionsSchema[]>, 24 type: Array as PropType<DescriptionsSchema[]>,
24 default: () => [] 25 default: () => []
@@ -94,7 +95,7 @@ const toggleClick = () =&gt; { @@ -94,7 +95,7 @@ const toggleClick = () =&gt; {
94 <ElCollapseTransition> 95 <ElCollapseTransition>
95 <div v-show="show" :class="[`${prefixCls}-content`, 'p-10px']"> 96 <div v-show="show" :class="[`${prefixCls}-content`, 'p-10px']">
96 <ElDescriptions 97 <ElDescriptions
97 - :column="1" 98 + :column="props.columns"
98 border 99 border
99 :direction="mobile ? 'vertical' : 'horizontal'" 100 :direction="mobile ? 'vertical' : 'horizontal'"
100 v-bind="getBindValue" 101 v-bind="getBindValue"
yudao-ui-admin-vue3/src/views/system/notice/index.vue
@@ -51,7 +51,11 @@ @@ -51,7 +51,11 @@
51 v-if="actionType === 'detail'" 51 v-if="actionType === 'detail'"
52 :schema="allSchemas.detailSchema" 52 :schema="allSchemas.detailSchema"
53 :data="detailRef" 53 :data="detailRef"
54 - /> 54 + >
  55 + <template #content="{ row }">
  56 + <Editor :model-value="row.content" read-only="true" />
  57 + </template>
  58 + </Descriptions>
55 <template #footer> 59 <template #footer>
56 <!-- 按钮:保存 --> 60 <!-- 按钮:保存 -->
57 <XButton 61 <XButton
@@ -77,6 +81,7 @@ import { FormExpose } from &#39;@/components/Form&#39; @@ -77,6 +81,7 @@ import { FormExpose } from &#39;@/components/Form&#39;
77 // 业务相关的 import 81 // 业务相关的 import
78 import * as NoticeApi from '@/api/system/notice' 82 import * as NoticeApi from '@/api/system/notice'
79 import { rules, allSchemas } from './notice.data' 83 import { rules, allSchemas } from './notice.data'
  84 +import { Editor } from '@/components/Editor'
80 85
81 const { t } = useI18n() // 国际化 86 const { t } = useI18n() // 国际化
82 const message = useMessage() // 消息弹窗 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,7 +39,7 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({
39 title: '公告内容', 39 title: '公告内容',
40 field: 'content', 40 field: 'content',
41 table: { 41 table: {
42 - type: 'html' // TODO 芋艿:详情展示,会是 html 的原始内容。要不改成直接使用富文本展示,设置个 readonly? 42 + type: 'html'
43 }, 43 },
44 form: { 44 form: {
45 component: 'Editor', 45 component: 'Editor',