mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-04-05 07:43:25 +08:00
🐛fix: #ID31JE 代码生成器生成的模板,新增修改后直接调整为查询列表
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<permission-btn v-on:btn-event="onBtnClicked"></permission-btn>
|
||||
</sticky>
|
||||
<auth-table ref="mainTableRef" :select-type="'checkbox'" :table-fields="headerList" :data="list"
|
||||
:v-loading="listLoading" @row-click="rowClick" @selection-change="handleSelectionChange"></auth-table>
|
||||
:loading="listLoading" @row-click="rowClick" @selection-change="handleSelectionChange"></auth-table>
|
||||
<el-pagination v-show="total > 0" :total="total" v-model:currentPage="listQuery.page"
|
||||
v-model:page-size="listQuery.limit" @current-change="handleCurrentChange" />
|
||||
</div>
|
||||
@@ -172,7 +172,7 @@ const handleCreate = async function () {
|
||||
const createData = function () {
|
||||
dataFormRef.value.validate(() => {
|
||||
{TableName}s.add(temp).then(() => {
|
||||
list.value.unshift(temp)
|
||||
getList()
|
||||
dialogFormVisible.value = false
|
||||
ElNotification.success('创建成功')
|
||||
})
|
||||
@@ -189,13 +189,7 @@ const updateData = function () {
|
||||
dataFormRef.value.validate(() => {
|
||||
const tempData = Object.assign({}, temp)
|
||||
{TableName}s.update(tempData).then(() => {
|
||||
for (const v of list.value) {
|
||||
if (v.id === temp.id) {
|
||||
const index = list.value.indexOf(v)
|
||||
list.value.splice(index, 1, temp)
|
||||
break
|
||||
}
|
||||
}
|
||||
getList()
|
||||
dialogFormVisible.value = false
|
||||
ElNotification.success('更新成功')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user