上一页 1 2 3 4 5 6 ··· 59 下一页
摘要: JSON数据两端要么是{},要么是[] {}定义JSON对象 []定义JSON数组 JSON对象的格式是: {key:value,key:value,...,key:value} JOSN数组的格式是: [value,value,...,value] 阅读全文
posted @ 2024-02-20 21:28 学无边涯 阅读(30) 评论(0) 推荐(0)
摘要: JSON一般有两种格式 (1)对象格式(单个json) { "brand":"苹果", "price":6799, "supportDualSIM":true, "supportNetwork":["5G","4G","3G","2G"]} (2)数组对象格式(多个json)[ { model:'i 阅读全文
posted @ 2024-02-20 19:42 学无边涯 阅读(105) 评论(0) 推荐(0)
摘要: javascript是合法的 JSON["one", "two", "three"] { "one": 1, "two": 2, "three": 3 } {"names": ["张三", "李四"] } [ { "name": "张三"}, {"name": "李四"} ] 阅读全文
posted @ 2024-02-20 19:34 学无边涯 阅读(14) 评论(0) 推荐(0)
摘要: javascript对象用{} 可以存放任意类型数据 <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta na 阅读全文
posted @ 2024-02-20 19:27 学无边涯 阅读(19) 评论(0) 推荐(0)
摘要: 1,var var是函数级别的作用域 2,let let是块级的作用域(花括号) let 不存在变量提升 阅读全文
posted @ 2024-02-15 20:16 学无边涯 阅读(14) 评论(0) 推荐(0)
摘要: 父组件import {provide, ref} from 'vue' provide('data-key', 'this is room data')子组件 import { inject } from "vue"; const roomData = inject('data-key') 阅读全文
posted @ 2024-02-15 19:50 学无边涯 阅读(5) 评论(0) 推荐(0)
摘要: <template> <div> <h1>{{ message }}</h1> <button @click="btnclick">点击</button> </div> </template> <script> export default{ data(){ return{ message:'hel 阅读全文
posted @ 2024-02-15 10:07 学无边涯 阅读(13) 评论(0) 推荐(0)
摘要: app.vue <template> <h1>插槽知识</h1> <SmallSlot> <template #header> <div> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </div> </template> <template #main=" 阅读全文
posted @ 2024-02-15 09:59 学无边涯 阅读(15) 评论(0) 推荐(0)
摘要: vue 具名插槽slot 为插槽取名字 app.vue <template> <h1>插槽知识</h1> <SmallSlot> <template #header> <div> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </div> </templat 阅读全文
posted @ 2024-02-15 09:46 学无边涯 阅读(36) 评论(0) 推荐(0)
摘要: vue 插槽slot 父组件为子组件传递html结构 app.vue <template> <h1>插槽知识</h1> <SmallSlot> <div> <ul> <li>1</li> <li>2</li> <li>3</li> </ul> </div> </SmallSlot> </templa 阅读全文
posted @ 2024-02-15 09:39 学无边涯 阅读(16) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 59 下一页