1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import Vue = require("vue");
- import {
- mapState,
- mapGetters,
- mapActions,
- mapMutations
- } from "../index";
- new Vue({
- computed: Object.assign({},
- mapState(["a"]),
- mapState({
- b: "b"
- }),
- mapState({
- c: (state: any, getters: any) => state.c + getters.c
- }),
- mapGetters(["d"]),
- mapGetters({
- e: "e"
- }),
- {
- otherComputed () {
- return "f";
- }
- }
- ),
- methods: Object.assign({},
- mapActions(["g"]),
- mapActions({
- h: "h"
- }),
- mapMutations(["i"]),
- mapMutations({
- j: "j"
- }),
- {
- otherMethod () {}
- }
- )
- });
|