Merge pull request 'main' (#106) from 616036448/Admin.NET.Pro:main into main
Reviewed-on: http://101.43.53.74:3000/Admin.NET/Admin.NET.Pro/pulls/106
This commit is contained in:
commit
0583cd21e5
@ -15,7 +15,7 @@
|
|||||||
}
|
}
|
||||||
<template>
|
<template>
|
||||||
<div class="@(@Model.LowerClassName)-container">
|
<div class="@(@Model.LowerClassName)-container">
|
||||||
<el-dialog v-model="state.isShowDialog" :width="800" draggable="" :close-on-click-modal="false">
|
<el-dialog v-model="state.isShowDialog" :width="800" draggable="" :close-on-click-modal="false" :before-close="cancel">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="color: #fff">
|
<div style="color: #fff">
|
||||||
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>
|
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>
|
||||||
@ -100,6 +100,9 @@
|
|||||||
@:<el-form-item label="@column.ColumnComment" prop="@(@column.LowerPropertyName)">
|
@:<el-form-item label="@column.ColumnComment" prop="@(@column.LowerPropertyName)">
|
||||||
@:<el-switch v-model="state.ruleForm.@(@column.LowerPropertyName)"
|
@:<el-switch v-model="state.ruleForm.@(@column.LowerPropertyName)"
|
||||||
@if(@column.NetType.StartsWith("int")){
|
@if(@column.NetType.StartsWith("int")){
|
||||||
|
@::active-value="1" :inactive-value="0"
|
||||||
|
}
|
||||||
|
@if(@column.NetType.StartsWith("string")){
|
||||||
@:active-value="1" inactive-value="0"
|
@:active-value="1" inactive-value="0"
|
||||||
}
|
}
|
||||||
@:active-text="是" inactive-text="否" />
|
@:active-text="是" inactive-text="否" />
|
||||||
@ -321,13 +324,20 @@ const openDialog = async (row: any) => {
|
|||||||
const closeDialog = () => {
|
const closeDialog = () => {
|
||||||
emit("reloadTable");
|
emit("reloadTable");
|
||||||
state.isShowDialog = false;
|
state.isShowDialog = false;
|
||||||
|
resetForm();
|
||||||
};
|
};
|
||||||
|
|
||||||
// 取消
|
// 取消
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
state.isShowDialog = false;
|
state.isShowDialog = false;
|
||||||
|
resetForm();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 重置表单
|
||||||
|
const resetForm = () => {
|
||||||
|
ruleFormRef.value.resetFields();
|
||||||
|
}
|
||||||
|
|
||||||
// 提交
|
// 提交
|
||||||
const submit = async () => {
|
const submit = async () => {
|
||||||
ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => {
|
ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user