el-form-item style="margin-bottom: 0px" label="拆股人手机号">
<el-input
size="small"
v-model="form.mobile"
placeholder="请输入手机号"
@input="onInput"
></el-input>
</el-form-item>
<el-form-item style="margin-bottom: 0px" label="审核状态">
<el-select
placeholder="请选择"
v-model="form.examine"
clearable
@change="onChange"
>
<el-option label="待审核" value="0"></el-option>
<el-option label="通过" value="1"></el-option>
<el-option label="驳回" value="2"></el-option>
</el-select>
</el-form-item>
mounted() {
this.form.mobile = this.StockMobile;
this.form.examine = this.StockSelect;
this.getTableDate();
},
computed: {
StockMobile() {
return this.$store.state.tagsView.StockMobile;
},
StockSelect() {
return this.$store.state.tagsView.StockSelect;
},
},
methods: {
onInput() {
this.$store.dispatch("tagsView/is_mobile", this.form.mobile);
},
onChange() {
this.$store.dispatch("tagsView/is_select", this.form.examine);
},
}
store/tagsView.js vuex
const state = {
StockMobile: '',
StockSelect:"",
}
const mutations = {
IS_MOBILE: (state, view) => {
state.StockMobile = view
},
IS_SELECT: (state, view) => {
state.StockSelect = view
},
}
const actions = {
is_mobile({ commit }, view) {
commit('IS_MOBILE', view)
},
is_select({ commit }, view){
commit('IS_SELECT', view)
},
}
export default {
namespaced: true,
state,
mutations,
actions
}