基础修改

This commit is contained in:
朱浩 2024-07-09 14:59:34 +08:00
parent 790aa54601
commit 4f32e6f1b2
2 changed files with 36 additions and 47 deletions

View File

@ -1,41 +0,0 @@
<template>
<div>
<el-upload
:action="uploadUrl"
:before-upload="handleBeforeUpload"
:on-success="handleUploadSuccess"
:on-error="handleUploadError"
name="file"
:show-file-list="false"
class="editor-img-uploader"
>
上传
</el-upload>
</div>
</template>
<script>
export default {
name: 'Preparation',
data() {
return {
uploadUrl: import.meta.env.VITE_APP_BASE_API + '/smarttalk/file/upload'
}
},
created() {
},
mounted() {
},
methods: {
handleBeforeUpload(file) {
console.log(file)
},
handleUploadSuccess(res, file) {
console.log(res, file)
},
handleUploadError(error) {
console.log(error)
}
}
}
</script>
<style scoped lang="scss"></style>

View File

@ -1,11 +1,41 @@
<template> <template>
<div> <div>
备课Page <el-upload
:action="uploadUrl"
:before-upload="handleBeforeUpload"
:on-success="handleUploadSuccess"
:on-error="handleUploadError"
name="file"
:show-file-list="false"
class="editor-img-uploader"
>
上传
</el-upload>
</div> </div>
</template> </template>
<script>
<script setup> export default {
name: 'Prepare',
data() {
return {
uploadUrl: import.meta.env.VITE_APP_BASE_API + '/smarttalk/file/upload'
}
},
created() {
},
mounted() {
},
methods: {
handleBeforeUpload(file) {
console.log(file)
},
handleUploadSuccess(res, file) {
console.log(res, file)
},
handleUploadError(error) {
console.log(error)
}
}
}
</script> </script>
<style scoped lang="scss"></style>
<style lang="scss" scoped></style>