fix: id类型错误
This commit is contained in:
@@ -216,7 +216,7 @@ type ModalStateType = {
|
||||
/**新增框或修改框是否显示 */
|
||||
openByEdit: boolean;
|
||||
/**新增框或修改框ID */
|
||||
editId: string;
|
||||
editId: number;
|
||||
/**多文件上传 */
|
||||
openByMoreFile: boolean;
|
||||
/**确定按钮 loading */
|
||||
@@ -226,7 +226,7 @@ type ModalStateType = {
|
||||
/**对话框对象信息状态 */
|
||||
let modalState: ModalStateType = reactive({
|
||||
openByEdit: false,
|
||||
editId: '',
|
||||
editId: 0,
|
||||
openByMoreFile: false,
|
||||
confirmLoading: false,
|
||||
});
|
||||
@@ -235,12 +235,8 @@ let modalState: ModalStateType = reactive({
|
||||
* 对话框弹出显示为 新增或者修改
|
||||
* @param noticeId 网元id, 不传为新增
|
||||
*/
|
||||
function fnModalVisibleByEdit(id?: string) {
|
||||
if (!id) {
|
||||
modalState.editId = '';
|
||||
} else {
|
||||
modalState.editId = id;
|
||||
}
|
||||
function fnModalVisibleByEdit(id: number) {
|
||||
modalState.editId = id;
|
||||
modalState.openByEdit = !modalState.openByEdit;
|
||||
}
|
||||
|
||||
@@ -257,7 +253,7 @@ function fnModalEditOk() {
|
||||
* 进行表达规则校验
|
||||
*/
|
||||
function fnModalEditCancel() {
|
||||
modalState.editId = '';
|
||||
modalState.editId = 0;
|
||||
modalState.openByEdit = false;
|
||||
modalState.openByMoreFile = false;
|
||||
}
|
||||
@@ -422,7 +418,7 @@ onMounted(() => {
|
||||
<!-- 插槽-卡片左侧侧 -->
|
||||
<template #title>
|
||||
<a-space :size="8" align="center">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()">
|
||||
<a-button type="primary" @click.prevent="fnModalVisibleByEdit(0)">
|
||||
<template #icon><UploadOutlined /></template>
|
||||
{{ t('views.ne.neSoftware.upload') }}
|
||||
</a-button>
|
||||
|
||||
Reference in New Issue
Block a user