修改
This commit is contained in:
@@ -386,11 +386,13 @@
|
|||||||
// 基础
|
// 基础
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
|
inject,
|
||||||
reactive,
|
reactive,
|
||||||
onMounted,
|
onMounted,
|
||||||
computed,
|
computed,
|
||||||
getCurrentInstance
|
getCurrentInstance
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
|
const { $api, navTo, throttle, config } = inject('globalFunction');
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
content: {
|
content: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -538,24 +540,23 @@
|
|||||||
success: (res) => {
|
success: (res) => {
|
||||||
// 本地路径
|
// 本地路径
|
||||||
let localPath = res.tempFilePaths[0]
|
let localPath = res.tempFilePaths[0]
|
||||||
|
|
||||||
// 在此可以自定义图片上传
|
// 在此可以自定义图片上传
|
||||||
// 在此可以自定义图片上传
|
// 在此可以自定义图片上传
|
||||||
// 在此可以自定义图片上传
|
// 在此可以自定义图片上传
|
||||||
// ...
|
$api.uploadFile(localPath, true).then((resData) => {
|
||||||
let onlinePath = localPath
|
resData = JSON.parse(resData);
|
||||||
|
|
||||||
// 插入图片
|
// 插入图片
|
||||||
editorCtx.value.insertImage({
|
editorCtx.value.insertImage({
|
||||||
src: onlinePath,
|
src: resData.msg,
|
||||||
alt: '图像',
|
alt: '图像',
|
||||||
success: function() {
|
success: function() {
|
||||||
console.log('insert image success')
|
console.log('insert image success')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
Reference in New Issue
Block a user