tweak code

This commit is contained in:
Pan 2018-09-27 10:24:38 +08:00
parent 24c29aeded
commit 64e4ae7330
1 changed files with 1 additions and 2 deletions

View File

@ -111,8 +111,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">{{ $t('table.cancel') }}</el-button>
<el-button v-if="dialogStatus=='create'" type="primary" @click="createData">{{ $t('table.confirm') }}</el-button>
<el-button v-else type="primary" @click="updateData">{{ $t('table.confirm') }}</el-button>
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">{{ $t('table.confirm') }}</el-button>
</div>
</el-dialog>