mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-25 16:25:07 +08:00
1. 统一化代码
2. 增加 DocAlert 关联文档
This commit is contained in:
@ -36,11 +36,11 @@ const formRules = reactive({
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
/** 打开弹窗 */
|
||||
const openModal = async () => {
|
||||
const open = async () => {
|
||||
dialogVisible.value = true
|
||||
resetForm()
|
||||
}
|
||||
defineExpose({ openModal }) // 提供 openModal 方法,用于打开弹窗
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
|
||||
/** 提交表单 */
|
||||
const submitForm = async () => {
|
@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<doc-alert title="地区 & IP" url="https://doc.iocoder.cn/area-and-ip/" />
|
||||
|
||||
<!-- 操作栏 -->
|
||||
<content-wrap>
|
||||
<el-button type="primary" plain @click="openModal()">
|
||||
<ContentWrap>
|
||||
<el-button type="primary" plain @click="openForm()">
|
||||
<Icon icon="ep:plus" class="mr-5px" /> IP 查询
|
||||
</el-button>
|
||||
</content-wrap>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<content-wrap>
|
||||
<ContentWrap>
|
||||
<div style="width: 100%; height: 700px">
|
||||
<!-- AutoResizer 自动调节大小 -->
|
||||
<el-auto-resizer>
|
||||
@ -23,14 +25,14 @@
|
||||
</template>
|
||||
</el-auto-resizer>
|
||||
</div>
|
||||
</content-wrap>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 表单弹窗:添加/修改 -->
|
||||
<area-form ref="modalRef" />
|
||||
<AreaForm ref="formRef" />
|
||||
</template>
|
||||
<script setup lang="tsx" name="Area">
|
||||
import type { Column } from 'element-plus'
|
||||
import AreaForm from './form.vue'
|
||||
import AreaForm from './AreaForm.vue'
|
||||
import * as AreaApi from '@/api/system/area'
|
||||
|
||||
// 表格的 column 字段
|
||||
@ -59,9 +61,9 @@ const getList = async () => {
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const modalRef = ref()
|
||||
const openModal = () => {
|
||||
modalRef.value.openModal()
|
||||
const formRef = ref()
|
||||
const openForm = () => {
|
||||
formRef.value.open()
|
||||
}
|
||||
|
||||
/** 初始化 **/
|
||||
|
Reference in New Issue
Block a user