zhuhao_dev #2

Merged
zhuhao merged 3 commits from zhuhao_dev into main 2024-07-09 15:00:07 +08:00
3 changed files with 61 additions and 17 deletions
Showing only changes of commit 13f4adcf6b - Show all commits

View File

@ -16,6 +16,6 @@ import AppMain from './components/AppMain.vue'
<style lang="scss" scoped> <style lang="scss" scoped>
.el-header { .el-header {
padding: 0 padding: 0;
} }
</style> </style>

View File

@ -17,12 +17,15 @@ export const constantRoutes = [
{ {
path: '/index', path: '/index',
component: () => import('@/views/resource/index.vue'), component: () => import('@/views/resource/index.vue'),
name: 'index', name: 'index'
},
{
path: '/preparation',
component: () => import('@/views/preparation/index.vue'),
name: 'preparation'
} }
] ]
}, }
] ]
const router = createRouter({ const router = createRouter({

View File

@ -0,0 +1,41 @@
<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>