feat: ele use desc comp
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { SystemSmsLogApi } from '#/api/system/sms/log';
|
||||
import type { DescriptionItemSchema } from '#/components/description';
|
||||
|
||||
import { h } from 'vue';
|
||||
@@ -179,9 +178,7 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'createTime',
|
||||
label: '创建时间',
|
||||
content: (data: SystemSmsLogApi.SmsLog) => {
|
||||
return formatDateTime(data?.createTime || '') as string;
|
||||
},
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'mobile',
|
||||
@@ -198,10 +195,10 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'templateType',
|
||||
label: '模板类型',
|
||||
content: (data: SystemSmsLogApi.SmsLog) => {
|
||||
render: (val) => {
|
||||
return h(DictTag, {
|
||||
type: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
|
||||
value: data?.templateType,
|
||||
value: val,
|
||||
});
|
||||
},
|
||||
},
|
||||
@@ -212,19 +209,17 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'sendStatus',
|
||||
label: '发送状态',
|
||||
content: (data: SystemSmsLogApi.SmsLog) => {
|
||||
render: (val) => {
|
||||
return h(DictTag, {
|
||||
type: DICT_TYPE.SYSTEM_SMS_SEND_STATUS,
|
||||
value: data?.sendStatus,
|
||||
value: val,
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'sendTime',
|
||||
label: '发送时间',
|
||||
content: (data: SystemSmsLogApi.SmsLog) => {
|
||||
return formatDateTime(data?.sendTime || '') as string;
|
||||
},
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'apiSendCode',
|
||||
@@ -237,19 +232,17 @@ export function useDetailSchema(): DescriptionItemSchema[] {
|
||||
{
|
||||
field: 'receiveStatus',
|
||||
label: '接收状态',
|
||||
content: (data: SystemSmsLogApi.SmsLog) => {
|
||||
render: (val) => {
|
||||
return h(DictTag, {
|
||||
type: DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS,
|
||||
value: data?.receiveStatus,
|
||||
value: val,
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'receiveTime',
|
||||
label: '接收时间',
|
||||
content: (data: SystemSmsLogApi.SmsLog) => {
|
||||
return formatDateTime(data?.receiveTime || '') as string;
|
||||
},
|
||||
render: (val) => formatDateTime(val) as string,
|
||||
},
|
||||
{
|
||||
field: 'apiReceiveCode',
|
||||
|
||||
@@ -12,14 +12,9 @@ import { useDetailSchema } from '../data';
|
||||
const formData = ref<SystemSmsLogApi.SmsLog>();
|
||||
|
||||
const [Descriptions] = useDescription({
|
||||
componentProps: {
|
||||
border: true,
|
||||
column: 2,
|
||||
direction: 'horizontal',
|
||||
labelWidth: 140,
|
||||
title: '',
|
||||
extra: '',
|
||||
},
|
||||
column: 2,
|
||||
direction: 'horizontal',
|
||||
labelWidth: 140,
|
||||
schema: useDetailSchema(),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user