摘要:
javascript对象用{} 可以存放任意类型数据 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta na 阅读全文
摘要:
1,var var是函数级别的作用域 2,let let是块级的作用域(花括号) let 不存在变量提升 阅读全文
摘要:
父组件import {provide, ref} from 'vue' provide('data-key', 'this is room data')子组件 import { inject } from "vue"; const roomData = inject('data-key') 阅读全文
摘要:
<template> <div> <h1>{{ message }}</h1> <button @click="btnclick">点击</button> </div> </template> <script> export default{ data(){ return{ message:'hel 阅读全文
摘要:
app.vue <template> <h1>插槽知识</h1> <SmallSlot> <template #header> <div> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </div> </template> <template #main=" 阅读全文
摘要:
vue 具名插槽slot 为插槽取名字 app.vue <template> <h1>插槽知识</h1> <SmallSlot> <template #header> <div> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </div> </templat 阅读全文
摘要:
vue 插槽slot 父组件为子组件传递html结构 app.vue <template> <h1>插槽知识</h1> <SmallSlot> <div> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </div> </SmallSlot> </templa 阅读全文
摘要:
App.vue <template> <ConpentA @paEvent="clickData"/> {{ mes }} </template> <script> import ConpentA from './components/ConpentA.vue'; export default{ d 阅读全文
摘要:
Props 静态属性 <template> <div> <ConpentA title="我是静态props"/> </div> </template> <script> import ConpentA from './components/ConpentA.vue' export default 阅读全文
摘要:
<template> <div> <div ref="username" >内容</div> <button @click="handleclick">按钮</buttom> </div> </template> <script> export default { methods:{ handlec 阅读全文