mirror of
https://github.com/hanzoai/helpdesk.git
synced 2026-10-12 16:56:02 +00:00
fix: pass uploadFunction prop
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<FTextEditor
|
||||
ref="e"
|
||||
:extensions="[ComponentUtils, HandleExcelPaste, CleanStyles]"
|
||||
:upload-function="uploadFunction"
|
||||
v-bind="$attrs"
|
||||
:editor-class="[
|
||||
'prose-f max-h-64 max-w-none overflow-auto my-4 min-h-[5rem]',
|
||||
@@ -72,6 +73,7 @@ import { computed, nextTick, ref } from "vue";
|
||||
interface P {
|
||||
modelValue: string;
|
||||
autofocus?: boolean;
|
||||
uploadFunction?: (file: any) => Promise<any>;
|
||||
}
|
||||
|
||||
interface E {
|
||||
@@ -86,7 +88,7 @@ const props = withDefaults(defineProps<P>(), {
|
||||
defineEmits<E>();
|
||||
|
||||
const e = ref(null);
|
||||
const editor = computed(() => e.value.editor);
|
||||
const editor = computed(() => e.value?.editor);
|
||||
const authStore = useAuthStore();
|
||||
const fixedMenu = [
|
||||
"Paragraph",
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
ref="e"
|
||||
:model-value="content"
|
||||
:placeholder="placeholder"
|
||||
:upload-function="uploadFunction"
|
||||
@update:model-value="$emit('update:content', $event)"
|
||||
@clear="() => $emit('update:attachments', [])"
|
||||
>
|
||||
@@ -97,6 +98,7 @@ interface P {
|
||||
placeholder: string;
|
||||
attachments: File[];
|
||||
expand?: boolean;
|
||||
uploadFunction?: (file: any) => Promise<any>;
|
||||
}
|
||||
|
||||
interface E {
|
||||
|
||||
Reference in New Issue
Block a user