保存进度!

This commit is contained in:
Kane Wang 2023-01-08 11:52:15 +08:00
parent 922fb4ca4a
commit aa20111600
3 changed files with 32 additions and 15 deletions

View File

@ -1,14 +1,18 @@
import { createStore } from 'vuex'
/*
* @Author: Kane
* @Date: 2022-12-14 15:12:46
* @LastEditors: Kane
* @LastEditTime: 2023-01-08 11:07:02
* @FilePath: \admin_system\src\store\index.js
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
import { createStore } from 'vuex';
import app from "./modules/app";
export default createStore({
state: {
},
getters: {
},
mutations: {
},
actions: {
},
modules: {
app,
}
})
});

View File

@ -2,13 +2,15 @@
* @Author: Kane
* @Date: 2023-01-07 22:25:43
* @LastEditors: Kane
* @LastEditTime: 2023-01-07 22:26:51
* @LastEditTime: 2023-01-08 11:11:07
* @FilePath: \admin_system\src\store\modules\app.js
* @Description: app模块
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
*/
const state = {};
const state = {
count: 100,
};
const getters = {};
const mutations = {};
const actions = {};

View File

@ -2,20 +2,31 @@
* @Author: Kane
* @Date: 2023-01-06 19:05:53
* @LastEditors: Kane
* @LastEditTime: 2023-01-07 17:12:25
* @LastEditTime: 2023-01-08 11:18:12
* @FilePath: \admin_system\src\views\news\NewsEdit.vue
* @Description:
*
* Copyright (c) ${2022} by Kane, All Rights Reserved.
-->
<template>
信息编辑
信息编辑:{{ getCount }}
<br>
<SvgIcon icon="house"></SvgIcon>
</template>
<script>
import { useStore } from "vuex";
export default {
name: "NewsEdit"
name: "NewsEdit",
computed: {
getCount()
{
const store = useStore();
return store.state.app.count;
},
},
};
</script>