feat: 商品详情的字体图标的处理
This commit is contained in:
@@ -15,19 +15,30 @@
|
||||
<!-- 商品信息组件 -->
|
||||
<GoodInfo :goodsData="goodsData" @showCalendar="showCalendar" />
|
||||
|
||||
<view v-if="goodsData.commodityPurchaseInstruction">
|
||||
<view v-if="goodsData.commodityPurchaseInstruction" class="use-notice">
|
||||
<ModuleTitle
|
||||
:title="goodsData.commodityPurchaseInstruction.templateTitle"
|
||||
/>
|
||||
<view
|
||||
class="use-notice"
|
||||
class="use-notice-content"
|
||||
v-for="(moduleItem, index) in goodsData.commodityPurchaseInstruction
|
||||
.commodityPurchaseInstructionModuleEntityList"
|
||||
:key="index"
|
||||
>
|
||||
<view class="module-item">
|
||||
<view
|
||||
class="module-item"
|
||||
:class="{
|
||||
'border-bottom':
|
||||
index <
|
||||
goodsData.commodityPurchaseInstruction
|
||||
.commodityPurchaseInstructionModuleEntityList.length -
|
||||
1,
|
||||
}"
|
||||
>
|
||||
<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>
|
||||
</view>
|
||||
<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 GoodConfirm from "./components/GoodConfirm/index.vue";
|
||||
import Calender from "@/components/Calender/index.vue";
|
||||
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||
|
||||
const calendarVisible = ref(false);
|
||||
const goodsData = ref({});
|
||||
@@ -268,4 +280,8 @@ const handleDateSelect = (data) => {
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import "./styles/index.scss";
|
||||
@font-face {
|
||||
font-family: znicons;
|
||||
src: url("@/static/fonts/znicons.ttf");
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -17,13 +17,14 @@ $button-hover-color: darken($button-color, 8%);
|
||||
|
||||
// 使用须知样式
|
||||
.use-notice {
|
||||
margin-bottom: 16px;
|
||||
margin: 16px 0;
|
||||
}
|
||||
|
||||
.use-notice-content {
|
||||
.module-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
border-bottom: 1px solid #666;
|
||||
padding: 12px 0;
|
||||
|
||||
.module-icon {
|
||||
@@ -33,19 +34,12 @@ $button-hover-color: darken($button-color, 8%);
|
||||
margin-right: 8px;
|
||||
flex-shrink: 0;
|
||||
|
||||
image {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
object-fit: cover;
|
||||
background-color: #f55726;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.module-title {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
word-wrap: break-word;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +51,9 @@ $button-hover-color: darken($button-color, 8%);
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
}
|
||||
|
||||
.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