vue写个有作者的基本信息介绍、画作介绍等信息的列表

时间: 2024-03-30 09:34:33 浏览: 20
好的,这是一个关于vue写有作者基本信息介绍和画作介绍的列表的建议,你可以根据自己的需求进行一些调整。 首先,你可以创建一个包含作者基本信息和画作介绍的数据数组,例如: ```javascript data() { return { artists: [ { name: 'Vincent van Gogh', nationality: 'Dutch', birthDate: '1853-03-30', deathDate: '1890-07-29', bio: 'Vincent Willem van Gogh was a Dutch post-impressionist painter who is among the most famous and influential figures in the history of Western art.', paintings: [ { title: 'The Starry Night', year: '1889', medium: 'Oil on canvas', size: '73.7 cm × 92.1 cm', image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg/1280px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg' }, { title: 'Irises', year: '1889', medium: 'Oil on canvas', size: '71 cm × 93 cm', image: 'https://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Van_Gogh_-_Irises_-_Google_Art_Project.jpg/1280px-Van_Gogh_-_Irises_-_Google_Art_Project.jpg' } ] }, // ... ] } } ``` 然后,你可以使用`v-for`指令循环渲染列表,并使用`<template>`标签来分组展示作者基本信息和画作介绍,例如: ```html <template v-for="(artist, index) in artists"> <!-- Artist basic info --> <div class="artist-info" :key="'artist-' + index"> <h2>{{ artist.name }}</h2> <div class="nationality">{{ artist.nationality }}</div> <div class="birth-date">{{ artist.birthDate }}</div> <div class="death-date">{{ artist.deathDate }}</div> <p class="bio">{{ artist.bio }}</p> </div> <!-- Artist paintings --> <div class="artist-paintings" :key="'paintings-' + index"> <h3>Paintings</h3> <ul> <li v-for="(painting, index) in artist.paintings" :key="'painting-' + index"> <div class="painting-image"> <img :src="painting.image" :alt="painting.title"> </div> <div class="painting-info"> <h4>{{ painting.title }}</h4> <div class="year">{{ painting.year }}</div> <div class="medium">{{ painting.medium }}</div> <div class="size">{{ painting.size }}</div> </div> </li> </ul> </div> </template> ``` 最后,你可以根据需要添加一些样式来美化列表的外观,例如: ```css .artist-info { margin-bottom: 20px; } .artist-info h2 { margin: 0; font-size: 24px; } .artist-info .nationality { font-size: 18px; color: #666; } .artist-info .bio { margin-top: 10px; line-height: 1.5; } .artist-paintings { margin-bottom: 40px; } .artist-paintings h3 { margin: 0; font-size: 20px; } .artist-paintings ul { list-style: none; margin: 0; padding: 0; } .artist-paintings li { display: flex; align-items: center; margin-bottom: 20px; } .artist-paintings li:last-child { margin-bottom: 0; } .painting-image { margin-right: 20px; width: 200px; height: 200px; overflow: hidden; } .painting-image img { width: 100%; height: 100%; object-fit: cover; } .painting-info h4 { margin: 0; font-size: 18px; } .painting-info div { font-size: 14px; color: #666; margin-bottom: 5px; } ``` 这样,你就可以在页面上展示一个包含作者基本信息和画作介绍的列表了。

相关推荐

最新推荐

recommend-type

基于vue写一个全局Message组件的实现

主要介绍了基于vue写一个全局Message组件的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
recommend-type

Vue如何获取数据列表展示

主要为大家详细介绍了Vue如何获取数据列表展示,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
recommend-type

vue实现城市列表选择功能

主要介绍了vue实现城市列表选择功能,本文通过实例代码给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下
recommend-type

vue使用canvas实现移动端手写签名

主要为大家详细介绍了基于vue使用canvas实现移动端手写签名,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
recommend-type

vue实现全匹配搜索列表内容

主要为大家详细介绍了vue实现全匹配搜索列表内容,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
recommend-type

zigbee-cluster-library-specification

最新的zigbee-cluster-library-specification说明文档。
recommend-type

管理建模和仿真的文件

管理Boualem Benatallah引用此版本:布阿利姆·贝纳塔拉。管理建模和仿真。约瑟夫-傅立叶大学-格勒诺布尔第一大学,1996年。法语。NNT:电话:00345357HAL ID:电话:00345357https://theses.hal.science/tel-003453572008年12月9日提交HAL是一个多学科的开放存取档案馆,用于存放和传播科学研究论文,无论它们是否被公开。论文可以来自法国或国外的教学和研究机构,也可以来自公共或私人研究中心。L’archive ouverte pluridisciplinaire
recommend-type

MATLAB柱状图在信号处理中的应用:可视化信号特征和频谱分析

![matlab画柱状图](https://img-blog.csdnimg.cn/3f32348f1c9c4481a6f5931993732f97.png) # 1. MATLAB柱状图概述** MATLAB柱状图是一种图形化工具,用于可视化数据中不同类别或组的分布情况。它通过绘制垂直条形来表示每个类别或组中的数据值。柱状图在信号处理中广泛用于可视化信号特征和进行频谱分析。 柱状图的优点在于其简单易懂,能够直观地展示数据分布。在信号处理中,柱状图可以帮助工程师识别信号中的模式、趋势和异常情况,从而为信号分析和处理提供有价值的见解。 # 2. 柱状图在信号处理中的应用 柱状图在信号处理
recommend-type

用Spring boot和vue写一个登录注册界面

好的,这是一个比较常见的技术问题,我可以为您提供一些参考资料和思路。首先,您可以使用Spring Boot作为后端框架来处理用户认证和注册的逻辑,比如使用Spring Security实现用户登录认证。同时,您还需要设计相应的数据模型和数据库表结构来存储用户信息。在前端方面,您可以使用Vue.js作为框架来构建登录注册页面,使用Axios来发起API请求并和后端进行交互。当然,在实现过程中,还需要考虑一些具体细节,比如数据校验、安全性和用户体验等方面。希望这些信息能够帮助到您。
recommend-type

JSBSim Reference Manual

JSBSim参考手册,其中包含JSBSim简介,JSBSim配置文件xml的编写语法,编程手册以及一些应用实例等。其中有部分内容还没有写完,估计有生之年很难看到完整版了,但是内容还是很有参考价值的。