|
|
@@ -33,7 +33,7 @@ |
|
|
|
<div class="subBtn" @click="submit()">
|
|
|
|
{{ characters == 1 ? '提交' : 'Submit' }}
|
|
|
|
</div> -->
|
|
|
|
<el-form ref="form" :rules="characters == 1 ? rules : rulesEnglish" :model="form">
|
|
|
|
<el-form v-if="showForm" ref="form" :rules="rules1" :model="form">
|
|
|
|
<el-form-item class="width" prop="userName">
|
|
|
|
<el-input v-model="form.userName" maxlength="10" :placeholder="characters == 1 ? '姓名' : 'Name'"></el-input>
|
|
|
|
</el-form-item>
|
|
|
@@ -195,7 +195,9 @@ export default { |
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
rules1: null,
|
|
|
|
showForm: true
|
|
|
|
};
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
@@ -248,10 +250,27 @@ export default { |
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
this.rules1 = this.rules;
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState({
|
|
|
|
characters: state => state.publicObj.characters
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
characters: function (newValue) {
|
|
|
|
this.showForm = false;
|
|
|
|
if (newValue === 1) {
|
|
|
|
this.rules1 = this.rules;
|
|
|
|
} else {
|
|
|
|
this.rules1 = this.rulesEnglish;
|
|
|
|
}
|
|
|
|
setTimeout(() => {
|
|
|
|
this.showForm = true;
|
|
|
|
}, 100);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|