标签:target class tor script v-model 计算 eth method upd
<template> <div> <input type="text" :value=‘$store.state.message‘ @input=‘updateMessage‘> </div> </template> <script> export default { methods:{ updateMessage(e){ this.$store.commit(‘updateMessage‘,e.target.value) } } } </script>
<template> <div> <input type="text" v-model="message"> </div> </template> <script> export default { computed:{ message:{ get(){ return this.$store.state.message }, set(value){ this.$store.commit(‘updateMessage‘,value) } } } } </script>
标签:target class tor script v-model 计算 eth method upd
原文地址:https://www.cnblogs.com/zhenjianyu/p/13601919.html