Browse Source

优越点

master
maochaoying 2 years ago
parent
commit
c18ee5fbad
  1. 37
      src/components/detail/Info.vue
  2. 96
      src/components/detail/RelativeMerits.vue
  3. 4
      vite.config.js

37
src/components/detail/Info.vue

@ -0,0 +1,37 @@
<template>
<div class="info_container">
<img :src="isYes ? Yes : No" class="icon" alt="" />
<p class="text">{{ info }}</p>
</div>
</template>
<script setup>
import Yes from '@/static/img/zhongxin/dui.png'
import No from '@/static/img/zhongxin/cuo.png'
const props = defineProps({
isYes: {
type: Boolean,
},
info: {
type: String,
},
})
</script>
<style lang="scss" scoped>
.info_container {
display: flex;
align-items: center;
margin-top: 50px;
.icon {
width: 30px;
height: 30px;
margin-right: 16px;
}
.text {
font-size: 18px;
font-weight: 300;
color: #686868;
}
}
</style>

96
src/components/detail/RelativeMerits.vue

@ -4,12 +4,64 @@
title="优缺点对比"
line1="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
<div class="card_container"></div>
<div class="card_container">
<div class="card left">
<div class="btn new_btn">新型设计</div>
<img :src="Pic2" alt="img" class="img1" />
<Info
:isYes="true"
info="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
<Info
:isYes="true"
info="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
<Info
:isYes="true"
info="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
<Info
:isYes="true"
info="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
<Info
:isYes="true"
info="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
</div>
<div class="card right">
<div class="btn old_btn">传统设计</div>
<img :src="Pic1" alt="img" class="img2" />
<Info
:isYes="false"
info="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
<Info
:isYes="false"
info="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
<Info
:isYes="false"
info="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
<Info
:isYes="false"
info="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
<Info
:isYes="false"
info="根据一线工程师的使用感受,设计的产品,易用性很高"
/>
</div>
</div>
</div>
</template>
<script setup>
import HeadLine from '../HeadLine'
import Pic1 from '@/static/img/zhongxin/duibi1.png'
import Pic2 from '@/static/img/zhongxin/duibi2.png'
import Info from './Info'
</script>
<style lang="scss" scoped>
@ -18,11 +70,49 @@ import HeadLine from '../HeadLine'
margin: 0 auto;
.card_container {
width: 76vw;
height: calc(76vw / 1.78);
background: #000;
margin: 0 auto;
margin-top: 90px;
position: relative;
display: flex;
.card {
flex: 1;
padding: 44px 67px 67px 67px;
display: flex;
flex-direction: column;
align-items: center;
.btn {
width: 217px;
height: 55px;
border-radius: 28px;
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
font-weight: 500;
color: #ffffff;
margin-bottom: 65px;
}
.img2 {
width: 500px;
height: 365px;
}
.img1 {
width: 580px;
height: 365px;
}
.new_btn {
background: linear-gradient(90deg, #7182ff, #5064f4);
}
.old_btn {
background: #cbcbcb;
}
}
.left {
background: #f6f6f6;
}
.right {
background: #f1f1f1;
}
}
}
</style>

4
vite.config.js

@ -14,6 +14,10 @@ export default defineConfig({
extensions: ['.js', '.json', '.vue'],
},
plugins: [vue()],
server: {
port: 5173,
host: '0.0.0.0',
},
//配置sass
css: {
preprocessorOptions: {

Loading…
Cancel
Save