保存进度!
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: Kane
|
||||
* @Date: 2022-11-22 17:50:49
|
||||
* @LastEditors: Kane
|
||||
* @LastEditTime: 2022-11-29 13:25:47
|
||||
* @LastEditTime: 2022-11-29 17:50:22
|
||||
* @FilePath: \hello-cli\src\App.vue
|
||||
* @Description:
|
||||
*
|
||||
@@ -10,9 +10,11 @@
|
||||
-->
|
||||
<template>
|
||||
<div class="content">
|
||||
<App1></App1>
|
||||
<App2></App2>
|
||||
<h1>学习vuex</h1>
|
||||
<div><App1></App1> <App2></App2></div>
|
||||
<el-button type="warning" @click="onClearCount">清零</el-button>
|
||||
</div>
|
||||
<hr />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -25,15 +27,23 @@ export default {
|
||||
App1,
|
||||
App2,
|
||||
},
|
||||
methods: {
|
||||
onClearCount() {
|
||||
this.$store.commit("clearCount");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
#app {
|
||||
background-color: #f4f5f7;
|
||||
}
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #f4f5f7;
|
||||
width: 40rem;
|
||||
margin: 0px auto;
|
||||
border-radius: 5px;
|
||||
@@ -47,4 +57,9 @@ export default {
|
||||
#app div > * + * {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
|
||||
hr {
|
||||
width: 100%;
|
||||
border: 1px solid 1px;
|
||||
}
|
||||
</style>
|
||||
|
Reference in New Issue
Block a user