<!--
 * @Author: Kane
 * @Date: 2023-01-06 19:05:53
 * @LastEditors: Kane
 * @LastEditTime: 2023-01-08 19:26:26
 * @FilePath: \admin_system\src\views\news\NewsEdit.vue
 * @Description: 
 * 
 * Copyright (c) ${2022} by Kane, All Rights Reserved. 
-->
<template>
    信息编辑:{{ getCount }}
    <br>
    <el-button type="danger" @click="this.add">计数加一</el-button>
    <SvgIcon icon="house"></SvgIcon>
</template>

<script>
//import { ElMessage } from 'element-plus';

export default {
    name: "NewsEdit",
    data()
    {
        return {
            store: null,
        };
    },
    computed: {
        getCount()
        {
            return this.$store.state.app.count;
        },
    },
    methods: {
        add()
        {
            let count = this.store.state.app.count + 1;

            this.store.commit("app/SET_COUNT", count);
        },
    },
    created()
    {
        this.store = this.$store;
    }
};
</script>

<style scoped>

</style>