refactor:优化 notify 站内信的实现

This commit is contained in:
YunaiV
2025-04-04 18:02:02 +08:00
parent a59c3bed8a
commit 9f352291d7
15 changed files with 106 additions and 150 deletions

View File

@@ -155,15 +155,6 @@ export function useSendNotifyFormSchema(): VbenFormSchema[] {
disabled: true,
},
},
{
fieldName: 'userId',
label: '用户编号',
component: 'Input',
componentProps: {
placeholder: '请输入用户编号',
},
rules: 'required',
},
{
fieldName: 'templateCode',
label: '模板编码',
@@ -173,6 +164,15 @@ export function useSendNotifyFormSchema(): VbenFormSchema[] {
show: () => false,
},
},
{
fieldName: 'userId',
label: '用户编号',
component: 'Input',
componentProps: {
placeholder: '请输入用户编号',
},
rules: 'required',
},
{
fieldName: 'templateParams',
label: '模板参数',
@@ -186,7 +186,7 @@ export function useSendNotifyFormSchema(): VbenFormSchema[] {
}
/** 列表的字段 */
export function useGridColumns<T = SystemNotifyTemplateApi.NotifyTemplate>(
export function useGridColumns<T = SystemNotifyTemplateApi.SystemNotifyTemplate>(
onActionClick: OnActionClickFn<T>,
): VxeTableGridOptions['columns'] {
return [
@@ -258,9 +258,9 @@ export function useGridColumns<T = SystemNotifyTemplateApi.NotifyTemplate>(
},
name: 'CellOperation',
options: [
{ code: 'edit', text: '编辑' },
{ code: 'notify-send', text: '测试' },
{ code: 'delete', text: '删除' },
'edit', // 默认的编辑按钮
{ code: 'send', text: '测试' },
'delete', // 默认的删除按钮
],
},
},