feat: 商品详情的字体图标的处理
This commit is contained in:
@@ -15,19 +15,30 @@
|
|||||||
<!-- 商品信息组件 -->
|
<!-- 商品信息组件 -->
|
||||||
<GoodInfo :goodsData="goodsData" @showCalendar="showCalendar" />
|
<GoodInfo :goodsData="goodsData" @showCalendar="showCalendar" />
|
||||||
|
|
||||||
<view v-if="goodsData.commodityPurchaseInstruction">
|
<view v-if="goodsData.commodityPurchaseInstruction" class="use-notice">
|
||||||
<ModuleTitle
|
<ModuleTitle
|
||||||
:title="goodsData.commodityPurchaseInstruction.templateTitle"
|
:title="goodsData.commodityPurchaseInstruction.templateTitle"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
class="use-notice"
|
class="use-notice-content"
|
||||||
v-for="(moduleItem, index) in goodsData.commodityPurchaseInstruction
|
v-for="(moduleItem, index) in goodsData.commodityPurchaseInstruction
|
||||||
.commodityPurchaseInstructionModuleEntityList"
|
.commodityPurchaseInstructionModuleEntityList"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<view class="module-item">
|
<view
|
||||||
|
class="module-item"
|
||||||
|
:class="{
|
||||||
|
'border-bottom':
|
||||||
|
index <
|
||||||
|
goodsData.commodityPurchaseInstruction
|
||||||
|
.commodityPurchaseInstructionModuleEntityList.length -
|
||||||
|
1,
|
||||||
|
}"
|
||||||
|
>
|
||||||
<view class="module-icon">
|
<view class="module-icon">
|
||||||
<image :src="moduleItem.moduleIcon" mode="aspectFit" />
|
<uni-icons fontFamily="znicons" size="20" color="#333">{{
|
||||||
|
zniconsMap[moduleItem.moduleIcon]
|
||||||
|
}}</uni-icons>
|
||||||
<text class="module-title">{{ moduleItem.moduleTitle }}</text>
|
<text class="module-title">{{ moduleItem.moduleTitle }}</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="module-desc">{{ moduleItem.moduleContent }}</text>
|
<text class="module-desc">{{ moduleItem.moduleContent }}</text>
|
||||||
@@ -85,6 +96,7 @@ import GoodInfo from "./components/GoodInfo/index.vue";
|
|||||||
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
import ModuleTitle from "@/components/ModuleTitle/index.vue";
|
||||||
import GoodConfirm from "./components/GoodConfirm/index.vue";
|
import GoodConfirm from "./components/GoodConfirm/index.vue";
|
||||||
import Calender from "@/components/Calender/index.vue";
|
import Calender from "@/components/Calender/index.vue";
|
||||||
|
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||||
|
|
||||||
const calendarVisible = ref(false);
|
const calendarVisible = ref(false);
|
||||||
const goodsData = ref({});
|
const goodsData = ref({});
|
||||||
@@ -268,4 +280,8 @@ const handleDateSelect = (data) => {
|
|||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import "./styles/index.scss";
|
@import "./styles/index.scss";
|
||||||
|
@font-face {
|
||||||
|
font-family: znicons;
|
||||||
|
src: url("@/static/fonts/znicons.ttf");
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -17,15 +17,16 @@ $button-hover-color: darken($button-color, 8%);
|
|||||||
|
|
||||||
// 使用须知样式
|
// 使用须知样式
|
||||||
.use-notice {
|
.use-notice {
|
||||||
margin-bottom: 16px;
|
margin: 16px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.use-notice-content {
|
||||||
.module-item {
|
.module-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border-bottom: 1px solid #666;
|
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
|
|
||||||
.module-icon {
|
.module-icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@@ -33,19 +34,12 @@ $button-hover-color: darken($button-color, 8%);
|
|||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
image {
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
object-fit: cover;
|
|
||||||
background-color: #f55726;
|
|
||||||
margin-right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.module-title {
|
.module-title {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #333;
|
color: #333;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
margin-left: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,6 +51,9 @@ $button-hover-color: darken($button-color, 8%);
|
|||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.border-bottom {
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-wrapper {
|
.content-wrapper {
|
||||||
|
|||||||
19
static/fonts/znicons.js
Normal file
19
static/fonts/znicons.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
export const zniconsMap = {
|
||||||
|
"zn-wifi": "\ue681",
|
||||||
|
"zn-bath": "\ue682",
|
||||||
|
"zn-frame": "\ue683",
|
||||||
|
"zn-shower-gel": "\ue684",
|
||||||
|
"zn-a-washingmachine": "\ue685",
|
||||||
|
"zn-live": "\ue686",
|
||||||
|
"zn-user": "\ue687",
|
||||||
|
"zn-dish-cover": "\ue688",
|
||||||
|
"zn-glass-cup": "\ue689",
|
||||||
|
"zn-check-circle": "\ue68a",
|
||||||
|
"zn-send-filled": "\ue68b",
|
||||||
|
"zn-nav-arrow-right": "\ue68c",
|
||||||
|
"zn-nav-arrow-left": "\ue68d",
|
||||||
|
"zn-nav-arrow-down": "\ue68e",
|
||||||
|
"zn-fast-arrow-down": "\ue68f",
|
||||||
|
"zn-nav-arrow-up": "\ue690",
|
||||||
|
"zn-microphone": "\ue691",
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user