| | |
| | | <template> |
| | | <div class="p-2"> |
| | | <el-dialog :title="dialog.title" v-model="dialog.visible" width="500px"> |
| | | <Dialog :title="dialog.title" v-model="dialog.visible" width="600px" :draggable="draggable"> |
| | | <el-form ref="formRef" :model="formData" :rules="formRules" label-width="80px" v-loading="formLoading"> |
| | | <el-form-item label="参数名称" prop="configName"> |
| | | <el-input v-model="formData.configName" placeholder="请输入参数名称"/> |
| | |
| | | <el-input v-model="formData.remark" type="textarea" placeholder="请输入内容"/> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="dialog-footer"> |
| | | <slot name="footer"> |
| | | <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button> |
| | | <template #footer> |
| | | <el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="dialog.visible = false">取 消</el-button> |
| | | </slot> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | | </Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | visible: false, |
| | | title: '' |
| | | }); |
| | | const resizable = ref(true) |
| | | const draggable = ref(true) |
| | | const isFullscreen = ref(false) |
| | | // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 |
| | | const formLoading = ref(false) |
| | | // 表单的类型:create - 新增;update - 修改 |