Commit a931c8a3a29e89606f8814585dc5b20b7d24f24c

Authored by xingyu4j
1 parent 392b46c3

feat: notice editor readonly

yudao-ui-admin-vue3/src/components/Editor/src/Editor.vue
... ... @@ -23,6 +23,7 @@ const props = defineProps({
23 23 type: Object as PropType<IEditorConfig>,
24 24 default: () => undefined
25 25 },
  26 + readonly: propTypes.bool.def(false),
26 27 modelValue: propTypes.string.def('')
27 28 })
28 29  
... ... @@ -61,7 +62,7 @@ const editorConfig = computed((): IEditorConfig =&gt; {
61 62 return Object.assign(
62 63 {
63 64 placeholder: '请输入内容...',
64   - readOnly: false,
  65 + readOnly: props.readonly,
65 66 customAlert: (s: string, t: string) => {
66 67 switch (t) {
67 68 case 'success':
... ...
yudao-ui-admin-vue3/src/views/system/notice/index.vue
... ... @@ -53,7 +53,7 @@
53 53 :data="detailData"
54 54 >
55 55 <template #content="{ row }">
56   - <Editor :model-value="row.content" read-only="true" />
  56 + <Editor :model-value="row.content" :readonly="true" />
57 57 </template>
58 58 </Descriptions>
59 59 <template #footer>
... ...