added ESlint 语法检测

This commit is contained in:
何秀钢
2021-06-02 14:11:45 +08:00
parent 3932a8fbf3
commit 2f0465a1a1
94 changed files with 5031 additions and 4790 deletions
+23 -17
View File
@@ -2,14 +2,14 @@
<el-drawer title="媒体库" :visible.sync="drawer">
<div class="media">
<el-image
class="header-img-box-list"
:src="(item.url && item.url.slice(0, 4) !== 'http')?path+item.url:item.url"
v-for="(item,key) in picList"
:key="key"
class="header-img-box-list"
:src="(item.url && item.url.slice(0, 4) !== 'http')?path+item.url:item.url"
@click.native="chooseImg(item.url,target,targetKey)"
>
<div slot="error" class="header-img-box-list">
<i class="el-icon-picture-outline"></i>
<i class="el-icon-picture-outline" />
</div>
</el-image>
</div>
@@ -18,34 +18,40 @@
<script>
const path = process.env.VUE_APP_BASE_API
import { getFileList } from "@/api/fileUploadAndDownload";
import { getFileList } from '@/api/fileUploadAndDownload'
export default {
props: {
target: [Object],
targetKey: [String]
target: {
type: Object,
default: null
},
targetKey: {
type: String,
default: ''
}
},
data() {
return {
drawer: false,
picList: [],
path:path
};
path: path
}
},
methods: {
chooseImg(url, target, targetKey) {
if(target&&targetKey){
target[targetKey] = url;
if (target && targetKey) {
target[targetKey] = url
}
this.$emit("enter-img", url);
this.drawer = false;
this.$emit('enter-img', url)
this.drawer = false
},
async open() {
const res = await getFileList({ page: 1, pageSize: 9999 });
this.picList = res.data.list;
this.drawer = true;
const res = await getFileList({ page: 1, pageSize: 9999 })
this.picList = res.data.list
this.drawer = true
}
}
};
}
</script>
<style lang="scss">
@@ -65,4 +71,4 @@ export default {
}
}
</style>
</style>