修改样式,添加字体修改
This commit is contained in:
parent
4f08bedf61
commit
4c654d8617
stdiet-admin/src/main/filters/local
stdiet-ui/src
store/modules
views/custom/recipesBuild/RecipesView
@ -9,8 +9,8 @@ stdiet:
|
||||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
#profile: /Users/wonder/Documents/Workspaces/java/ShengtangManage/running/uploadPath
|
||||
profile: D:/ruoyi/uploadPath
|
||||
profile: /Users/wonder/Documents/Workspaces/java/ShengtangManage/running/uploadPath
|
||||
# profile: D:/ruoyi/uploadPath
|
||||
# 获取ip地址开关
|
||||
addressEnabled: false
|
||||
# 验证码类型 math 数组计算 char 字符验证
|
||||
|
@ -29,7 +29,8 @@ const oriState = {
|
||||
endNum: 0,
|
||||
reviewStatus: 0,
|
||||
templateInfo: undefined,
|
||||
copyData: undefined
|
||||
copyData: undefined,
|
||||
fontSize: 12
|
||||
};
|
||||
|
||||
const mutations = {
|
||||
@ -56,6 +57,9 @@ const mutations = {
|
||||
}
|
||||
}
|
||||
},
|
||||
updateFontSize(state, payload) {
|
||||
state.fontSize = payload.fontSize;
|
||||
},
|
||||
addRecipesDishes(state, payload) {
|
||||
state.recipesData[payload.num].dishes.push(payload.data);
|
||||
},
|
||||
|
@ -4,6 +4,22 @@
|
||||
:style="`height: ${collapse ? 30 : 200}px`"
|
||||
>
|
||||
<div class="header">
|
||||
<span class="font_size_style">
|
||||
字体大小:
|
||||
<el-select
|
||||
v-model="mFontSize"
|
||||
size="mini"
|
||||
style="width: 80px"
|
||||
@change="handleOnSizeChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="size in fontSizeOpts"
|
||||
:key="size.value"
|
||||
:label="size.label"
|
||||
:value="size.value"
|
||||
/>
|
||||
</el-select>
|
||||
</span>
|
||||
<el-button size="mini" v-if="!recipesId" @click="handleOnBack"
|
||||
>返回</el-button
|
||||
>
|
||||
@ -91,16 +107,32 @@ export default {
|
||||
PieChart,
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
mFontSize: 12,
|
||||
fontSizeOpts: [
|
||||
{ value: 12, label: "12" },
|
||||
{ value: 14, label: "14" },
|
||||
{ value: 16, label: "16" },
|
||||
{ value: 18, label: "18" },
|
||||
],
|
||||
};
|
||||
},
|
||||
updated() {
|
||||
// console.log(this.data);
|
||||
},
|
||||
props: ["collapse", "data"],
|
||||
computed: {
|
||||
...mapState(["recipesId", "reviewStatus", "healthyData"]),
|
||||
...mapState(["recipesId", "reviewStatus", "healthyData", "fontSize"]),
|
||||
},
|
||||
watch: {
|
||||
fontSize(val) {
|
||||
this.mFontSize = val;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
handleOnSizeChange(fontSize) {
|
||||
this.updateFontSize({ fontSize });
|
||||
},
|
||||
handleCollapseClick() {
|
||||
this.$emit("update:collapse", !this.collapse);
|
||||
},
|
||||
@ -121,7 +153,7 @@ export default {
|
||||
this.updateStateData({ recipesData: [] });
|
||||
},
|
||||
...mapActions(["saveRecipes", "updateReviewStatus"]),
|
||||
...mapMutations(["updateStateData"]),
|
||||
...mapMutations(["updateStateData", "updateFontSize"]),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -138,6 +170,13 @@ export default {
|
||||
transition: all 0.3s;
|
||||
transform-origin: center center;
|
||||
}
|
||||
|
||||
.font_size_style {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
margin-right: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
|
@ -7,6 +7,8 @@
|
||||
:cell-style="{ padding: '2px 0' }"
|
||||
:header-cell-style="{ padding: '4px 0', height: 'unset' }"
|
||||
size="mini"
|
||||
header-row-class-name="recipes_header"
|
||||
:cell-class-name="cellClassName"
|
||||
:style="`outline: ${currentDay === num ? '1px solid #d96969' : 'none'}`"
|
||||
>
|
||||
<el-table-column prop="type" :width="100" align="center">
|
||||
@ -355,9 +357,17 @@ export default {
|
||||
return mData;
|
||||
},
|
||||
...mapGetters(["typeDict"]),
|
||||
...mapState(["currentDay", "copyData"]),
|
||||
...mapState(["currentDay", "copyData", "fontSize"]),
|
||||
},
|
||||
methods: {
|
||||
cellClassName({ row, column, rowIndex, columnIndex }) {
|
||||
// console.log({ row, column, rowIndex, columnIndex });
|
||||
if (!columnIndex) {
|
||||
return "recipes_first_col";
|
||||
} else {
|
||||
return `recipes_cell_${this.fontSize}`;
|
||||
}
|
||||
},
|
||||
handleParentClick(e) {
|
||||
// 校验某天
|
||||
this.setCurrentDay({ currentDay: this.num });
|
||||
@ -496,4 +506,29 @@ export default {
|
||||
font-size: 12px;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.recipes_header {
|
||||
& > th {
|
||||
background: #d96969 !important;
|
||||
color: white !important;
|
||||
}
|
||||
}
|
||||
|
||||
.recipes_first_col {
|
||||
background: #d96969 !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.recipes_cell_12 {
|
||||
font-size: 12px;
|
||||
}
|
||||
.recipes_cell_14 {
|
||||
font-size: 14px;
|
||||
}
|
||||
.recipes_cell_16 {
|
||||
font-size: 16px;
|
||||
}
|
||||
.recipes_cell_18 {
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user