上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 64 下一页
摘要: 很重要? 组件:把一个大项目分成多个小项目,每个小项目打包成 组件,把这些组件合起来就是完整的大项目 可复用性 <script > // 第一步,导入组件 import MyComponent from './components/MyComponent.vue'; // 第二步,注入组件 expo 阅读全文
posted @ 2023-10-17 11:20 被占用的小海海 阅读(4) 评论(0) 推荐(0) 编辑
摘要: ref:referrence,引用 没事不要直接操作dom,就那三一般也够用了 阅读全文
posted @ 2023-10-17 10:46 被占用的小海海 阅读(2) 评论(0) 推荐(0) 编辑
摘要: <template> <h3>表单输入绑定</h3> <form action=""> <input type="text" v-model="message"> <p>{{ message }}</p> </form> </template> <script > export default{ d 阅读全文
posted @ 2023-10-17 10:09 被占用的小海海 阅读(9) 评论(0) 推荐(0) 编辑
摘要: 侦听页面 响应式数据变化: {{ }} , data的数据 // 第一步,导入组件 // import MyComponent from './components/MyComponent.vue'; // import Parent from './components/Parent.vue'; 阅读全文
posted @ 2023-10-17 09:51 被占用的小海海 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 10-16 周一 结束周末,重新开始学习 早上一节课,还摆烂了,全称看漫画,还好课不是很重要,没讲课,做题目,之后补回来就行 中午下午没课,看vue 晚上Linux,回来vue + 随便一道leetcode “汉明距离” 看了 7节vue,花了两三个钟应该是有的。诶呀 语文:春宵一刻值千金,春天的夜 阅读全文
posted @ 2023-10-17 00:12 被占用的小海海 阅读(68) 评论(0) 推荐(0) 编辑
摘要: 和class绑定差不多,用来操作动态css 实际上,了解即可,实际应用还是 class 绑定居多 :style="" 绑定对象 绑定数组(不推荐) 阅读全文
posted @ 2023-10-16 23:06 被占用的小海海 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 初学阶段,这玩意看得懂就行了 目的:操作class属性,与css 配合使用 对象绑定: 单个对象: :class={ } 多个对象: :class="ObjectClass" 数组绑定 :class=[] 对象与数组的结合使用 只能数组嵌套对象,不能反着来 阅读全文
posted @ 2023-10-16 22:46 被占用的小海海 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 复杂的逻辑表达式不要在模板上写,通过 “计算属性”:computed: 。 和 method 的区别 <template> <h3>计算属性</h3> <p>{{ msg "zhan" ? 'yes':'no' }}- 模块内的运算</p> <p>{{ name }}- 计算属性</p> <p>{{ 阅读全文
posted @ 2023-10-16 22:07 被占用的小海海 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 这节课讲的是 数组的变化的 两种情况 1.变更:可以自动更新UI 2.替换数组 <template></template> <h3>数组变化侦听</h3> <button @click="AddArrayList">数组添加元素</button> <p v-for="(item,index) of 阅读全文
posted @ 2023-10-16 21:39 被占用的小海海 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 简化代码 事件修饰符:也是事件处理的代码 @click.prevent : .prevent 阻止默认事件 .stop阻止冒泡事件(就是内外元素触发事件的问题) 阅读全文
posted @ 2023-10-16 21:32 被占用的小海海 阅读(5) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 64 下一页