提交 320e941d 编写于 作者: C Captain.B

create project

上级 6209a5f9
......@@ -44,7 +44,7 @@
</div>
</el-card>
<el-dialog :title="$t('project.create')" :visible.sync="createVisible">
<el-dialog :title="$t('project.create')" :visible.sync="createVisible" @close="close">
<el-form :model="form" :rules="rules" ref="form" label-position="left" label-width="100px" size="small">
<el-form-item :label="$t('commons.name')">
<el-input v-model="form.name" autocomplete="off"></el-input>
......@@ -87,19 +87,8 @@
},
}
},
watch: {
'$route'() {
let isCreate = this.$route.query.isCreate;
if (isCreate) {
this.createVisible = true;
}
}
},
mounted() {
let isCreate = this.$route.query.isCreate;
if (isCreate) {
this.createVisible = true;
}
this.createVisible = this.$route.query.isCreate;
this.list();
},
destroyed() {
......@@ -114,6 +103,10 @@
this.createVisible = true;
this.form = Object.assign({}, row);
},
close() {
let query = {};
this.$router.push({query});
},
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册