zhuhao_dev #2
|
@ -1,21 +1,21 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<Header/>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<AppMain/>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<Header />
|
||||
</el-header>
|
||||
<el-main>
|
||||
<AppMain />
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import Header from './components/Header.vue'
|
||||
import AppMain from './components/AppMain.vue'
|
||||
import Header from './components/Header.vue'
|
||||
import AppMain from './components/AppMain.vue'
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-header{
|
||||
padding: 0
|
||||
.el-header {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
|
@ -17,12 +17,15 @@ export const constantRoutes = [
|
|||
{
|
||||
path: '/index',
|
||||
component: () => import('@/views/resource/index.vue'),
|
||||
name: 'index',
|
||||
|
||||
name: 'index'
|
||||
},
|
||||
{
|
||||
path: '/preparation',
|
||||
component: () => import('@/views/preparation/index.vue'),
|
||||
name: 'preparation'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
}
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue