1、
错误例子

     <div style="color: red" v-for="item in pressionList" :key="item.name">
<router-link style="color: white" :to="{path:item.path}">{{item.name}}</router-link>
</div>


2、修改后

  <div style="color: red" v-for="item in pressionList" :key="item.name">
<router-link style="color: white" :to="{path:item.path}">{{item.name}}</router-link>
</div>

v-for和router-link的共同使用的更多相关文章

  1. [Redux] Navigating with React Router <Link>

    We will learn how to change the address bar using a component from React Router. In Root.js: We need ...

  2. Vue router link

    html: <router-link to="test">Go to Foo</router-link> <router-link to=" ...

  3. [React] React Router: Router, Route, and Link

    In this lesson we'll take our first look at the most common components available to us in react-rout ...

  4. React Router 用法

    React Router 用法 一.DEMO import React from "react"; import { HashRouter as Router, Route, Li ...

  5. angular2 学习笔记 ( Router 路由 )

    参考 : https://angular.cn/docs/ts/latest/guide/router.html#!#can-activate-guard https://angular.cn/doc ...

  6. [React] React Router: Redirect

    The Redirect component in react-router does exactly what it sounds like. It allows us to redirect fr ...

  7. [React] React Router: Querystring Parameters

    Define query param in Link, accept path and query : const Links = () => <nav > <Link to= ...

  8. [React] React Router: Named Components

    In this lesson we'll learn how to render multiple component children from a single route. Define a n ...

  9. [React] React Router: Route Parameters

    A router library is no good if we have to hardcode every single route in our application. In this le ...

  10. [React] React Router: IndexRoute

    IndexRoute allows us to define a default child component to be rendered at a specific route when no ...

随机推荐

  1. React重新渲染指南

    前言 老早就想写一篇关于React渲染的文章,这两天看到一篇比较不错英文的文章,翻译一下(主要是谷歌翻译,手动狗头),文章底部会附上原文链接. 介绍 React 重新渲染的综合指南.该指南解释了什么是 ...

  2. mongo数据同步的三种方案

    (一)直接复制data目录(需要停止源和目标的mongo服务)1.针对目标mongo服务已经存在,并正在运行的(mongo2-->mongo).执行步骤:(1).停止源/目标服务器的mongo服 ...

  3. 部署 Vite 静态网站到 Gitee Pages

    开启仓库的 Gitee Pages 服务,部署目录 dist/: Vite 构建 build,输出到 dist 文件:取消 .gitignore 中的 dist: Vite preview 查看静态网 ...

  4. NOI P序列题 (二分)

    题面 题解 --WQS二分 想到这个这题就完了. 赛时没想到这个你就完了. 时间复杂度 O ( n log ⁡ a ) O(n\log a) O(nloga) 不难发现这题有凸性,可以WQS二分. 我 ...

  5. PHP随机图片API

    相比上一个版本代码缩短了 此版本为图片专用 查看代码 <?php $img=file('img.txt');//txt文件 $url=array_rand($img);//imgtxt文档里面图 ...

  6. MixCSE:困难样本在句子表示中的使用

    Unsupervised Sentence Representation via Contrastive Learning with Mixing Negatives 论文地址:https://www ...

  7. RabbitMQ 入门系列:10、扩展内容:延时队列:延时队列插件及其有限的适用场景(系列大结局)。

    系列目录 RabbitMQ 入门系列:1.MQ的应用场景的选择与RabbitMQ安装. RabbitMQ 入门系列:2.基础含义:链接.通道.队列.交换机. RabbitMQ 入门系列:3.基础含义: ...

  8. 使用man手册查看内核函数

    1.为避免man的一些功能缺失,先装好manpages-dev sudo apt-get install manpages-dev 2.安装mandocs的依赖包xmlto sudo apt-get ...

  9. 如何守护数据安全? 这里有一份RDS灾备方案为你支招

    当今世界是一个充满着数据的互联网世界,生活的方方面面都在不断产生着数据,比如出行记录.消费记录.浏览的网页.发送的消息等等.除了文本类型的数据,图像.音乐.声音都是数据.对于企业而言,数据更是重要的生 ...

  10. KFS replicator安装(KES-KES)

    源端 一.安装前置配置 1.创建安装用户 groupadd flysync useradd flysync -g flysync -G kingbase passwd flysync 2.上传安装文件 ...