编辑弹窗点击门窗消失问题处理

This commit is contained in:
Jason 2022-09-15 14:17:58 +08:00
parent b23ce97102
commit 867845a2dd
14 changed files with 161 additions and 179 deletions

View File

@ -26,7 +26,7 @@
</el-select> </el-select>
<el-input <el-input
v-else v-else
v-model="inputValue" v-model.trim="inputValue"
:type="type" :type="type"
size="small" size="small"
:placeholder="placeholder" :placeholder="placeholder"

View File

@ -78,7 +78,7 @@ export default defineComponent({
clickModalClose: { clickModalClose: {
// //
type: Boolean, type: Boolean,
default: true default: false
}, },
center: { center: {
// //

View File

@ -5,7 +5,6 @@
:title="popupTitle" :title="popupTitle"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >

View File

@ -45,7 +45,7 @@
}, },
{ {
label: '女', label: '女',
value: 0 value: 2
} }
]" ]"
@confirm="handleEdit($event, 'sex')" @confirm="handleEdit($event, 'sex')"
@ -79,6 +79,7 @@
import type { FormInstance } from 'element-plus' import type { FormInstance } from 'element-plus'
import { getUserDetail, userEdit } from '@/api/consumer' import { getUserDetail, userEdit } from '@/api/consumer'
import feedback from '@/utils/feedback' import feedback from '@/utils/feedback'
import { isEmpty } from '@/utils/util'
const route = useRoute() const route = useRoute()
const formData = reactive({ const formData = reactive({
@ -108,7 +109,7 @@ const getDetails = async () => {
} }
const handleEdit = async (value: string, field: string) => { const handleEdit = async (value: string, field: string) => {
if (!value) return if (isEmpty(value)) return
await userEdit({ await userEdit({
id: route.query.id, id: route.query.id,
field, field,

View File

@ -5,7 +5,6 @@
title="设置存储" title="设置存储"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >

View File

@ -5,7 +5,6 @@
:title="popupTitle" :title="popupTitle"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >
@ -72,14 +71,14 @@ const formData = reactive({
}) })
const checkMobile = (rule: any, value: any, callback: any) => { const checkMobile = (rule: any, value: any, callback: any) => {
if (!value) { if (!value) {
return callback(new Error('手机号不能为空')); return callback(new Error('手机号不能为空'))
} else { } else {
const reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/ const reg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/
console.log(reg.test(value)); console.log(reg.test(value))
if (reg.test(value)) { if (reg.test(value)) {
callback(); callback()
} else { } else {
return callback(new Error('请输入正确的手机号')); return callback(new Error('请输入正确的手机号'))
} }
} }
} }

View File

@ -5,7 +5,6 @@
:title="popupTitle" :title="popupTitle"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >

View File

@ -5,7 +5,6 @@
:title="popupTitle" :title="popupTitle"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >

View File

@ -5,11 +5,9 @@
:title="popupTitle" :title="popupTitle"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >
<el-scrollbar class="h-[400px] sm:h-[500px]">
<el-form ref="formRef" :model="formData" label-width="80px" :rules="formRules"> <el-form ref="formRef" :model="formData" label-width="80px" :rules="formRules">
<el-form-item label="菜单类型" prop="menuType" required> <el-form-item label="菜单类型" prop="menuType" required>
<el-radio-group v-model="formData.menuType"> <el-radio-group v-model="formData.menuType">
@ -75,11 +73,7 @@
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="选中菜单" prop="p" v-if="formData.menuType == MenuEnum.MENU">
label="选中菜单"
prop="p"
v-if="formData.menuType == MenuEnum.MENU"
>
<div class="flex-1"> <div class="flex-1">
<el-input v-model="formData.selected" placeholder="请输入路由路径" /> <el-input v-model="formData.selected" placeholder="请输入路由路径" />
<div class="form-tips"> <div class="form-tips">
@ -155,9 +149,7 @@
<el-radio :label="0">正常</el-radio> <el-radio :label="0">正常</el-radio>
<el-radio :label="1">停用</el-radio> <el-radio :label="1">停用</el-radio>
</el-radio-group> </el-radio-group>
<div class="form-tips"> <div class="form-tips">选择停用则路由将不会出现在侧边栏也不能被访问</div>
选择停用则路由将不会出现在侧边栏也不能被访问
</div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="菜单排序" prop="menuSort"> <el-form-item label="菜单排序" prop="menuSort">
@ -167,7 +159,6 @@
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-scrollbar>
</popup> </popup>
</div> </div>
</template> </template>

View File

@ -5,7 +5,6 @@
title="权限设置" title="权限设置"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >

View File

@ -5,7 +5,6 @@
:title="popupTitle" :title="popupTitle"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >

View File

@ -5,7 +5,6 @@
:title="popupTitle" :title="popupTitle"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >

View File

@ -5,7 +5,6 @@
:title="popupTitle" :title="popupTitle"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >

View File

@ -5,7 +5,6 @@
title="设置存储" title="设置存储"
:async="true" :async="true"
width="550px" width="550px"
:clickModalClose="true"
@confirm="handleSubmit" @confirm="handleSubmit"
@close="handleClose" @close="handleClose"
> >