!97 修复分量估算错误

Merge pull request !97 from 德仔/develop
This commit is contained in:
德仔 2021-03-05 19:07:06 +08:00 committed by Gitee
commit 0c3bf7003d
4 changed files with 21 additions and 5 deletions

View File

@ -115,6 +115,7 @@ export default {
this.active = 1; this.active = 1;
this.dishesTypeOptions = (this.type || data.type) this.dishesTypeOptions = (this.type || data.type)
.split(",") .split(",")
.sort((a, b) => a - b)
.reduce((arr, cur, idx) => { .reduce((arr, cur, idx) => {
if (idx === 0) { if (idx === 0) {
this.selDishes.type = cur; this.selDishes.type = cur;

View File

@ -95,6 +95,14 @@ export default {
this.mUnit = value; this.mUnit = value;
}, },
}, },
watch: {
weight(val) {
this.mWeight = val;
},
unit(val) {
this.mUnit = val;
},
},
computed: { computed: {
unitWeight() { unitWeight() {
return ( return (

View File

@ -9,7 +9,7 @@
size="mini" size="mini"
header-row-class-name="recipes_header" header-row-class-name="recipes_header"
:cell-class-name="cellClassName" :cell-class-name="cellClassName"
:style="`outline: ${currentDay === num ? '1px solid #d96969' : 'none'}`" :style="`outline: ${currentDay === num ? '1px solid #d53950' : 'none'}`"
> >
<el-table-column prop="type" :width="100" align="center"> <el-table-column prop="type" :width="100" align="center">
<template slot="header"> <template slot="header">
@ -365,7 +365,7 @@ export default {
if (!columnIndex) { if (!columnIndex) {
return "recipes_first_col"; return "recipes_first_col";
} else { } else {
return `recipes_cell_${this.fontSize}`; return `recipes_cell recipes_cell_${this.fontSize}`;
} }
}, },
handleParentClick(e) { handleParentClick(e) {
@ -509,14 +509,21 @@ export default {
.recipes_header { .recipes_header {
& > th { & > th {
background: #d96969 !important; background: #d53950 !important;
color: white !important; color: white !important;
font-weight: bold;
} }
} }
.recipes_first_col { .recipes_first_col {
background: #d96969 !important; background: #d53950 !important;
color: white !important; color: white !important;
font-weight: bold;
}
.recipes_cell {
font-weight: bold;
color: #595959;
} }
.recipes_cell_12 { .recipes_cell_12 {