chore: prettier source code

This commit is contained in:
chenjiahan
2020-04-02 15:36:02 +08:00
parent 340c56b3b5
commit 2fb5cca49a
93 changed files with 272 additions and 283 deletions
+3 -2
View File
@@ -27,11 +27,12 @@ function getSkuImg(
): string | undefined {
let img;
sku.tree.some(item => {
sku.tree.some((item) => {
const id = selectedSku[item.k_s];
if (id && item.v) {
const matchedSku = item.v.filter(skuValue => skuValue.id === id)[0] || {};
const matchedSku =
item.v.filter((skuValue) => skuValue.id === id)[0] || {};
img = matchedSku.previewImgUrl || matchedSku.imgUrl || matchedSku.img_url;
return img;
}
+1 -1
View File
@@ -32,7 +32,7 @@ export default createComponent({
this.paddingImg = file.content;
this.uploadFail = false;
this.uploadImg(file.file, file.content)
.then(img => {
.then((img) => {
this.$emit('input', img);
this.$nextTick(() => {
this.paddingImg = '';
+1 -1
View File
@@ -37,7 +37,7 @@ export default createComponent({
resetMessageValues(messages) {
const { messageConfig } = this;
const { initialMessages = {} } = messageConfig;
return (messages || []).map(message => ({
return (messages || []).map((message) => ({
value: initialMessages[message.name] || '',
}));
},