Browse Source

setfoucs

master
pengjun 2 years ago
parent
commit
64e19a2f3a
  1. 19
      src/views/basic-dictionary/BirthPlace.vue

19
src/views/basic-dictionary/BirthPlace.vue

@ -366,6 +366,7 @@ export default {
},
//
edit(row) {
this.resetFields()
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
@ -373,8 +374,11 @@ export default {
this.title = 2;
// this.form = row;
this.dialogVisible = true;
this.getFocus();
}
},
//
addoredit() {
this.$refs.form.validate((v) => {
@ -420,15 +424,26 @@ export default {
//
add() {
this.form = { ...this.curRow };
this.dialogVisible = true;
this.title = 1;
this.form = {};
this.resetFields();
this.getFocus();
},
getFocus(){
this.$nextTick(() => {
this.$refs.refinput.focus();
});
},
//
resetFields(){
this.$nextTick(() => {
this.$refs.form.resetFields();
});
},
getlist() {
nativeplacelist(this.pages).then((res) => {
this.initTableData = [...res.data.items];

Loading…
Cancel
Save