1,保持字体
2,替换菜品时备注 3,修复未生成食谱时多次粘贴后删除全删
This commit is contained in:
@ -142,6 +142,8 @@ export default {
|
||||
loading: false,
|
||||
mFontSize: 12,
|
||||
fontSizeOpts: [
|
||||
{ value: 8, label: "8" },
|
||||
{ value: 10, label: "10" },
|
||||
{ value: 12, label: "12" },
|
||||
{ value: 14, label: "14" },
|
||||
{ value: 16, label: "16" },
|
||||
@ -149,17 +151,25 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
// this.mFontSize = parseInt(localStorage.getItem("fontSize")) || 12;
|
||||
// this.updateFontSize({fontSize:})
|
||||
},
|
||||
updated() {
|
||||
// console.log(this.data);
|
||||
if (this.fontSize !== this.mFontSize) {
|
||||
this.mFontSize = this.fontSize;
|
||||
// console.log(this.fontSize);
|
||||
}
|
||||
},
|
||||
props: ["collapse", "data"],
|
||||
computed: {
|
||||
...mapState(["recipesId", "reviewStatus", "healthyData", "fontSize"]),
|
||||
},
|
||||
watch: {
|
||||
fontSize(val) {
|
||||
this.mFontSize = val;
|
||||
},
|
||||
// fontSize(val) {
|
||||
// this.mFontSize = val;
|
||||
// },
|
||||
},
|
||||
methods: {
|
||||
handleOnSizeChange(fontSize) {
|
||||
|
@ -401,12 +401,18 @@ export default {
|
||||
}
|
||||
return arr;
|
||||
}, []);
|
||||
console.log(mData);
|
||||
// console.log(mData);
|
||||
|
||||
return mData;
|
||||
},
|
||||
...mapGetters(["typeDict"]),
|
||||
...mapState(["currentDay", "copyData", "fontSize", "canCopyMenuTypes"]),
|
||||
...mapState([
|
||||
"currentDay",
|
||||
"copyData",
|
||||
"fontSize",
|
||||
"canCopyMenuTypes",
|
||||
"recipesId",
|
||||
]),
|
||||
},
|
||||
methods: {
|
||||
cellClassName({ row, column, rowIndex, columnIndex }) {
|
||||
@ -470,9 +476,17 @@ export default {
|
||||
handleOnPaste(type) {
|
||||
// console.log(this.copyData);
|
||||
if (this.copyData) {
|
||||
const data = {
|
||||
...this.copyData,
|
||||
type,
|
||||
};
|
||||
if (!this.recipesId) {
|
||||
// 未生成食谱时拷贝
|
||||
data.id = new Date().getTime();
|
||||
}
|
||||
this.addDishes({
|
||||
num: this.num,
|
||||
data: { ...this.copyData, type },
|
||||
data,
|
||||
}).catch((err) => {
|
||||
this.$message.error(err);
|
||||
});
|
||||
@ -624,6 +638,12 @@ export default {
|
||||
color: #595959;
|
||||
}
|
||||
|
||||
.recipes_cell_8 {
|
||||
font-size: 8px;
|
||||
}
|
||||
.recipes_cell_10 {
|
||||
font-size: 10px;
|
||||
}
|
||||
.recipes_cell_12 {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
Reference in New Issue
Block a user