|
@@ -102,12 +102,7 @@ export default {
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
saveClassify(this.temp).then(response => {
|
|
|
- this.$notify({
|
|
|
- title: response.code * 1 === 1 ? 'Success' : 'Error',
|
|
|
- message: response.code * 1 === 1 ? '添加分类成功' : response.msg,
|
|
|
- type: response.code * 1 === 1 ? 'success' : 'error',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
+ this.$message({ message: response.msg, type: 'success', center: true, duration: 2000 })
|
|
|
this.backToList()
|
|
|
})
|
|
|
}
|
|
@@ -115,7 +110,9 @@ export default {
|
|
|
},
|
|
|
// 上传图标事件
|
|
|
handleSuccess(response, file) {
|
|
|
- this.temp.classifyImage = response.data
|
|
|
+ setTimeout(() => {
|
|
|
+ this.temp.classifyImage = response.data
|
|
|
+ }, 1000)
|
|
|
},
|
|
|
// 对上传图片的大小、格式进行限制
|
|
|
beforeUpload(file) {
|