Commit cdc5255f authored by 张冬's avatar 张冬

更新

parent d499e43a
...@@ -135,3 +135,5 @@ export default { ...@@ -135,3 +135,5 @@ export default {
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped></style> <style scoped></style>
...@@ -3,12 +3,11 @@ ...@@ -3,12 +3,11 @@
<div style="width: 100%;"> <div style="width: 100%;">
<el-upload <el-upload
:http-request="handleUpload" :http-request="handleUpload"
:on-success="handleSuccess"
:before-remove="beforeRemove" :before-remove="beforeRemove"
:limit="limit" :limit="limit"
:on-exceed="handleExceed"
:accept="accept" :accept="accept"
:show-file-list="false" :show-file-list="false"
:on-remove="handleRemove"
class="upload-demo" class="upload-demo"
action action
multiple> multiple>
...@@ -135,24 +134,17 @@ export default { ...@@ -135,24 +134,17 @@ export default {
return isLt2M return isLt2M
}, },
handleRemove(file, fileList, index) { handleRemove(file, fileList, index) {
console.log(fileList)
this.$emit('on-remove', file, fileList) this.$emit('on-remove', file, fileList)
this.fileList = fileList this.fileList = fileList
this.emitInput(fileList) this.emitInput(fileList)
}, },
handlePreview(file) { // handleExceed(files, fileList) {
this.$emit('on-preview', file) // this.$message.warning(`每次只能上传 ${this.limit} 个文件`)
}, // },
handleExceed(files, fileList) {
this.$message.warning(`每次只能上传 ${this.limit} 个文件`)
},
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}?`) return this.$confirm(`确定移除 ${file.name}?`)
}, },
handleSuccess(response, file, fileList) {
console.log('成功')
this.fileList = fileList
this.$emit('on-success', file, fileList)
},
/** /**
* 自定义上传方法 * 自定义上传方法
*/ */
......
This diff is collapsed.
...@@ -56,7 +56,7 @@ export default { ...@@ -56,7 +56,7 @@ export default {
}, },
data() { data() {
return { return {
activeIdx: 3, activeIdx: 0,
allForm: {} allForm: {}
} }
}, },
......
...@@ -5,8 +5,8 @@ import { Message, MessageBox } from 'element-ui' ...@@ -5,8 +5,8 @@ import { Message, MessageBox } from 'element-ui'
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
// baseURL: 'http://192.168.200.201:8082/apis', baseURL: 'http://192.168.200.201:8082/apis',
baseURL: 'http://192.168.3.35:8085/apis', // baseURL: 'http://192.168.3.35:8085/apis',
timeout: 35000 // 请求超时时间 timeout: 35000 // 请求超时时间
}) })
...@@ -41,8 +41,8 @@ service.interceptors.response.use( ...@@ -41,8 +41,8 @@ service.interceptors.response.use(
Message.error("登陆失效,请重新登录!") Message.error("登陆失效,请重新登录!")
localStorage.removeItem('token'); localStorage.removeItem('token');
setTimeout(function () { setTimeout(function () {
// location.href = 'http://192.168.200.201:8081/login/user/'; location.href = 'http://192.168.200.201:8081/login/user/';
location.href = 'http://localhost:3000/login/user/'; // location.href = 'http://localhost:3000/login/user/';
}, 2000); }, 2000);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment