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