chore: prettier source code
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 = '';
|
||||
|
||||
@@ -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] || '',
|
||||
}));
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user