Browse Source

[Fix][UI Next][V1.0.0-Alpha] Add the hover tips for the alarm instance manage table action buttons. (#8978)

3.0.0/version-upgrade
Amy0104 3 years ago committed by GitHub
parent
commit
c29a51a8c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dolphinscheduler-ui-next/src/locales/modules/en_US.ts
  2. 1
      dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts
  3. 86
      dolphinscheduler-ui-next/src/views/security/alarm-instance-manage/use-columns.ts

1
dolphinscheduler-ui-next/src/locales/modules/en_US.ts

@ -1070,6 +1070,7 @@ const security = {
operation: 'Operation',
edit: 'Edit',
delete: 'Delete',
delete_confirm: 'Delete?',
confirm: 'Confirm',
cancel: 'Cancel',
submit: 'Submit',

1
dolphinscheduler-ui-next/src/locales/modules/zh_CN.ts

@ -1057,6 +1057,7 @@ const security = {
operation: '操作',
edit: '编辑',
delete: '删除',
delete_confirm: '删除?',
confirm: '确定',
cancel: '取消',
submit: '提交',

86
dolphinscheduler-ui-next/src/views/security/alarm-instance-manage/use-columns.ts

@ -17,7 +17,7 @@
import { h } from 'vue'
import { useI18n } from 'vue-i18n'
import { NButton, NIcon, NPopconfirm, NSpace } from 'naive-ui'
import { NButton, NIcon, NPopconfirm, NSpace, NTooltip } from 'naive-ui'
import { EditOutlined, DeleteOutlined } from '@vicons/antd'
import type { TableColumns } from './types'
@ -51,44 +51,56 @@ export function useColumns(onCallback: Function) {
title: t('security.alarm_instance.operation'),
key: 'operation',
width: 150,
render: (rowData, unused) => {
render: (rowData) => {
return h(NSpace, null, {
default: () => [
h(
NButton,
{
circle: true,
type: 'info',
onClick: () => void onCallback(rowData, 'edit')
},
{
default: () =>
h(NIcon, null, { default: () => h(EditOutlined) })
}
),
h(
NPopconfirm,
{
onPositiveClick: () => void onCallback(rowData, 'delete'),
negativeText: t('security.alarm_instance.cancel'),
positiveText: t('security.alarm_instance.confirm')
},
{
trigger: () =>
h(
NButton,
{
circle: true,
type: 'error'
},
{
default: () =>
h(NIcon, null, { default: () => h(DeleteOutlined) })
}
),
default: () => t('security.alarm_instance.delete')
}
)
h(NTooltip, null, {
trigger: () =>
h(
NButton,
{
circle: true,
type: 'info',
size: 'small',
onClick: () => void onCallback(rowData, 'edit')
},
{
default: () =>
h(NIcon, null, { default: () => h(EditOutlined) })
}
),
default: () => t('security.alarm_instance.edit')
}),
h(NTooltip, null, {
trigger: () =>
h(
NPopconfirm,
{
onPositiveClick: () => void onCallback(rowData, 'delete'),
negativeText: t('security.alarm_instance.cancel'),
positiveText: t('security.alarm_instance.confirm')
},
{
trigger: () =>
h(
NButton,
{
circle: true,
type: 'error',
size: 'small'
},
{
default: () =>
h(NIcon, null, {
default: () => h(DeleteOutlined)
})
}
),
default: () => t('security.alarm_instance.delete_confirm')
}
),
default: () => t('security.alarm_instance.delete')
})
]
})
}

Loading…
Cancel
Save