Vue3电商项目实战-商品详情模块7【21-商品详情-评价组件-头部渲染、22-商品详情-评价组件-实现列表】
    		       		warning:
    		            这篇文章距离上次修改已过452天,其中的内容可能已经有所变动。
    		        
        		                
                
<template>
  <div class="evaluate-header">
    <span class="title">评论</span>
    <span class="more">
      <span class="more-text">查看更多评论</span>
      <img src="../assets/img/arrow-right.svg" alt="">
    </span>
  </div>
</template>
 
<script>
export default {
  name: 'EvaluateHeader'
}
</script>
 
<style scoped>
.evaluate-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}
.title {
  color: #333;
}
.more {
  display: flex;
  align-items: center;
  color: #666;
}
.more-text {
  margin-right: 5px;
}
.more img {
  width: 14px;
  height: 14px;
}
</style>这个代码实例展示了如何在Vue 3项目中创建一个简单的评论头部组件。它使用了flex布局来排列标题和更多评论的文字和箭头图标,并通过scoped样式保证样式只应用于当前组件。这个例子是电商项目中评论组件的一部分,展示了如何组织和设计Vue组件。
评论已关闭