Vue v-text和v-html的区别

v-text和v-html的区别

v-text:会把html的标签输出

v-html:不会把html的标签输出

比如:

<template>
  <div id="app">
    <h1 v-html="title"></h1>
  </div>
</template>

<script>
import Hello from ‘./components/Hello‘

export default {
  data:function(){
    return {
      title:"<span>this is a todoList</span>"
    }
  }
}
</script>

使用v-html会输出:this is a todoList

使用v-text会输出:<span>this is a todoList</span>   //会连同标签一同输出

时间: 2024-07-30 04:18:32

Vue v-text和v-html的区别的相关文章

v$sql和v$sqlarea区别

v$sql和v$sqlarea 官方文档解释:V$SQL lists statistics on shared SQL areas without the GROUP BY clause and contains one row for each child of the original SQL text entered. Statistics displayed in V$SQL are normally updated at the end of query execution. Howe

V$PARAMETER与V$SPPARAMETER的区别

1.官方文档定义V$PARAMETERV$PARAMETER displays information about the initialization parameters that are currently in effect for the session. A new session inherits parameter values from the instance-wide values displayed by the V$SYSTEM_PARAMETER view. V$SP

css和js带参数(形如.css?v=与.js?v= 或 .css?version=与.js?version=)

1 <span style="font-size:14px;">css和js带参数(形如.css?v=与.js?v= 或 .css?version=与.js?version= ) 2 3 <script type=”text/javascript” src=”jb51.js?version=1.2.6″></script> 4 <link rel=’stylesheet’ href=’base.css?version=2.3.3′ type=’

oracle 入门笔记--v$sql和v$sqlarea视图(转载)

转载于作者:dbtan 原文链接:http://www.dbtan.com/2009/12/vsql-and-vsqlarea-view.html v$sql和v$sqlarea视图: 上文提到,v$sqlarea和v$sql两个视图的不同之处在于,v$sql中为每一条SQL保留一个条目,而v$sqlarea中根据sql_text进行group by,通过version_count计算子指针的个数.下面对这个问题进行一点延伸探讨. 首先介绍一下v$sql视图,v$sql视图列举了共享SQL区(S

poj 2762 Going from u to v or from v to u? trajan+拓扑

Going from u to v or from v to u? Description In order to make their sons brave, Jiajia and Wind take them to a big cave. The cave has n rooms, and one-way corridors connecting some rooms. Each time, Wind choose two rooms x and y, and ask one of thei

POJ 2762 Going from u to v or from v to u?(强连通分量+拓扑排序)

职务地址:id=2762">POJ 2762 先缩小点.进而推断网络拓扑结构是否每个号码1(排序我是想不出来这点的. .. ).由于假如有一层为2的话,那么从此之后这两个岔路的点就不可能从一点到还有一点的. 代码例如以下: #include <iostream> #include <string.h> #include <math.h> #include <queue> #include <algorithm> #include

POJ 2762 Going from u to v or from v to u? (有向图求单连通性)

POJ 2762 Going from u to v or from v to u? 链接:http://poj.org/problem?id=2762 题意:为了让他们的儿子变得更勇敢些,Jiajia 和Wind 将他们带到一个大洞穴中.洞穴中有n 个房间,有一些单向的通道连接某些房间.每次,Wind 选择两个房间x 和y,要求他们的一个儿子从一个房间走到另一个房间,这个儿子可以从x 走到y,也可以从y 走到x.Wind 保证她布置的任务是可以完成的,但她确实不知道如何判断一个任务是否可以完成

POJ 2762 Going from u to v or from v to u? (判断弱连通)

http://poj.org/problem?id=2762 题意:给出有向图,判断任意两个点u和v,是否可以从u到v或者从v到u. 思路: 判断图是否是弱连通的. 首先来一遍强连通缩点,重新建立新图,接下来我们在新图中找入度为0的点,入度为0的点只能有1个,如果有多个那么这些个点肯定是不能相互到达的. 如果只有一个入度为0的点,走一遍dfs判断新图是否是单链,如果有分支,那么分支上的点肯定是不能相互到达的. 1 #include<iostream> 2 #include<algorit

[ tarjan + dfs ] poj 2762 Going from u to v or from v to u?

题目链接: http://poj.org/problem?id=2762 Going from u to v or from v to u? Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 14546   Accepted: 3837 Description In order to make their sons brave, Jiajia and Wind take them to a big cave. The cav

poj 2762 Going from u to v or from v to u? (判断是否是弱联通图)

题意:给定一个有向图有m条单向边,判断是否任意两点都可达(a能到b或者b能到a或者互相可达),即求 弱联通分量. 算法: 先缩点求强连通分量.然后重新建图,判断新图是否是一条单链,即不能分叉,如果分叉了就会存在不可达的情况. 怎么判断是否是单链呢? 就是每次入度为0的点都只有一个,即每次队列里只有一个点. (    o(╯□╰)o.....好像已经是第二次用pair记录原图的点对,然后存pair的vector忘记清空导致wa来wa去! ) #include<cstdio> #include&l