1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/zce-vue-admin

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
vuex.vue 1 КБ
Копировать Редактировать Исходные данные Просмотреть построчно История
iceStone Отправлено 8 лет назад 5a3d0ea
<template>
<div class="inner">
<div class="heading">
<h1 class="title">Vuex - Counter</h1>
</div>
<h2>{{ count }}</h2>
<div class="actions">
<button @click="increment">INC</button>
<button @click="incrementAsync">INC ASYNC</button>
<button @click="decrement">DEC</button>
<button @click="decrementAsync">DEC ASYNC</button>
</div>
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex'
export default {
name: 'demo-vuex',
computed: mapGetters({
count: 'count'
}),
methods: mapActions({
increment: 'increment',
incrementAsync: 'incrementAsync',
decrement: 'decrement',
decrementAsync: 'decrementAsync'
})
}
</script>
<style scoped>
h2 {
width: 20rem;
margin: 2rem auto;
padding: 5rem;
font-size: 10rem;
text-align: center;
background-color: #e0e0e0;
}
.actions {
display: flex;
width: 20rem;
margin: 2rem auto;
justify-content: space-around;
}
</style>

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/zce-vue-admin.git
git@gitlife.ru:oschina-mirror/zce-vue-admin.git
oschina-mirror
zce-vue-admin
zce-vue-admin
v0.1.0