首页 > 其他分享 >vue-project-------(模板语法,属性绑定)

vue-project-------(模板语法,属性绑定)

时间:2023-11-07 23:03:12浏览次数:37  
标签:project IfDemo vue EventDemo ------- components 语法 import

<template>

  <h3>模板语法</h3>
  <p>{{msg}}</p>
  <p>{{number+1}}</p>
  <p>{{flag? 'yes':'no'}}</p>
  <p>{{message.split("").reverse().join("")}}</p>
  <p v-html="rawHtml"></p>
  <div v-bind:class="msg2">测试</div>
  <button :disabled="flag">确认</button>
  <div v-bind="apple">测试2</div>
  <IfDemo/>
  <ListDemo></ListDemo>
  <EventDemo></EventDemo>
</template>
<script>
import IfDemo from "@/components/IfDemo.vue";
import ListDemo from "@/components/listDemo.vue";
import EventDemo from "@/components/EventDemo.vue";
export default {
  components: {EventDemo, ListDemo, IfDemo},
  data() {
    return{
      msg:"神奇的语法",
      number :10,
      flag :false,
      message:"大家好",
      rawHtml:"<a href='https://www.baidu.com/'>百度</a>",
      msg2:"active",
      apple:{
        class: "appleClass",
        id:"appleId"
      }
    }

  }
}
</script>

标签:project,IfDemo,vue,EventDemo,-------,components,语法,import
From: https://www.cnblogs.com/lin513/p/17816286.html

相关文章

  • vue-test -----ListDemo 列表渲染
    <template><h3>数组</h3><button@click="addnums">添加数据</button><pv-for="(item,index)innums":key="index">{{item}}</p></template><script>exportdefault{name:......
  • vue-test ------class绑定
    <template><p:class="{'active':isActive}">Class样式绑定</p><p:class="Objec">Class样式绑定</p><p:class="[arrActive,arrHasErr]">Class样式绑定3</p><p:class="isActive......
  • vue-test --------事件修饰符
    <template><h3>事件修饰符</h3><a@click="clickHandle"href="www.baidu.com">百度</a><div@click="clickDiv"><p@click="clickP">测试冒泡</p></div></template&......
  • vue-test --------模板引用
    <template><inputtype="text"v-model.lazy="message"><div>{{message}}</div><inputtype="checkbox"v-model="flag"><div>{{flag}}</div></template><script......
  • vue-test --------ref
    <template><divref="contain">{{content}}</div><button@click="getElemet">获取元素</button><inputtype="text"ref="username"></template><script>exportdefault{......
  • 学生毕业管理系统-计算机毕业设计源码+LW文档
    摘 要对学生毕业管理的流程进行科学整理、归纳和功能的精简,通过软件工程的研究方法,结合当下流行的互联网技术,最终设计并实现了一个简单、易操作的学生毕业管理小程序。内容包括系统的设计思路、系统模块和实现方法。系统使用过程主要涉及到管理员,教师和学生三种角色,主要包含系统......
  • 表格-跨行跨列
         ......
  • Seata分布式事务框架-AT模式与TCC模式介绍
    SeataAT事务方案Seata的AT模式(AutomaticTransaction)是一种无侵入的分布式事务解决方案。下面结合具体业务场景来分析其执行的原理。业务场景订单系统当用户下订单时,执行以下三步流程:订单系统保存订单订单系统调用库存服务,减少商品库存订单系统调用账户服务,扣减用户金额......
  • 冰橙Ai- ChatGPT开放接口最新版4.0 1106接口 gpt-4-1106-preview gpt-3.5-turbo-1106
    冰橙Ai-ChatGPT开放接口最新版4.01106接口gpt-4-1106-previewgpt-3.5-turbo-1106 图像生成DALL·E3多模态接口冰橙GPTchatGPT开放接口使用说明 【接入了腾讯云内容安全检测】冰橙GPT稳定提供API接口服务定时有人进行问题排查处理1小时内问题响应接入了腾讯云的内......
  • Configuration failed because libxml-2.0 was not found. Try installing:
     001、linux中R语言中安装“devtools”报错如下:Configurationfailedbecauselibxml-2.0wasnotfound.Tryinstalling: 002、解决方法:[root@pc1~]#yuminstalllibxml2-devel##根据提示安装 。 ......