1
0

feat(web): 增加数据资源更新接口

This commit is contained in:
2024-11-24 23:13:36 +08:00
parent d354cb9733
commit dd3ac59bee
3 changed files with 184 additions and 64 deletions

View File

@@ -1,5 +1,9 @@
import {resourceAddDialog, resourceDetailDialog} from "../../components/resource/dialog-resource.js";
import {apiPost, copyField, crudCommonOptions} from "../../components/constants.js";
import {
resourceAddDialog,
resourceDetailDialog,
resourceEditeDialog
} from "../../components/resource/dialog-resource.js";
import {apiPost, crudCommonOptions} from "../../components/constants.js";
export function tabData() {
return {
@@ -26,12 +30,6 @@ export function tabData() {
label: '名称',
name: 'name',
width: 200,
...copyField(
'name',
'查看详情',
undefined,
resourceDetailDialog(),
)
},
{
label: '描述',
@@ -50,7 +48,26 @@ export function tabData() {
type: 'operation',
fixed: 'right',
className: 'nowrap',
buttons: []
buttons: [
{
type: 'action',
label: '查看',
level: 'link',
...resourceDetailDialog(),
},
{
type: 'action',
label: '编辑',
level: 'link',
...resourceEditeDialog(),
},
{
type: 'action',
label: '删除',
level: 'link',
className: 'text-danger',
},
]
},
]
}