完成菜品修改

This commit is contained in:
huangdeliang
2021-02-18 17:05:10 +08:00
parent 3554bee2b3
commit e404c3be1a
24 changed files with 1462 additions and 147 deletions

View File

@ -0,0 +1,52 @@
<template>
<div :class="classname">
<span class="title">{{ title }}</span>
<span v-if="newLine">
<div v-for="value in mValue" :key="value">{{ value }}</div>
</span>
<span v-else class="value">{{ mValue }}</span>
</div>
</template>
<script>
export default {
name: "TextInfo",
data() {
return {
classname: `text_info_wrapper ${this.extraclass || ""}`,
newLine: false,
};
},
computed: {
mValue: function () {
if (
this.value &&
typeof this.value === "string" &&
this.value.includes("</br>")
) {
this.newLine = true;
return this.value.split("</br>");
}
return this.value;
},
},
props: ["title", "value", "extraclass"],
};
</script>
<style rel="stylesheet/scss" lang="scss">
.text_info_wrapper {
display: flex;
margin-right: 24px;
min-width: 120px;
font-size: 14px;
.title {
color: #8c8c8c;
width: auto;
}
.value {
/* color: #696969; */
flex: 1 1 0;
}
}
</style>