🚑 2.4 优化与Bug修复

1、修复新增时 loading 失效的问题 #66
2、修复菜单图标为空时,表格渲染报错的问题 #65
3、修复新增详情时字典值不填报错的问题 #64
4、修复切换主题颜色时 header 操作按钮 margin-left 不正常的错误
5、修复切换主题颜色时日期搜索框宽度不正常的问题
6、编辑按钮加入 loading,避免重复提交
This commit is contained in:
Elune
2020-01-07 12:56:48 +08:00
parent f7c65d67ca
commit 3e500eed7d
17 changed files with 27 additions and 19 deletions

View File

@@ -1,6 +1,6 @@
<template>
<div>
<el-button v-permission="permission.edit" :disabled="disabledEdit" size="mini" type="primary" icon="el-icon-edit" @click="crud.toEdit(data)" />
<el-button v-permission="permission.edit" :loading="crud.status.cu === 2" :disabled="disabledEdit" size="mini" type="primary" icon="el-icon-edit" @click="crud.toEdit(data)" />
<el-popover v-model="pop" v-permission="permission.del" placement="top" width="180" trigger="manual" @show="onPopoverShow" @hide="onPopoverHide">
<p>{{ msg }}</p>
<div style="text-align: right; margin: 0">

View File

@@ -244,6 +244,7 @@ function CRUD(options) {
if (!callVmHook(crud, CRUD.HOOK.beforeSubmit)) {
return
}
crud.status.add = CRUD.STATUS.PROCESSING
crud.crudMethod.add(crud.form).then(() => {
crud.status.add = CRUD.STATUS.NORMAL
crud.resetForm()
@@ -251,6 +252,7 @@ function CRUD(options) {
callVmHook(crud, CRUD.HOOK.afterSubmit)
crud.toQuery()
}).catch(() => {
crud.status.add = CRUD.STATUS.PREPARED
callVmHook(crud, CRUD.HOOK.afterAddError)
})
},
@@ -261,6 +263,7 @@ function CRUD(options) {
if (!callVmHook(crud, CRUD.HOOK.beforeSubmit)) {
return
}
crud.status.edit = CRUD.STATUS.PROCESSING
crud.crudMethod.edit(crud.form).then(() => {
crud.status.edit = CRUD.STATUS.NORMAL
crud.getDataStatus(crud.form.id).edit = CRUD.STATUS.NORMAL
@@ -269,6 +272,7 @@ function CRUD(options) {
callVmHook(crud, CRUD.HOOK.afterSubmit)
crud.refresh()
}).catch(() => {
crud.status.edit = CRUD.STATUS.PREPARED
callVmHook(crud, CRUD.HOOK.afterEditError)
})
},