Browse Source

fix(system): FormModal 一直为编辑状态

main
刘凯 1 year ago
parent
commit
543034b919
  1. 2
      src/views/system/dept/DeptFormModal.vue
  2. 2
      src/views/system/dept/index.vue
  3. 2
      src/views/system/menu/MenuFormModal.vue
  4. 2
      src/views/system/menu/index.vue
  5. 2
      src/views/system/role/RoleFormModal.vue
  6. 2
      src/views/system/role/index.vue
  7. 2
      src/views/system/tenant/TenantFormModal.vue
  8. 2
      src/views/system/tenant/index.vue
  9. 2
      src/views/system/user/UserFormModal.vue
  10. 2
      src/views/system/user/index.vue

2
src/views/system/dept/DeptFormModal.vue

@ -50,9 +50,9 @@ async function handleSubmit() {
<BasicModal
v-bind="$attrs"
:title="isUpdate ? t('action.edit') : t('action.create')"
:after-close="() => isUpdate = false"
@register="registerModal"
@ok="handleSubmit"
@cancel="isUpdate = false"
>
<BasicForm @register="registerForm" />
</BasicModal>

2
src/views/system/dept/index.vue

@ -65,7 +65,7 @@ async function handleDelete(id: string) {
<div>
<BasicTable :api="async () => ([] as Department[])" @register="register">
<template #tableTitle>
<a-button type="primary" @click="openModal(true)">
<a-button type="primary" @click="openModal">
<PlusOutlined />
{{ t('action.create') }}
</a-button>

2
src/views/system/menu/MenuFormModal.vue

@ -46,9 +46,9 @@ async function handleSubmit() {
<BasicModal
v-bind="$attrs"
:title="isUpdate ? '编辑' : '新建'"
:after-close="() => isUpdate = false"
@register="registerModal"
@ok="handleSubmit"
@cancel="isUpdate = false"
>
<BasicForm @register="registerForm" @submit="handleSubmit" />
</BasicModal>

2
src/views/system/menu/index.vue

@ -66,7 +66,7 @@ function refreshMenu() {
<BasicTable :api="async () => ([] as MenuItem[])" @register="register">
<template #tableTitle>
<Space>
<a-button type="primary" @click="openModal(true)">
<a-button type="primary" @click="openModal">
<PlusOutlined />
新增
</a-button>

2
src/views/system/role/RoleFormModal.vue

@ -47,9 +47,9 @@ async function handleSubmit() {
<BasicModal
v-bind="$attrs"
:title="isUpdate ? '编辑' : '新增'"
:after-close="() => isUpdate = false"
@register="registerModal"
@ok="handleSubmit"
@cancel="isUpdate = false"
>
<BasicForm @register="registerForm" />
</BasicModal>

2
src/views/system/role/index.vue

@ -68,7 +68,7 @@ async function handleDelete(id: string) {
<div>
<BasicTable :api="async () => ([] as Role[])" @register="registerTable">
<template #tableTitle>
<a-button type="primary" @click="openFormModal(true)">
<a-button type="primary" @click="openFormModal">
<PlusOutlined />
新建
</a-button>

2
src/views/system/tenant/TenantFormModal.vue

@ -43,9 +43,9 @@ async function handleSubmit() {
<BasicModal
v-bind="$attrs"
:title="isUpdate ? '编辑' : '新增'"
:after-close="() => isUpdate = false"
@register="registerModal"
@ok="handleSubmit"
@cancel="isUpdate = false"
>
<BasicForm @register="registerForm" />
</BasicModal>

2
src/views/system/tenant/index.vue

@ -44,7 +44,7 @@ async function handleDelete(id: string) {
<div>
<BasicTable :api="async () => ([] as Tenant[])" @register="registerTable">
<template #tableTitle>
<a-button type="primary" @click="openModal(true)">
<a-button type="primary" @click="openModal">
<PlusOutlined />
新建
</a-button>

2
src/views/system/user/UserFormModal.vue

@ -47,9 +47,9 @@ async function handleSubmit() {
<BasicModal
v-bind="$attrs"
:title="isUpdate ? t('action.edit') : t('action.create')"
:after-close="() => isUpdate = false"
@register="registerModal"
@ok="handleSubmit"
@cancel="isUpdate = false"
>
<BasicForm @register="registerForm" />
</BasicModal>

2
src/views/system/user/index.vue

@ -50,7 +50,7 @@ async function handleDelete(id: string) {
<div>
<BasicTable :api="async () => ([] as SystemUser[])" @register="registerTable">
<template #tableTitle>
<a-button type="primary" @click="openModal(true)">
<a-button type="primary" @click="openModal">
<PlusOutlined />
{{ t('action.create') }}
</a-button>

Loading…
Cancel
Save