上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 51 下一页
摘要: 视频 逻辑复杂且跨组件使用 5.getters的使用 概念:当state中的数据需要经过加工后再使用时,可以使用getters加工。 在store.js中追加getters配置 ...... const getters = { bigSum(state){ return state.sum * 10 阅读全文
posted @ 2023-03-24 01:13 垂序葎草 阅读(55) 评论(0) 推荐(0)
摘要: 视频 4.基本使用 初始化数据、配置actions、配置mutations,操作文件store.js //引入Vue核心库 import Vue from 'vue' //引入Vuex import Vuex from 'vuex' //引用Vuex Vue.use(Vuex) const acti 阅读全文
posted @ 2023-03-24 00:52 垂序葎草 阅读(63) 评论(0) 推荐(0)
摘要: 视频 #Vuex版本 ##components ###Count.vue <template> <div> <!-- 模板里能看见vc上所有东西 --> <h1>当前求和为:{{$store.state.sum}}</h1> <select v-model.number="n"> <option v 阅读全文
posted @ 2023-03-23 22:52 垂序葎草 阅读(72) 评论(0) 推荐(0)
摘要: 视频 npm i vuex@3 3.搭建vuex环境 创建文件:src/store/index.js //引入Vue核心库 import Vue from 'vue' //引入Vuex import Vuex from 'vuex' //应用Vuex插件 Vue.use(Vuex) //准备acti 阅读全文
posted @ 2023-03-23 22:35 垂序葎草 阅读(58) 评论(0) 推荐(0)
摘要: Vuex原理解析视频107 传参带数据允许走这条线 store管理 阅读全文
posted @ 2023-03-23 22:01 垂序葎草 阅读(91) 评论(0) 推荐(0)
摘要: 纯Vue实现视频106 #纯Vue版本 ##components ###Count.vue <template> <div> <h1>当前求和为:{{sum}}</h1> <select v-model.number="n"> <!-- 收集到的是字符串类型, v-model.number="n"强 阅读全文
posted @ 2023-03-23 22:01 垂序葎草 阅读(154) 评论(0) 推荐(0)
摘要: 简介视频 阅读全文
posted @ 2023-03-23 22:00 垂序葎草 阅读(29) 评论(0) 推荐(0)
摘要: 视频 #components ##Categray.vue <template> <div class="category"> <h3>{{title}}分类</h3> <slot :games="games" msg="hello">我是默认的一些内容</slot> </div> </templa 阅读全文
posted @ 2023-03-23 10:23 垂序葎草 阅读(52) 评论(0) 推荐(0)
摘要: 视频 #components ##Categray.vue <template> <div class="category"> <h3>{{title}}分类</h3> <!-- 定义一个插槽(挖个坑,等着组件的使用者进行填充) --> <slot name="center">我是一些默认值,当使用 阅读全文
posted @ 2023-03-22 21:34 垂序葎草 阅读(44) 评论(0) 推荐(0)
摘要: 默认插槽视频 #components ##Categray.vue <template> <div class="category"> <h3>{{title}}分类</h3> <!-- 定义一个插槽(挖个坑,等着组件的使用者进行填充) --> <slot>我是一些默认值,当使用者没有传递具体结构时 阅读全文
posted @ 2023-03-22 21:26 垂序葎草 阅读(36) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 51 下一页