Pre Merge pull request !77 from 抓蛙师/ts
This commit is contained in:
commit
41639523e9
@ -12,6 +12,7 @@
|
||||
ref="uploadRef"
|
||||
v-if="type === 'url'"
|
||||
>
|
||||
<i ref="uploadRef"></i>
|
||||
</el-upload>
|
||||
<div class="editor">
|
||||
<quill-editor
|
||||
@ -47,7 +48,7 @@ const props = defineProps({
|
||||
type: propTypes.string.def('url')
|
||||
});
|
||||
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||
|
||||
const upload = reactive<UploadOption>({
|
||||
headers: globalHeaders(),
|
||||
@ -78,7 +79,7 @@ const options = ref({
|
||||
image: function (value: any) {
|
||||
if (value) {
|
||||
// 调用element图片上传
|
||||
(document.querySelector(".editor-img-uploader>.el-upload") as HTMLDivElement)?.click();
|
||||
proxy?.$refs.uploadRef.click();
|
||||
} else {
|
||||
Quill.format("image", true);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user