摘要: index.js import { createStore } from "vuex"; const store=createStore({ state:{ count:100 }, getters:{ compower(state){ return (id)=>state.count*id } } 阅读全文
posted @ 2024-02-13 22:28 学无边涯 阅读(11) 评论(0) 推荐(0) 编辑
摘要: index.js写法 import { createStore } from "vuex"; const store=createStore({ state:{ count:100 }, getters:{ compower(state){ return (id)=>state.count*id } 阅读全文
posted @ 2024-02-13 21:47 学无边涯 阅读(19) 评论(0) 推荐(0) 编辑
摘要: index.js 写法 import { createStore } from "vuex"; const store=createStore({ state:{ count:100 }, getters:{ compower(state){ return (id)=>state.count*id 阅读全文
posted @ 2024-02-13 21:13 学无边涯 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 1,createWebHistory 这种h5用法 localhost:// 2,createWebHashHistory 这种hash用法 路径会带# localhost:/#/ 阅读全文
posted @ 2024-02-13 16:29 学无边涯 阅读(558) 评论(0) 推荐(0) 编辑
摘要: 1,beforEach router.beforeach(to,from,next)=>{ console.log('1111') } 2,afterEach router.aftereach(to,from,next)=>{ console.log('222') } 阅读全文
posted @ 2024-02-13 10:39 学无边涯 阅读(173) 评论(0) 推荐(0) 编辑