vue.js - Vue/Nuxt JS 没有重复的属性
问题描述
我在 Vue JS 中创建了一个带有导航栏的标题组件,我收到了 Eslint 的错误消息:
Parsing error: unexpected-character-in-attribute-name. (vue/no-parsing-error) 13:14
Error ESLint Parsing error: duplicate-attribute. (vue/no-parsing-error) 13:14
Error ESLint Duplicate attribute 'to'. (vue/no-duplicate-attributes) 13:14
Error ESLint Parsing error: Unexpected closing tag "li". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags (prettier/prettier)
当它们只是链接时,我不确定如何解决这个问题,我们是否不允许在同一页面上拥有具有相同属性和标签的链接?
这是代码:
<template>
<header class="header">
<h1 class="title">Dad Jokes</h1>
<ul>
<li>
<nuxt-link to="/">Home</nuxt-link>
</li>
<li>
<nuxt-link to="/jokes">Jokes</nuxt-link>
</li>
<li>
<nuxt-link to="/about">About</nuxt-link>
</li>
</ul>
</header>
</template>
解决方案
推荐阅读
- java - Android facebook-sdk 在土耳其语中崩溃
- javascript - 点击时的 jQuery 手风琴事件
- c# - c# WPF image show tiff (just 1 page) blurry
- android - Appium 在第二个活动中找不到任何元素,如第一个活动所示
- java - jarsigner 在 java 中不起作用,因此构建失败
- gdal - gdallocationinfo 的插值结果?
- api-design - API 设计:传递 id 或完整对象
- mysql - 将数据库从 sqlServer 移动到 phpMyAdmin
- jsf - 如何在单击菜单项时指定支持 bean 回调?
- artificial-intelligence - 在 botlibre 上为我的聊天机器人使用通配符元素 (AIML)