
vuex
文章平均质量分 64
qq_42750608
前端
展开
-
vue3使用vuex的示例(模块化功能)
vue3使用vuex的示例(模块化功能)原创 2023-11-11 14:00:41 · 1041 阅读 · 0 评论 -
通过vuex控制vue缓存页面
首先是主要逻辑文件=>vuex页面keepAliveCtrls.js:const state = { include_arr: []}const getters = { get_clude_arr: state_ => state_.include_arr}const mutations = { setinclude_arr(state_,data) { state_.include_arr = data }}const actions = { add_ro原创 2020-09-07 20:35:00 · 570 阅读 · 0 评论 -
vue3怎么简单地做成多页面
首先是vue.config.js--主要是在module.exports中加入pages的配置(最重要的一点):module.exports = { pages: { index: { // page 的入口 entry: "src/views/index/main.js", // 模板来源 template: "public/index.html", // 在 dist/index.html 的输出 filename原创 2020-09-01 14:58:58 · 2503 阅读 · 0 评论 -
vuex写一个loading动画的显示与隐藏控制
首先是store目录,目录结构如下:index.js// 组装模块并导出 store 的地方import Vue from 'vue'import Vuex from 'vuex'import loading from './modules/loading'Vue.use(Vuex)export default new Vuex.Store({ modules: { loading, }, strict: process.env.NODE_ENV !== 'p原创 2020-09-01 02:35:53 · 747 阅读 · 0 评论