全局lint优化

This commit is contained in:
Pan
2017-08-22 15:43:34 +08:00
committed by 花裤衩
parent b8ecda19d8
commit 551e911eb4
104 changed files with 3487 additions and 3672 deletions

View File

@@ -27,8 +27,8 @@
<script>
// 预览效果见文章
import { getToken } from 'api/qiniu';
export default {
import { getToken } from 'api/qiniu'
export default {
name: 'singleImageUpload',
props: {
value: String
@@ -42,36 +42,36 @@
return {
tempUrl: '',
dataObj: { token: '', key: '' }
};
}
},
methods: {
rmImage() {
this.emitInput('');
this.emitInput('')
},
emitInput(val) {
this.$emit('input', val);
this.$emit('input', val)
},
handleImageScucess(file) {
this.emitInput(file.files.file)
},
beforeUpload() {
const _self = this;
return new Promise((resolve, reject) => {
const _self = this
return new Promise((resolve, reject) => {
getToken().then(response => {
const key = response.data.qiniu_key;
const token = response.data.qiniu_token;
_self._data.dataObj.token = token;
_self._data.dataObj.key = key;
this.tempUrl = response.data.qiniu_url;
resolve(true);
const key = response.data.qiniu_key
const token = response.data.qiniu_token
_self._data.dataObj.token = token
_self._data.dataObj.key = key
this.tempUrl = response.data.qiniu_url
resolve(true)
}).catch(err => {
console.log(err);
reject(false)
});
});
console.log(err)
reject(false)
})
})
}
}
};
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>