Commit a931c8a3a29e89606f8814585dc5b20b7d24f24c
1 parent
392b46c3
feat: notice editor readonly
Showing
2 changed files
with
3 additions
and
2 deletions
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 => { |
| 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