📅  最后修改于: 2022-03-11 15:03:29.358000             🧑  作者: Mango
import { Action } from 'vuex-class'
@Component()
export default class UsersAdd extends Vue {
userName: string = "";
@Action('newUser')
newUser!: (newUser: string) => void
addUser() {
console.log("...adding new user");
this.newUser(this.userName);
}
}